Page MenuHomePhabricator

D61603.id198332.diff
No OneTemporary

File Metadata

Created
Mon, Nov 18, 5:38 AM

D61603.id198332.diff

Index: runtime/src/CMakeLists.txt
===================================================================
--- runtime/src/CMakeLists.txt
+++ runtime/src/CMakeLists.txt
@@ -239,6 +239,11 @@
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)
+ # Workaround for gfortran to build modules with the
+ # omp_sched_monotonic integer parameter
+ if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
+ set(ADDITIONAL_Fortran_FLAGS "-fno-range-check")
+ endif()
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)
@@ -248,7 +253,8 @@
endif()
add_custom_command(
OUTPUT omp_lib.mod omp_lib_kinds.mod
- COMMAND ${CMAKE_Fortran_COMPILER} -c ${LIBOMP_CONFIGURED_FFLAGS} ${LIBOMP_FORTRAN_SOURCE_FILE}
+ COMMAND ${CMAKE_Fortran_COMPILER} -c ${ADDITIONAL_Fortran_FLAGS}
+ ${LIBOMP_CONFIGURED_FFLAGS} ${LIBOMP_FORTRAN_SOURCE_FILE}
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${LIBOMP_FORTRAN_SOURCE_FILE}
${CMAKE_CURRENT_BINARY_DIR}/omp_lib.h
)

Event Timeline