Update for macmini

This commit is contained in:
guilhem.lavaux@iap.fr 2023-12-03 20:29:56 +01:00
parent 39fe922143
commit 2aa7c96e48
2 changed files with 9 additions and 5 deletions

View File

@ -37,11 +37,12 @@ CHECK_CHANGE_STATE(INTERNAL_DLIB DLIB_INCLUDE_DIR DLIB_LIBRARIES)
IF(ENABLE_OPENMP) IF(ENABLE_OPENMP)
IF (NOT OPENMP_FOUND) IF (NOT OPENMP_FOUND)
MESSAGE(ERROR "No known compiler option for enabling OpenMP") MESSAGE(ERROR "No known compiler option for enabling OpenMP")
ENDIF(NOT OPENMP_FOUND) ELSE()
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_C_FLAGS}") SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_C_FLAGS}")
ENDIF(NOT OPENMP_FOUND)
ENDIF(ENABLE_OPENMP) ENDIF(ENABLE_OPENMP)
@ -55,21 +56,24 @@ 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) IF(NOT ENABLE_OPENMP)
SET(SHARP_OPENMP --disable-openmp) SET(SHARP_OPENMP --disable-openmp)
ELSE()
SET(SHARP_OPENMP)
ENDIF() ENDIF()
SET(CUTILS_LIBRARY ${DEP_BUILD}/lib/libc_utils.a) SET(CUTILS_LIBRARY ${DEP_BUILD}/lib/libc_utils.a)
SET(FFTPACK_LIBRARY ${DEP_BUILD}/lib/libfftpack.a) SET(FFTPACK_LIBRARY ${DEP_BUILD}/lib/libfftpack.a)
SET(SHARP_LIBRARY ${DEP_BUILD}/lib/libsharp.a) SET(SHARP_LIBRARY ${DEP_BUILD}/lib/libsharp.a)
SET(SHARP_LIBRARIES ${SHARP_LIBRARY} ${FFTPACK_LIBRARY} ${CUTILS_LIBRARY}) SET(SHARP_LIBRARIES ${SHARP_LIBRARY} ${FFTPACK_LIBRARY} ${CUTILS_LIBRARY})
SET(SHARP_INCLUDE_PATH ${DEP_BUILD}/include) SET(SHARP_INCLUDE_PATH ${DEP_BUILD}/include)
message(STATUS "Flags: ${CMAKE_C_FLAGS}")
ExternalProject_Add(sharp ExternalProject_Add(sharp
URL ${CMAKE_SOURCE_DIR}/external/libsharp-6077806.tar.gz URL ${CMAKE_SOURCE_DIR}/external/libsharp-8d51946.tar.gz
PREFIX ${BUILD_PREFIX}/sharp-prefix PREFIX ${BUILD_PREFIX}/sharp-prefix
BUILD_IN_SOURCE 1 BUILD_IN_SOURCE 1
CONFIGURE_COMMAND CONFIGURE_COMMAND
cp -f ${CMAKE_SOURCE_DIR}/external/config.guess . && cp -f ${CMAKE_SOURCE_DIR}/external/config.guess . &&
cp -f ${CMAKE_SOURCE_DIR}/external/config.sub . && cp -f ${CMAKE_SOURCE_DIR}/external/config.sub . &&
autoconf && autoconf &&
./configure "CC=${CMAKE_C_COMPILER}" "CXX=${CMAKE_CXX_COMPILER}" --prefix=${DEP_BUILD} ${SHARP_OPENMP} ./configure "CC=${CMAKE_C_COMPILER}" "CXX=${CMAKE_CXX_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS}" "LDFLAGS=${CMAKE_EXE_LINKER_FLAGS}" --prefix=${DEP_BUILD} ${SHARP_OPENMP}
INSTALL_COMMAND echo "No install" INSTALL_COMMAND echo "No install"
BUILD_BYPRODUCTS ${SHARP_LIBRARIES} BUILD_BYPRODUCTS ${SHARP_LIBRARIES}
) )

BIN
external/libsharp-8d51946.tar.gz vendored Normal file

Binary file not shown.