diff --git a/Tests/Complex/Executable/CMakeLists.txt b/Tests/Complex/Executable/CMakeLists.txt index 01b4b2007..28db54ea5 100644 --- a/Tests/Complex/Executable/CMakeLists.txt +++ b/Tests/Complex/Executable/CMakeLists.txt @@ -118,10 +118,10 @@ ADD_DEPENDENCIES(notInAllCustom notInAllExe) # ADD_SUBDIRECTORY(Temp) -IF(CMAKE_COMPILER_IS_GNUCXX) +IF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_INCLUDE_SYSTEM_FLAG_CXX) ADD_EXECUTABLE(testSystemDir testSystemDir.cxx) SET_TARGET_PROPERTIES(testSystemDir PROPERTIES COMPILE_FLAGS "-Werror") -ENDIF(CMAKE_COMPILER_IS_GNUCXX) +ENDIF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_INCLUDE_SYSTEM_FLAG_CXX) # # Extra coverage.Not used. diff --git a/Tests/ComplexOneConfig/Executable/CMakeLists.txt b/Tests/ComplexOneConfig/Executable/CMakeLists.txt index 01b4b2007..28db54ea5 100644 --- a/Tests/ComplexOneConfig/Executable/CMakeLists.txt +++ b/Tests/ComplexOneConfig/Executable/CMakeLists.txt @@ -118,10 +118,10 @@ ADD_DEPENDENCIES(notInAllCustom notInAllExe) # ADD_SUBDIRECTORY(Temp) -IF(CMAKE_COMPILER_IS_GNUCXX) +IF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_INCLUDE_SYSTEM_FLAG_CXX) ADD_EXECUTABLE(testSystemDir testSystemDir.cxx) SET_TARGET_PROPERTIES(testSystemDir PROPERTIES COMPILE_FLAGS "-Werror") -ENDIF(CMAKE_COMPILER_IS_GNUCXX) +ENDIF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_INCLUDE_SYSTEM_FLAG_CXX) # # Extra coverage.Not used. diff --git a/Tests/ComplexRelativePaths/Executable/CMakeLists.txt b/Tests/ComplexRelativePaths/Executable/CMakeLists.txt index 01b4b2007..28db54ea5 100644 --- a/Tests/ComplexRelativePaths/Executable/CMakeLists.txt +++ b/Tests/ComplexRelativePaths/Executable/CMakeLists.txt @@ -118,10 +118,10 @@ ADD_DEPENDENCIES(notInAllCustom notInAllExe) # ADD_SUBDIRECTORY(Temp) -IF(CMAKE_COMPILER_IS_GNUCXX) +IF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_INCLUDE_SYSTEM_FLAG_CXX) ADD_EXECUTABLE(testSystemDir testSystemDir.cxx) SET_TARGET_PROPERTIES(testSystemDir PROPERTIES COMPILE_FLAGS "-Werror") -ENDIF(CMAKE_COMPILER_IS_GNUCXX) +ENDIF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_INCLUDE_SYSTEM_FLAG_CXX) # # Extra coverage.Not used.