diff options
author | Brad King <brad.king@kitware.com> | 2018-04-05 15:38:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-04-05 17:02:27 (GMT) |
commit | d6390ce26e6575d055f2ecda8642a2ad3568cb87 (patch) | |
tree | 506377d59d5405c2a04070b60713b0c942479870 /Tests/RunCMake/Ninja | |
parent | 8592c6326bb43ec46cf43e77e51d62212c145dfe (diff) | |
download | CMake-d6390ce26e6575d055f2ecda8642a2ad3568cb87.zip CMake-d6390ce26e6575d055f2ecda8642a2ad3568cb87.tar.gz CMake-d6390ce26e6575d055f2ecda8642a2ad3568cb87.tar.bz2 |
Ninja: Fix Fortran support with response files
The Ninja generator splits preprocessing and compilation steps for
Fortran. Fix this logic to work when using response files for
compilation so that it works for the preprocessing step too.
This fixes behavior under `CMAKE_NINJA_FORCE_RESPONSE_FILE`.
Issue: #17877
Diffstat (limited to 'Tests/RunCMake/Ninja')
-rw-r--r-- | Tests/RunCMake/Ninja/RspFileC.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/RspFileCXX.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/RspFileFortran.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/RunCMakeTest.cmake | 6 |
4 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/Ninja/RspFileC.cmake b/Tests/RunCMake/Ninja/RspFileC.cmake new file mode 100644 index 0000000..4a40682 --- /dev/null +++ b/Tests/RunCMake/Ninja/RspFileC.cmake @@ -0,0 +1,2 @@ +set(ENV{CMAKE_NINJA_FORCE_RESPONSE_FILE} 1) +enable_language(C) diff --git a/Tests/RunCMake/Ninja/RspFileCXX.cmake b/Tests/RunCMake/Ninja/RspFileCXX.cmake new file mode 100644 index 0000000..9e61ffe --- /dev/null +++ b/Tests/RunCMake/Ninja/RspFileCXX.cmake @@ -0,0 +1,2 @@ +set(ENV{CMAKE_NINJA_FORCE_RESPONSE_FILE} 1) +enable_language(CXX) diff --git a/Tests/RunCMake/Ninja/RspFileFortran.cmake b/Tests/RunCMake/Ninja/RspFileFortran.cmake new file mode 100644 index 0000000..8c18e37 --- /dev/null +++ b/Tests/RunCMake/Ninja/RspFileFortran.cmake @@ -0,0 +1,2 @@ +set(ENV{CMAKE_NINJA_FORCE_RESPONSE_FILE} 1) +enable_language(Fortran) diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake index b3720fb..3bb2b6b 100644 --- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake +++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake @@ -40,6 +40,12 @@ run_CMP0058(NEW-by) run_cmake(CustomCommandDepfile) +run_cmake(RspFileC) +run_cmake(RspFileCXX) +if(TEST_Fortran) + run_cmake(RspFileFortran) +endif() + function(run_CommandConcat) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CommandConcat-build) set(RunCMake_TEST_NO_CLEAN 1) |