mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
CMAKE_COMPILER_IS_*: Replace with CMAKE_<LANG>_COMPILER_ID
Variables such as CMAKE_COMPILER_IS_GNUCC are documented as obsolete/deprecated and ideally shouldn't be used in the code anymore to have clearer compiler identifications. In the past QCC compiler was identified as GNU and also had this variable set to 1 (see policy CMP0047). Same still applies for LCC compiler (see policy CMP0129).
This commit is contained in:
@@ -133,7 +133,7 @@ endif()
|
||||
add_custom_target(notInAllCustom)
|
||||
add_dependencies(notInAllCustom notInAllExe)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_INCLUDE_SYSTEM_FLAG_CXX
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|LCC)$" AND CMAKE_INCLUDE_SYSTEM_FLAG_CXX
|
||||
AND NOT XCODE) # XCODE is excluded due to #15687
|
||||
add_executable(testSystemDir testSystemDir.cxx)
|
||||
set_target_properties(testSystemDir PROPERTIES COMPILE_FLAGS "-Werror")
|
||||
|
||||
Reference in New Issue
Block a user