summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-07-25 13:45:35 (GMT)
committerBrad King <brad.king@kitware.com>2023-07-25 15:35:24 (GMT)
commitc172eecea64154bdc3de4aa64a31771268e8d1da (patch)
tree3641835a1212bd0e9d3a4432e111a91189ed4b24 /Tests
parent1e085cbff7059cd38ebea0bca8cb414fd30c2d06 (diff)
downloadCMake-c172eecea64154bdc3de4aa64a31771268e8d1da.zip
CMake-c172eecea64154bdc3de4aa64a31771268e8d1da.tar.gz
CMake-c172eecea64154bdc3de4aa64a31771268e8d1da.tar.bz2
cmTarget: Restore Fortran_PREPROCESS property initialization
Fix a typo from commit e522f8ca06 (cmTarget: factor out properties initialized for target which compile, 2023-02-01, v3.27.0-rc1~577^2~13), that broke this property. Also update the test suite to use this upgrade as some level of coverage. Fixes: #25123
Diffstat (limited to 'Tests')
-rw-r--r--Tests/FortranOnly/CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/Tests/FortranOnly/CMakeLists.txt b/Tests/FortranOnly/CMakeLists.txt
index b092c42..dfc28dd 100644
--- a/Tests/FortranOnly/CMakeLists.txt
+++ b/Tests/FortranOnly/CMakeLists.txt
@@ -169,8 +169,11 @@ endif()
# extensions like '.F' and '.fpp'.
if(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF AND
NOT CMAKE_Fortran_COMPILER_ID MATCHES "(Flang|NAG|PGI|NVHPC|SunPro|XL)")
+
+ set(CMAKE_Fortran_PREPROCESS OFF)
add_library(no_preprocess_target STATIC no_preprocess_target_upper.F)
target_compile_options(no_preprocess_target PRIVATE -DINTEGER=nonsense)
+ unset(CMAKE_Fortran_PREPROCESS)
add_library(no_preprocess_source STATIC no_preprocess_source_upper.F)
target_compile_options(no_preprocess_source PRIVATE -DINTEGER=nonsense)
@@ -181,7 +184,6 @@ if(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF AND
target_sources(no_preprocess_source PRIVATE no_preprocess_source_fpp.fpp)
endif()
- set_property(TARGET no_preprocess_target PROPERTY Fortran_PREPROCESS OFF)
set_property(SOURCE no_preprocess_source_upper.F no_preprocess_source_fpp.fpp PROPERTY Fortran_PREPROCESS OFF)
endif()