aboutsummaryrefslogtreecommitdiff
path: root/runtime/src/CMakeLists.txt
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2015-08-31 15:52:32 +0000
committerJonathan Peyton <jonathan.l.peyton@intel.com>2015-08-31 15:52:32 +0000
commit349425018cadec94b8be53d54bd30a84f19592b2 (patch)
tree2effe842edffb205d0e9b497eaa0ade486d5ab1a /runtime/src/CMakeLists.txt
parentf8089721aee6e689842375c46deb8e1dd9bdd86d (diff)
Follow up to r246426 (Break Fortran Module Files build)
The CMAKE_CURRENT_BINARY_DIR is only necessary on the DEPENDS part of the add_custom_command to build the Fortran Modules. git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@246448 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime/src/CMakeLists.txt')
-rw-r--r--runtime/src/CMakeLists.txt13
1 files changed, 7 insertions, 6 deletions
diff --git a/runtime/src/CMakeLists.txt b/runtime/src/CMakeLists.txt
index 097c35c..ce6b260 100644
--- a/runtime/src/CMakeLists.txt
+++ b/runtime/src/CMakeLists.txt
@@ -207,20 +207,21 @@ endif()
# Building the Fortran module files
# One compilation step creates both omp_lib.mod and omp_lib_kinds.mod
if(${LIBOMP_FORTRAN_MODULES})
- configure_file(${LIBOMP_INC_DIR}/omp_lib.h.var ${CMAKE_CURRENT_BINARY_DIR}/omp_lib.h @ONLY)
- configure_file(${LIBOMP_INC_DIR}/omp_lib.f.var ${CMAKE_CURRENT_BINARY_DIR}/omp_lib.f @ONLY)
- configure_file(${LIBOMP_INC_DIR}/omp_lib.f90.var ${CMAKE_CURRENT_BINARY_DIR}/omp_lib.f90 @ONLY)
+ configure_file(${LIBOMP_INC_DIR}/omp_lib.h.var omp_lib.h @ONLY)
+ configure_file(${LIBOMP_INC_DIR}/omp_lib.f.var omp_lib.f @ONLY)
+ configure_file(${LIBOMP_INC_DIR}/omp_lib.f90.var omp_lib.f90 @ONLY)
add_custom_target(libomp-mod ALL DEPENDS omp_lib.mod omp_lib_kinds.mod)
libomp_get_fflags(LIBOMP_CONFIGURED_FFLAGS)
if(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
- set(LIBOMP_FORTRAN_SOURCE_FILE ${CMAKE_CURRENT_BINARY_DIR}/omp_lib.f90)
+ set(LIBOMP_FORTRAN_SOURCE_FILE omp_lib.f90)
else()
- set(LIBOMP_FORTRAN_SOURCE_FILE ${CMAKE_CURRENT_BINARY_DIR}/omp_lib.f)
+ set(LIBOMP_FORTRAN_SOURCE_FILE omp_lib.f)
endif()
add_custom_command(
OUTPUT omp_lib.mod omp_lib_kinds.mod
COMMAND ${CMAKE_Fortran_COMPILER} -c ${LIBOMP_CONFIGURED_FFLAGS} ${LIBOMP_FORTRAN_SOURCE_FILE}
- DEPENDS ${LIBOMP_FORTRAN_SOURCE_FILE} ${CMAKE_CURRENT_BINARY_DIR}/omp_lib.h
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${LIBOMP_FORTRAN_SOURCE_FILE}
+ ${CMAKE_CURRENT_BINARY_DIR}/omp_lib.h
)
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES omp_lib${CMAKE_C_OUTPUT_EXTENSION})
endif()