Features: Fix CompileFeatures non-feature tests for space in path

Fix the <lang>_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.
This commit is contained in:
Brad King 2015-01-21 15:42:08 -05:00
parent f40c19b543
commit 7f4154a4aa
1 changed files with 2 additions and 1 deletions

View File

@ -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)