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.
This commit is contained in:
commit
529293e344
|
@ -71,7 +71,7 @@ if (CMAKE_C_COMPILER_ID STREQUAL "GNU"
|
||||||
OR CMAKE_C_COMPILER_ID STREQUAL "Clang"
|
OR CMAKE_C_COMPILER_ID STREQUAL "Clang"
|
||||||
OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
|
OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
|
||||||
add_executable(C_undefined c_undefined.c)
|
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)
|
target_compile_options(C_undefined PRIVATE -Werror=undef)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
#define PREFIX TEST
|
#define PREFIX TEST
|
||||||
#include "compile_tests.h"
|
#include "compile_tests.h"
|
||||||
|
|
||||||
|
#ifdef TEST_COMPILER_C_STATIC_ASSERT
|
||||||
|
#error Expect no C features defined
|
||||||
|
#endif
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
#define PREFIX MULTI
|
#define PREFIX MULTI
|
||||||
#include "compile_tests.h"
|
#include "compile_tests.h"
|
||||||
|
|
||||||
|
#ifdef MULTI_COMPILER_C_STATIC_ASSERT
|
||||||
|
#error Expect no C features defined
|
||||||
|
#endif
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue