Fixes to support ninja

This commit is contained in:
LAVAUX Guilhem 2020-04-03 19:17:27 +02:00
parent cf90393c36
commit a3f30b5d8f
2 changed files with 11 additions and 8 deletions

View File

@ -56,19 +56,19 @@ if (ENABLE_SHARP)
IF(NOT ENABLE_OPENMP)
SET(SHARP_OPENMP --disable-openmp)
ENDIF()
ExternalProject_Add(sharp
URL ${CMAKE_SOURCE_DIR}/external/libsharp-6077806.tar.gz
PREFIX ${BUILD_PREFIX}/sharp-prefix
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND autoconf && ./configure "CC=${CMAKE_C_COMPILER}" "CXX=${CMAKE_CXX_COMPILER}" --prefix=${DEP_BUILD} ${SHARP_OPENMP}
BUILD_COMMAND ${CMAKE_MAKE_PROGRAM}
INSTALL_COMMAND echo "No install"
)
SET(CUTILS_LIBRARY ${DEP_BUILD}/lib/libc_utils.a)
SET(FFTPACK_LIBRARY ${DEP_BUILD}/lib/libfftpack.a)
SET(SHARP_LIBRARY ${DEP_BUILD}/lib/libsharp.a)
SET(SHARP_LIBRARIES ${SHARP_LIBRARY} ${FFTPACK_LIBRARY} ${CUTILS_LIBRARY})
SET(SHARP_INCLUDE_PATH ${DEP_BUILD}/include)
ExternalProject_Add(sharp
URL ${CMAKE_SOURCE_DIR}/external/libsharp-6077806.tar.gz
PREFIX ${BUILD_PREFIX}/sharp-prefix
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND autoconf && ./configure "CC=${CMAKE_C_COMPILER}" "CXX=${CMAKE_CXX_COMPILER}" --prefix=${DEP_BUILD} ${SHARP_OPENMP}
INSTALL_COMMAND echo "No install"
BUILD_BYPRODUCTS ${SHARP_LIBRARIES}
)
endif (ENABLE_SHARP)
@ -375,6 +375,7 @@ ExternalProject_Add(omptl
BUILD_COMMAND echo "No build"
PATCH_COMMAND patch -p1 -t -N < ${CMAKE_SOURCE_DIR}/external/patch-omptl
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${OMPTL_BUILD_DIR} ${EXT_INSTALL}/include/omptl
BUILD_BYPRODUCTS ${EXT_INSTALL}/include/omptl
)
include_directories(${EXT_INSTALL}/include)
##include_directories(${OMPTL_BUILD_DIR}/src/)

View File

@ -92,11 +92,13 @@ if (BUILD_SHARED_LIBS)
add_library(CosmoTool_static STATIC ${CosmoTool_SRCS} $<TARGET_OBJECTS:CosmoHDF5>)
target_link_libraries(CosmoTool_static)
set_property(TARGET CosmoTool_static PROPERTY POSITION_INDEPENDENT_CODE ON)
add_dependencies(CosmoTool_static ${cosmotool_DEPS})
endif(BUILD_STATIC_LIBS)
else (BUILD_SHARED_LIBS)
add_library(CosmoTool STATIC ${CosmoTool_SRCS} $<TARGET_OBJECTS:CosmoHDF5>)
target_link_libraries(CosmoTool)
set_property(TARGET CosmoTool PROPERTY POSITION_INDEPENDENT_CODE ON)
add_dependencies(CosmoTool ${cosmotool_DEPS})
endif (BUILD_SHARED_LIBS)
IF(NOT COSMOTOOL_PYTHON_PACKAGING)