summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-01-31 19:51:56 (GMT)
committerBrad King <brad.king@kitware.com>2024-01-31 19:51:56 (GMT)
commit8dd9554d24287cddb0a9410c35fceb12323aaa63 (patch)
treef91b0c3a7bc6f192ddbf827e54165939b36d40c3
parent0a5d29159e086ddd3ee9fc645eb575281785b9cf (diff)
downloadCMake-8dd9554d24287cddb0a9410c35fceb12323aaa63.zip
CMake-8dd9554d24287cddb0a9410c35fceb12323aaa63.tar.gz
CMake-8dd9554d24287cddb0a9410c35fceb12323aaa63.tar.bz2
Tests: Enable Fortran part of CompileOptions test on single-config generators
-rw-r--r--Tests/CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 1f384c3..1ee45d6 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -512,14 +512,14 @@ if(BUILD_TESTING)
ADD_TEST_MACRO(EmptyLibrary EmptyLibrary)
ADD_TEST_MACRO(CompileDefinitions CompileDefinitions)
- if(CMAKE_Fortran_COMPILER)
- set(CompileOptions_BUILD_OPTIONS -DTEST_FORTRAN=1)
- endif()
if(_isMultiConfig)
set(CompileOptions_CTEST_OPTIONS --build-config $<CONFIGURATION>)
else()
set(CompileOptions_BUILD_OPTIONS -DCMAKE_BUILD_TYPE=$<CONFIGURATION>)
endif()
+ if(CMAKE_Fortran_COMPILER)
+ list(APPEND CompileOptions_BUILD_OPTIONS -DTEST_FORTRAN=1)
+ endif()
ADD_TEST_MACRO(CompileOptions CompileOptions)
set_property(TEST CompileOptions APPEND PROPERTY LABELS "Fortran")