Tests: Fix CMP0115 warnings in CompileFeatures test

Pass source file extensions explicitly.
This commit is contained in:
Brad King
2021-01-22 14:50:41 -05:00
parent b369aee24d
commit 549eedfe85

View File

@@ -4,9 +4,12 @@ cmake_policy(SET CMP0057 NEW)
project(CompileFeatures)
set(ext_C c)
set(ext_CXX cpp)
macro(run_test feature lang)
if (${feature} IN_LIST CMAKE_${lang}_COMPILE_FEATURES)
add_library(test_${feature} OBJECT ${feature})
add_library(test_${feature} OBJECT ${feature}.${ext_${lang}})
set_property(TARGET test_${feature}
PROPERTY COMPILE_FEATURES "${feature}"
)