Fix openmp support

This commit is contained in:
Guilhem Lavaux 2017-11-15 13:30:19 +01:00
parent 48750a5d1e
commit 1d261c6251

View File

@ -52,11 +52,14 @@ SET(CONFIGURE_LDFLAGS "")
if (ENABLE_SHARP) if (ENABLE_SHARP)
SET(DEP_BUILD ${BUILD_PREFIX}/sharp-prefix/src/sharp/auto) SET(DEP_BUILD ${BUILD_PREFIX}/sharp-prefix/src/sharp/auto)
IF(NOT ENABLE_OPENMP)
SET(SHARP_OPENMP --disable-openmp)
ENDIF()
ExternalProject_Add(sharp ExternalProject_Add(sharp
URL ${CMAKE_SOURCE_DIR}/external/libsharp-6077806.tar.gz URL ${CMAKE_SOURCE_DIR}/external/libsharp-6077806.tar.gz
PREFIX ${BUILD_PREFIX}/sharp-prefix PREFIX ${BUILD_PREFIX}/sharp-prefix
BUILD_IN_SOURCE 1 BUILD_IN_SOURCE 1
CONFIGURE_COMMAND autoconf && ./configure "CC=${CMAKE_C_COMPILER}" "CXX=${CMAKE_CXX_COMPILER}" --prefix=${DEP_BUILD} CONFIGURE_COMMAND autoconf && ./configure "CC=${CMAKE_C_COMPILER}" "CXX=${CMAKE_CXX_COMPILER}" --prefix=${DEP_BUILD} ${SHARP_OPENMP}
BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} BUILD_COMMAND ${CMAKE_MAKE_PROGRAM}
INSTALL_COMMAND echo "No install" INSTALL_COMMAND echo "No install"
) )