summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-07-08 13:59:42 (GMT)
committerBrad King <brad.king@kitware.com>2015-07-08 13:59:42 (GMT)
commite7c33efa1520401cdc1f71b4c37cf1ffa6da3f78 (patch)
treecb5867a23d5d2d863969c88d928b2e54c0ff32a5 /Tests
parentb37fb49646909b489a062088ed5aa1e88d896f83 (diff)
parenta639689c16039b2f7c8b63e31fbbbc753ccef8c8 (diff)
downloadCMake-e7c33efa1520401cdc1f71b4c37cf1ffa6da3f78.zip
CMake-e7c33efa1520401cdc1f71b4c37cf1ffa6da3f78.tar.gz
CMake-e7c33efa1520401cdc1f71b4c37cf1ffa6da3f78.tar.bz2
Merge branch 'CheckCompilerFlag-do-not-use-FLAGS' into release
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()