Index: runtime/cmake/LibompExports.cmake =================================================================== --- runtime/cmake/LibompExports.cmake +++ runtime/cmake/LibompExports.cmake @@ -64,10 +64,12 @@ if(${LIBOMP_FORTRAN_MODULES}) add_custom_command(TARGET libomp-mod POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${LIBOMP_EXPORTS_MOD_DIR} - COMMAND ${CMAKE_COMMAND} -E copy omp_lib.h ${LIBOMP_EXPORTS_CMN_DIR} COMMAND ${CMAKE_COMMAND} -E copy omp_lib.mod ${LIBOMP_EXPORTS_MOD_DIR} COMMAND ${CMAKE_COMMAND} -E copy omp_lib_kinds.mod ${LIBOMP_EXPORTS_MOD_DIR} ) + add_custom_command(TARGET omp POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy omp_lib.h ${LIBOMP_EXPORTS_CMN_DIR} + ) endif() # Copy OpenMP library into exports/ directory post build