Set up proper fortran module directories
parent
b12fde65d8
commit
c209df26ad
|
@ -81,15 +81,9 @@ add_library(utilLib SHARED
|
|||
target_include_directories(utilLib PUBLIC
|
||||
include
|
||||
)
|
||||
target_link_libraries(utilLib PUBLIC
|
||||
target_link_libraries(utilLib PRIVATE
|
||||
FFTW::Float
|
||||
)
|
||||
# TODO (fortran module include)
|
||||
# This seems to be needed to use this library's modules,
|
||||
# but is there a more idiomatic way to do this?
|
||||
target_include_directories(utilLib INTERFACE
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
add_library(combinedLib SHARED
|
||||
Library/geometry/src/geometryModule.F
|
||||
|
@ -120,11 +114,17 @@ target_include_directories(combinedlibmodule PUBLIC
|
|||
target_link_libraries(combinedlibmodule PUBLIC
|
||||
combinedLib
|
||||
)
|
||||
# TODO (fortran module include)
|
||||
# This seems to be needed to use this library's modules,
|
||||
# but is there a more idiomatic way to do this?
|
||||
|
||||
# Set up fortran module paths
|
||||
set(mdir ${CMAKE_CURRENT_BINARY_DIR}/utillib_fortran_modules)
|
||||
set_property(TARGET utilLib PROPERTY Fortran_MODULE_DIRECTORY ${mdir})
|
||||
target_include_directories(utilLib INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:Fortran>:${mdir}>
|
||||
)
|
||||
set(mdir ${CMAKE_CURRENT_BINARY_DIR}/combinelib_fortran_modules)
|
||||
set_property(TARGET combinedLib PROPERTY Fortran_MODULE_DIRECTORY ${mdir})
|
||||
target_include_directories(combinedLib INTERFACE
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
$<$<COMPILE_LANGUAGE:Fortran>:${mdir}>
|
||||
)
|
||||
|
||||
install(TARGETS
|
||||
|
|
|
@ -8,15 +8,14 @@ add_library(formslcLib SHARED
|
|||
formslcLib/src/io.c
|
||||
)
|
||||
set_property(TARGET formslcLib PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
target_include_directories(formslcLib PRIVATE formslcLib/include)
|
||||
target_link_libraries(formslcLib PUBLIC
|
||||
utilLib
|
||||
)
|
||||
# TODO (fortran module include)
|
||||
# This seems to be needed to use this library's modules,
|
||||
# but is there a more idiomatic way to do this?
|
||||
|
||||
set(mdir ${CMAKE_CURRENT_BINARY_DIR}/formslc_fortran_modules)
|
||||
set_property(TARGET formslcLib PROPERTY Fortran_MODULE_DIRECTORY ${mdir})
|
||||
target_include_directories(formslcLib INTERFACE
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
$<$<COMPILE_LANGUAGE:Fortran>:${mdir}>
|
||||
)
|
||||
|
||||
add_subdirectory(correct)
|
||||
|
|
Loading…
Reference in New Issue