diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CompileFeatures/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/CompileFeatures/feature_test.c | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt index 5cd0836..ef37dcb 100644 --- a/Tests/CompileFeatures/CMakeLists.txt +++ b/Tests/CompileFeatures/CMakeLists.txt @@ -103,8 +103,9 @@ foreach(lang CXX C) try_compile(${feature}_works "${CMAKE_CURRENT_BINARY_DIR}/${feature}_test" "${CMAKE_CURRENT_SOURCE_DIR}/feature_test.${${lang}_ext}" - COMPILE_DEFINITIONS "-DTEST=${CMAKE_CURRENT_SOURCE_DIR}/${feature}.${${lang}_ext}" + COMPILE_DEFINITIONS "-DTEST=${feature}.${${lang}_ext}" CMAKE_FLAGS "-DCMAKE_${lang}_STANDARD=${${lang}_standard_flag}" + "-DINCLUDE_DIRECTORIES=${CMAKE_CURRENT_SOURCE_DIR}" OUTPUT_VARIABLE OUTPUT ) if (${feature}_works) diff --git a/Tests/CompileFeatures/feature_test.c b/Tests/CompileFeatures/feature_test.c new file mode 100644 index 0000000..4147f1f --- /dev/null +++ b/Tests/CompileFeatures/feature_test.c @@ -0,0 +1,10 @@ + +#define STRINGIFY_IMPL(X) #X +#define STRINGIFY(X) STRINGIFY_IMPL(X) + +#include STRINGIFY(TEST) + +int main(void) +{ + return 0; +} |