From 7f4154a4aa4bb121bad05884f48466489e346821 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 21 Jan 2015 15:42:08 -0500 Subject: Features: Fix CompileFeatures non-feature tests for space in path Fix the _non_features try_compile calls to work correctly when there is a space in the path. Otherwise they all fail due to the space instead of the lack of a feature. --- Tests/CompileFeatures/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt index ccd6f30..a276f36 100644 --- a/Tests/CompileFeatures/CMakeLists.txt +++ b/Tests/CompileFeatures/CMakeLists.txt @@ -92,8 +92,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) -- cgit v0.12