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