diff options
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() |