mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
Tests/FortranModules: move issue 25112 fix from FortranOnly
It involves modules, so it belongs in the `FortranModules` test set.
This commit is contained in:
@@ -125,3 +125,5 @@ add_subdirectory(Executable)
|
||||
if(CMake_TEST_Fortran_SUBMODULES)
|
||||
add_subdirectory(Submodules)
|
||||
endif()
|
||||
|
||||
add_subdirectory(Issue25112)
|
||||
|
||||
4
Tests/FortranModules/Issue25112/CMakeLists.txt
Normal file
4
Tests/FortranModules/Issue25112/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
set(CMAKE_Fortran_MODULE_DIRECTORY "${PROJECT_BINARY_DIR}/include")
|
||||
add_library(objmod OBJECT objmod.f90)
|
||||
add_executable(objmain objmain.f90)
|
||||
target_link_libraries(objmain PRIVATE objmod)
|
||||
@@ -186,9 +186,3 @@ if(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF AND
|
||||
|
||||
set_property(SOURCE no_preprocess_source_upper.F no_preprocess_source_fpp.fpp PROPERTY Fortran_PREPROCESS OFF)
|
||||
endif()
|
||||
|
||||
# Issue 25112
|
||||
set(CMAKE_Fortran_MODULE_DIRECTORY "${PROJECT_BINARY_DIR}/include")
|
||||
add_library(objmod OBJECT objmod.f90)
|
||||
add_executable(objmain objmain.f90)
|
||||
target_link_libraries(objmain PRIVATE objmod)
|
||||
|
||||
Reference in New Issue
Block a user