summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src
diff options
context:
space:
mode:
authorAndrey Churbanov <Andrey.Churbanov@intel.com>2015-08-31 09:21:21 +0000
committerAndrey Churbanov <Andrey.Churbanov@intel.com>2015-08-31 09:21:21 +0000
commit5830b1991729774e812b9802880c377f784e77e7 (patch)
treefd3070f6fd6267ed28e0b0202258e637c74beac0 /openmp/runtime/src
parentf93451802a5ce44751be5c40dd90e77703699b9c (diff)
downloadbcm5719-llvm-5830b1991729774e812b9802880c377f784e77e7.tar.gz
bcm5719-llvm-5830b1991729774e812b9802880c377f784e77e7.zip
Fix for Fortran modules build (from C.Bergstrom)
llvm-svn: 246426
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r--openmp/runtime/src/CMakeLists.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt
index d059ec48a31..097c35cd446 100644
--- a/openmp/runtime/src/CMakeLists.txt
+++ b/openmp/runtime/src/CMakeLists.txt
@@ -207,20 +207,20 @@ 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 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)
+ 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)
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 omp_lib.f90)
+ set(LIBOMP_FORTRAN_SOURCE_FILE ${CMAKE_CURRENT_BINARY_DIR}/omp_lib.f90)
else()
- set(LIBOMP_FORTRAN_SOURCE_FILE omp_lib.f)
+ set(LIBOMP_FORTRAN_SOURCE_FILE ${CMAKE_CURRENT_BINARY_DIR}/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} omp_lib.h
+ DEPENDS ${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()
OpenPOWER on IntegriCloud