diff options
author | Brad King <brad.king@kitware.com> | 2015-07-08 13:59:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-07-08 13:59:42 (GMT) |
commit | e7c33efa1520401cdc1f71b4c37cf1ffa6da3f78 (patch) | |
tree | cb5867a23d5d2d863969c88d928b2e54c0ff32a5 /Tests | |
parent | b37fb49646909b489a062088ed5aa1e88d896f83 (diff) | |
parent | a639689c16039b2f7c8b63e31fbbbc753ccef8c8 (diff) | |
download | CMake-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.txt | 7 |
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() |