[flang] Create intrinsics modules directory (contd.)

Use -module-dir rather than WORKING_DIRECTORY because we are potentially
creating the working directory in this custom command.
This commit is contained in:
Tim Keith 2021-03-15 15:36:12 -07:00
parent f5352dd9da
commit bcf95cbb2c

View File

@ -47,8 +47,8 @@ foreach(filename ${MODULES})
endif()
add_custom_command(OUTPUT ${base}.mod
COMMAND ${CMAKE_COMMAND} -E make_directory ${FLANG_INTRINSIC_MODULES_DIR}
COMMAND f18 -fsyntax-only ${FLANG_SOURCE_DIR}/module/${filename}.f90
WORKING_DIRECTORY ${FLANG_INTRINSIC_MODULES_DIR}
COMMAND f18 -fsyntax-only -module-dir ${FLANG_INTRINSIC_MODULES_DIR}
${FLANG_SOURCE_DIR}/module/${filename}.f90
DEPENDS f18 ${FLANG_SOURCE_DIR}/module/${filename}.f90 ${depends}
)
add_custom_command(OUTPUT ${base}.f18.mod