summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-01-22 14:50:38 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-01-22 14:50:38 (GMT)
commit529293e344106a7132983a8f166a36e835fcce87 (patch)
treed4da71b32fba8692022190a51f122cd0edb00a61 /Tests
parentbe2a74dbcbbc3a6d6af8ccb0a70688e4db0f6901 (diff)
parent3c0996c135198fbcaf8951cffc98e3a1570e756d (diff)
downloadCMake-529293e344106a7132983a8f166a36e835fcce87.zip
CMake-529293e344106a7132983a8f166a36e835fcce87.tar.gz
CMake-529293e344106a7132983a8f166a36e835fcce87.tar.bz2
Merge topic 'WriteCompilerDetectionHeader-tests'
3c0996c1 WCDH: Test that no C compiler features are defined for CXX compiler. 8dc0c976 WCDH: Fix the C_STANDARD property in the tests.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt2
-rw-r--r--Tests/Module/WriteCompilerDetectionHeader/main.cpp4
-rw-r--r--Tests/Module/WriteCompilerDetectionHeader/multi_files.cpp4
3 files changed, 9 insertions, 1 deletions
diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
index b5e46c0..78c4a6a 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
+++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
@@ -71,7 +71,7 @@ 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)
+ set_property(TARGET C_undefined PROPERTY C_STANDARD 90)
target_compile_options(C_undefined PRIVATE -Werror=undef)
endif()
diff --git a/Tests/Module/WriteCompilerDetectionHeader/main.cpp b/Tests/Module/WriteCompilerDetectionHeader/main.cpp
index 82b2191..192094c 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/main.cpp
+++ b/Tests/Module/WriteCompilerDetectionHeader/main.cpp
@@ -4,6 +4,10 @@
#define PREFIX TEST
#include "compile_tests.h"
+#ifdef TEST_COMPILER_C_STATIC_ASSERT
+#error Expect no C features defined
+#endif
+
int main()
{
return 0;
diff --git a/Tests/Module/WriteCompilerDetectionHeader/multi_files.cpp b/Tests/Module/WriteCompilerDetectionHeader/multi_files.cpp
index ca29823..1635091 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/multi_files.cpp
+++ b/Tests/Module/WriteCompilerDetectionHeader/multi_files.cpp
@@ -4,6 +4,10 @@
#define PREFIX MULTI
#include "compile_tests.h"
+#ifdef MULTI_COMPILER_C_STATIC_ASSERT
+#error Expect no C features defined
+#endif
+
int main()
{
return 0;