diff options
author | Brad King <brad.king@kitware.com> | 2024-07-22 19:55:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-07-22 19:55:42 (GMT) |
commit | c6f81bdacfeb2e99771ec4a5750964fee5e97dd3 (patch) | |
tree | 6a166a57fed026f8e65468b51815da539d94e115 /Tests | |
parent | fa1b748389c996355f4b451dd994ddca764a47ae (diff) | |
download | CMake-c6f81bdacfeb2e99771ec4a5750964fee5e97dd3.zip CMake-c6f81bdacfeb2e99771ec4a5750964fee5e97dd3.tar.gz CMake-c6f81bdacfeb2e99771ec4a5750964fee5e97dd3.tar.bz2 |
Tests/RunCMake: Pass Fortran compiler id into more tests
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 18 | ||||
-rw-r--r-- | Tests/RunCMake/DependencyGraph/RunCMakeTest.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/RunCMakeTest.cmake | 2 |
3 files changed, 17 insertions, 5 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index ddd48cb..a595960 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -217,7 +217,10 @@ if(CMAKE_GENERATOR MATCHES "Ninja") -DCMAKE_SHARED_LIBRARY_PREFIX=${CMAKE_SHARED_LIBRARY_PREFIX} -DCMAKE_SHARED_LIBRARY_SUFFIX=${CMAKE_SHARED_LIBRARY_SUFFIX}) if(CMAKE_Fortran_COMPILER) - list(APPEND Ninja_ARGS -DTEST_Fortran=1) + list(APPEND Ninja_ARGS + -DCMake_TEST_Fortran=1 + -DCMAKE_Fortran_COMPILER_ID=${CMAKE_Fortran_COMPILER_ID} + ) endif() if(ninja_test_with_qt_version) list(APPEND Ninja_ARGS @@ -333,7 +336,10 @@ if(NOT DEFINED CMake_TEST_BuildDepends_GNU_AS endif() if(CMAKE_Fortran_COMPILER) - list(APPEND BuildDepends_ARGS -DCMake_TEST_Fortran=1) + list(APPEND BuildDepends_ARGS + -DCMake_TEST_Fortran=1 + -DCMAKE_Fortran_COMPILER_ID=${CMAKE_Fortran_COMPILER_ID} + ) endif() add_RunCMake_test(BuildDepends @@ -684,7 +690,13 @@ if(CMake_TEST_CUDA) set_property(TEST RunCMake.CUDA_architectures APPEND PROPERTY LABELS "CUDA") endif() -add_RunCMake_test(DependencyGraph -DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER}) +if(CMAKE_Fortran_COMPILER) + list(APPEND DependencyGraph_ARGS + -DCMake_TEST_Fortran=1 + -DCMAKE_Fortran_COMPILER_ID=${CMAKE_Fortran_COMPILER_ID} + ) + endif() +add_RunCMake_test(DependencyGraph) set_property(TEST RunCMake.DependencyGraph APPEND PROPERTY LABELS "Fortran") # Add C++ Module tests. diff --git a/Tests/RunCMake/DependencyGraph/RunCMakeTest.cmake b/Tests/RunCMake/DependencyGraph/RunCMakeTest.cmake index f7959dc..1981fce 100644 --- a/Tests/RunCMake/DependencyGraph/RunCMakeTest.cmake +++ b/Tests/RunCMake/DependencyGraph/RunCMakeTest.cmake @@ -60,7 +60,7 @@ run_cmake(Property) run_optimize_test(OptimizeShared SharedTop) run_optimize_test(OptimizeStatic StaticTop) -if(CMAKE_Fortran_COMPILER) +if(CMake_TEST_Fortran) run_optimize_test(OptimizeFortran FortranTop) endif() diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake index 8b24c16..c247ac4 100644 --- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake +++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake @@ -108,7 +108,7 @@ run_cmake(JobPoolUsesTerminal) run_cmake(RspFileC) run_cmake(RspFileCXX) -if(TEST_Fortran) +if(CMake_TEST_Fortran) run_cmake(RspFileFortran) endif() |