aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/common.cmake
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2019-12-09 08:43:14 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2019-12-09 08:43:14 +0300
commit012cbc62444137c516c4e4cab7e17d21aef265f6 (patch)
treee220285937d41937c9bf2918557b3bee79d35f6f /common.cmake
parentcommon.cmake: user switches may be set in CMakeLists.txt (diff)
downloadcmake-common-012cbc62444137c516c4e4cab7e17d21aef265f6.tar.gz
cmake-common-012cbc62444137c516c4e4cab7e17d21aef265f6.zip
more robust compiler identification
Diffstat (limited to '')
-rw-r--r--common.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/common.cmake b/common.cmake
index b1ea33e..610159e 100644
--- a/common.cmake
+++ b/common.cmake
@@ -23,9 +23,9 @@ cmake_policy(SET CMP0054 NEW)
# Toolset identification:
-if(CMAKE_C_COMPILER)
+if(CMAKE_C_COMPILER_ID)
set(toolset "${CMAKE_C_COMPILER_ID}")
-elseif(CMAKE_CXX_COMPILER)
+elseif(CMAKE_CXX_COMPILER_ID)
set(toolset "${CMAKE_CXX_COMPILER_ID}")
else()
set(toolset "unknown")