summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-07-09 13:17:19 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-07-09 13:17:19 (GMT)
commit3723fe94e6ec01143ec91433deb5741efe10cfe2 (patch)
treed6d06306f2eb6874d4f4b68b2f12647cecc2a227 /Tests
parent6b4fccd1a69b7da0cadb50026d3a5056c5fc0b05 (diff)
parenta639689c16039b2f7c8b63e31fbbbc753ccef8c8 (diff)
downloadCMake-3723fe94e6ec01143ec91433deb5741efe10cfe2.zip
CMake-3723fe94e6ec01143ec91433deb5741efe10cfe2.tar.gz
CMake-3723fe94e6ec01143ec91433deb5741efe10cfe2.tar.bz2
Merge topic 'CheckCompilerFlag-do-not-use-FLAGS'
a639689c Check*CompilerFlag: Revert to previous method used to pass flags (#15641)
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt b/Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt
index e205330..9be69f1 100644
--- a/Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt
+++ b/Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt
@@ -56,3 +56,10 @@ if(CMAKE_COMPILER_IS_GNUCXX)
else()
message("Unhandled Platform")
endif()
+
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
+ check_cxx_compiler_flag("-x c++" HAVE_X_CXX)
+ if(NOT HAVE_X_CXX)
+ message(FATAL_ERROR "${CMAKE_CXX_COMPILER_ID} compiler flag '-x c++' check failed")
+ endif()
+endif()