summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-01-22 19:50:41 (GMT)
committerBrad King <brad.king@kitware.com>2021-01-28 14:05:34 (GMT)
commit549eedfe859db7cd7f57a446332b489a511d26ce (patch)
treedfd1c956bfb89fe75638f20fed9458c75d6931b9
parentb369aee24d4c79ce263eaa4badb4f840ee5f0a2e (diff)
downloadCMake-549eedfe859db7cd7f57a446332b489a511d26ce.zip
CMake-549eedfe859db7cd7f57a446332b489a511d26ce.tar.gz
CMake-549eedfe859db7cd7f57a446332b489a511d26ce.tar.bz2
Tests: Fix CMP0115 warnings in CompileFeatures test
Pass source file extensions explicitly.
-rw-r--r--Tests/CompileFeatures/CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index 922e07f..a608b6a 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -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}"
)