diff options
Diffstat (limited to 'Tests')
7 files changed, 17 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index f306200..aa075b0 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -385,6 +385,9 @@ if("${CMAKE_GENERATOR}" MATCHES "Make|Ninja") if(DEFINED CMake_TEST_CUDA) list(APPEND CompilerLauncher_ARGS -DCMake_TEST_CUDA=${CMake_TEST_CUDA}) endif() + if(CMAKE_Fortran_COMPILER) + list(APPEND CompilerLauncher_ARGS -DCMake_TEST_Fortran=1) + endif() add_RunCMake_test(CompilerLauncher) add_RunCMake_test(ctest_labels_for_subprojects) endif() diff --git a/Tests/RunCMake/CompilerLauncher/Fortran-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/Fortran-Build-stdout.txt new file mode 100644 index 0000000..3313e31 --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/Fortran-Build-stdout.txt @@ -0,0 +1 @@ +.*-E env USED_LAUNCHER=1.* diff --git a/Tests/RunCMake/CompilerLauncher/Fortran-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/Fortran-launch-Build-stdout.txt new file mode 100644 index 0000000..3313e31 --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/Fortran-launch-Build-stdout.txt @@ -0,0 +1 @@ +.*-E env USED_LAUNCHER=1.* diff --git a/Tests/RunCMake/CompilerLauncher/Fortran-launch.cmake b/Tests/RunCMake/CompilerLauncher/Fortran-launch.cmake new file mode 100644 index 0000000..7e9a564 --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/Fortran-launch.cmake @@ -0,0 +1,3 @@ +set(CTEST_USE_LAUNCHERS 1) +include(CTestUseLaunchers) +include(Fortran.cmake) diff --git a/Tests/RunCMake/CompilerLauncher/Fortran.cmake b/Tests/RunCMake/CompilerLauncher/Fortran.cmake new file mode 100644 index 0000000..72cc03e --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/Fortran.cmake @@ -0,0 +1,4 @@ +enable_language(Fortran) +set(CMAKE_Fortran_COMPILER_LAUNCHER "${CMAKE_COMMAND};-E;env;USED_LAUNCHER=1") +set(CMAKE_VERBOSE_MAKEFILE TRUE) +add_executable(main main.F) diff --git a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake index ab26512..bb8da03 100644 --- a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake +++ b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake @@ -19,6 +19,9 @@ set(langs C CXX) if(CMake_TEST_CUDA) list(APPEND langs CUDA) endif() +if(CMake_TEST_Fortran) + list(APPEND langs Fortran) +endif() foreach(lang ${langs}) run_compiler_launcher(${lang}) diff --git a/Tests/RunCMake/CompilerLauncher/main.F b/Tests/RunCMake/CompilerLauncher/main.F new file mode 100644 index 0000000..53ec0d1 --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/main.F @@ -0,0 +1,2 @@ + PROGRAM MAIN + END |