We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bf8fd2 commit 5905dfbCopy full SHA for 5905dfb
src/CMakeLists.txt
@@ -66,6 +66,12 @@ set(SRC
66
add_library(${PROJECT_NAME} ${SRC})
67
68
set(LIB_MOD_DIR ${CMAKE_CURRENT_BINARY_DIR}/mod_files/)
69
+# We need the module directory before we finish the configure stage since the
70
+# build interface might resolve before the module directory is generated by CMake
71
+if(NOT EXISTS "${LIB_MOD_DIR}")
72
+ make_directory("${LIB_MOD_DIR}")
73
+endif()
74
+
75
set_target_properties(${PROJECT_NAME} PROPERTIES
76
Fortran_MODULE_DIRECTORY ${LIB_MOD_DIR})
77
target_include_directories(${PROJECT_NAME} PUBLIC
0 commit comments