mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
WCDH: Make the header -Wundef safe for the C language.
The __STDC_VERSION__ macro may be defined or not depending on the implementation dialect of C. Test that it is defined before testing its value. The CXX tests do not need such a change because they define __cplusplus in all dialects.
This commit is contained in:
7
Tests/Module/WriteCompilerDetectionHeader/c_undefined.c
Normal file
7
Tests/Module/WriteCompilerDetectionHeader/c_undefined.c
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
#include "test_compiler_detection.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user