File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -362,13 +362,25 @@ include_directories(BEFORE
362362 ${CMAKE_CURRENT_SOURCE_DIR} /include
363363 )
364364
365+ if (MSVC )
366+ # Direct module files to build include directory
367+ set (CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /runtime/flang)
368+
369+ # Install Fortran module files
370+ # TODO: this creates empty directories. Figure out a workaround or
371+ # better would be to figure out why CMAKE_Fortran_MODULE_DIRECTORY is different
372+ install (DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} /
373+ DESTINATION include FILES_MATCHING PATTERN *.mod
374+ )
375+ else ()
365376# Direct module files to build include directory
366377set (CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /include )
367378
368379# Install Fortran module files
369380install (DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} /
370381 DESTINATION include
371382 )
383+ endif ()
372384
373385# Install Fortran OpenMP include file
374386# Copy omp_lib.h file, not the symlink
You can’t perform that action at this time.
0 commit comments