Tests: Enable Fortran part of CompileOptions test on single-config generators

This commit is contained in:
Brad King
2024-01-31 14:51:56 -05:00
parent 0a5d29159e
commit 8dd9554d24

View File

@@ -512,14 +512,14 @@ if(BUILD_TESTING)
ADD_TEST_MACRO(EmptyLibrary EmptyLibrary) ADD_TEST_MACRO(EmptyLibrary EmptyLibrary)
ADD_TEST_MACRO(CompileDefinitions CompileDefinitions) ADD_TEST_MACRO(CompileDefinitions CompileDefinitions)
if(CMAKE_Fortran_COMPILER)
set(CompileOptions_BUILD_OPTIONS -DTEST_FORTRAN=1)
endif()
if(_isMultiConfig) if(_isMultiConfig)
set(CompileOptions_CTEST_OPTIONS --build-config $<CONFIGURATION>) set(CompileOptions_CTEST_OPTIONS --build-config $<CONFIGURATION>)
else() else()
set(CompileOptions_BUILD_OPTIONS -DCMAKE_BUILD_TYPE=$<CONFIGURATION>) set(CompileOptions_BUILD_OPTIONS -DCMAKE_BUILD_TYPE=$<CONFIGURATION>)
endif() endif()
if(CMAKE_Fortran_COMPILER)
list(APPEND CompileOptions_BUILD_OPTIONS -DTEST_FORTRAN=1)
endif()
ADD_TEST_MACRO(CompileOptions CompileOptions) ADD_TEST_MACRO(CompileOptions CompileOptions)
set_property(TEST CompileOptions APPEND PROPERTY LABELS "Fortran") set_property(TEST CompileOptions APPEND PROPERTY LABELS "Fortran")