diff --git a/options_linux.cmake b/options_linux.cmake index fdd75d4..cfae65b 100644 --- a/options_linux.cmake +++ b/options_linux.cmake @@ -40,12 +40,8 @@ if (DESKTOP_APP_SPECIAL_TARGET) target_compile_options(common_options INTERFACE -g0) target_link_options(common_options INTERFACE -g0) else() - target_compile_options(common_options INTERFACE $,,-g>) - target_link_options(common_options INTERFACE $,,-g>) - if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - target_compile_options(common_options INTERFACE $,,-flto>) - target_link_options(common_options INTERFACE $,,-flto -fuse-linker-plugin>) - endif() + target_compile_options(common_options INTERFACE $,,-g -flto>) + target_link_options(common_options INTERFACE $,,-g -flto -fuse-linker-plugin>) endif() endif() diff --git a/variables.cmake b/variables.cmake index b437949..d8e0a06 100644 --- a/variables.cmake +++ b/variables.cmake @@ -96,10 +96,16 @@ else() report_bad_special_target() endif() endif() - if (DESKTOP_APP_SPECIAL_TARGET AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - set(CMAKE_AR "gcc-ar") - set(CMAKE_RANLIB "gcc-ranlib") - set(CMAKE_NM "gcc-nm") + if (DESKTOP_APP_SPECIAL_TARGET) + if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + set(CMAKE_AR "gcc-ar") + set(CMAKE_RANLIB "gcc-ranlib") + set(CMAKE_NM "gcc-nm") + elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(CMAKE_AR "llvm-ar") + set(CMAKE_RANLIB "llvm-ranlib") + set(CMAKE_NM "llvm-nm") + endif() endif() endif()