diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2015-01-06 18:31:30 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-01-11 15:47:58 (GMT) |
commit | a15675efc3d96906d4e803def2e83fd3bd1cf812 (patch) | |
tree | fad6fd6c217b53756df16defa84c4a16cb06d89a /Tests/Module | |
parent | 07d1f6fca1d6ea21dea64b32639c44d5eecf98a6 (diff) | |
download | CMake-a15675efc3d96906d4e803def2e83fd3bd1cf812.zip CMake-a15675efc3d96906d4e803def2e83fd3bd1cf812.tar.gz CMake-a15675efc3d96906d4e803def2e83fd3bd1cf812.tar.bz2 |
Features: Quote all compiler names when comparing with COMPILER_ID
In preparation of adding MSVC support we need to quote all compiler names,
as MSVC is also a CMake variable.
Diffstat (limited to 'Tests/Module')
-rw-r--r-- | Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt index 5b2f1de..401de95 100644 --- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt +++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0.0) +cmake_minimum_required(VERSION 3.1.0) project(WriteCompilerDetectionHeader) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -56,17 +56,17 @@ macro(set_defines target true_defs false_defs) ) endmacro() -if (CMAKE_CXX_COMPILER_ID STREQUAL GNU - OR CMAKE_CXX_COMPILER_ID STREQUAL Clang - OR CMAKE_CXX_COMPILER_ID STREQUAL AppleClang) +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" + OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" + OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") # False for C++98 mode. list(APPEND false_defs EXPECTED_COMPILER_CXX_DELEGATING_CONSTRUCTORS) list(APPEND false_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES) endif() -if (CMAKE_C_COMPILER_ID STREQUAL GNU - OR CMAKE_C_COMPILER_ID STREQUAL Clang - OR CMAKE_C_COMPILER_ID STREQUAL AppleClang) +if (CMAKE_C_COMPILER_ID STREQUAL "GNU" + OR CMAKE_C_COMPILER_ID STREQUAL "Clang" + OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang") add_executable(C_undefined c_undefined.c) set_property(TARGET C_undefined PROPERTY CXX_STANDARD 90) target_compile_options(C_undefined PRIVATE -Werror=undef) |