2016-12-22 23:12:11 +05:00
|
|
|
include (ExternalProject)
|
|
|
|
|
2021-10-27 19:50:07 +05:00
|
|
|
option( BUILD_ZLIB "Build and link static version of zlib (usefull for pip binaries)" OFF )
|
|
|
|
option( BUILD_OCC "Build and link static version of occ (usefull for pip binaries)" OFF )
|
2016-12-22 23:12:11 +05:00
|
|
|
set_property (DIRECTORY PROPERTY EP_PREFIX dependencies)
|
|
|
|
|
|
|
|
set (NETGEN_DEPENDENCIES)
|
|
|
|
set (LAPACK_DEPENDENCIES)
|
2017-02-10 15:33:05 +05:00
|
|
|
set (NETGEN_CMAKE_ARGS "" CACHE INTERNAL "")
|
2021-10-27 19:50:07 +05:00
|
|
|
set (SUBPROJECT_CMAKE_ARGS "" CACHE INTERNAL "")
|
2021-11-04 18:44:14 +05:00
|
|
|
|
2021-10-27 19:50:07 +05:00
|
|
|
set (SUBPROJECT_ARGS
|
|
|
|
LIST_SEPARATOR |
|
|
|
|
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/dependencies
|
|
|
|
)
|
2021-11-04 18:44:14 +05:00
|
|
|
|
|
|
|
# only show output on failure in ci-builds
|
2021-11-08 19:52:52 +05:00
|
|
|
if(DEFINED ENV{CI})
|
2021-11-02 14:39:16 +05:00
|
|
|
set (SUBPROJECT_ARGS
|
2021-11-04 18:44:14 +05:00
|
|
|
LOG_DOWNLOAD ON
|
|
|
|
LOG_BUILD ON
|
|
|
|
LOG_INSTALL ON
|
|
|
|
LOG_CONFIGURE ON
|
2021-10-27 19:50:07 +05:00
|
|
|
)
|
2021-11-04 18:44:14 +05:00
|
|
|
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.14.0")
|
|
|
|
set (SUBPROJECT_ARGS
|
|
|
|
${SUBPROJECT_ARGS}
|
|
|
|
LOG_OUTPUT_ON_FAILURE ON
|
|
|
|
LOG_MERGED_STDOUTERR ON
|
|
|
|
)
|
|
|
|
endif()
|
2021-10-27 19:50:07 +05:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
set (NETGEN_CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} )
|
2016-12-22 23:12:11 +05:00
|
|
|
|
|
|
|
macro(set_vars VAR_OUT)
|
|
|
|
foreach(varname ${ARGN})
|
|
|
|
if(NOT "${${varname}}" STREQUAL "")
|
2021-10-27 19:50:07 +05:00
|
|
|
string(REPLACE ";" "|" varvalue "${${varname}}" )
|
|
|
|
set(${VAR_OUT} "${${VAR_OUT}};-D${varname}=${varvalue}" CACHE INTERNAL "")
|
2016-12-22 23:12:11 +05:00
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
endmacro()
|
2021-10-27 19:50:07 +05:00
|
|
|
#######################################################################
|
|
|
|
|
|
|
|
set_vars(SUBPROJECT_CMAKE_ARGS CMAKE_OSX_DEPLOYMENT_TARGET)
|
|
|
|
set_vars(SUBPROJECT_CMAKE_ARGS CMAKE_OSX_SYSROOT)
|
|
|
|
set_vars(SUBPROJECT_CMAKE_ARGS CMAKE_C_COMPILER)
|
|
|
|
set_vars(SUBPROJECT_CMAKE_ARGS CMAKE_CXX_COMPILER)
|
|
|
|
set_vars(SUBPROJECT_CMAKE_ARGS CMAKE_BUILD_TYPE)
|
|
|
|
|
2021-11-08 20:38:43 +05:00
|
|
|
set(SUBPROJECT_CMAKE_ARGS "${SUBPROJECT_CMAKE_ARGS};-DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}" CACHE INTERNAL "")
|
2021-10-27 19:50:07 +05:00
|
|
|
set(SUBPROJECT_CMAKE_ARGS "${SUBPROJECT_CMAKE_ARGS};-DCMAKE_POSITION_INDEPENDENT_CODE=ON" CACHE INTERNAL "")
|
|
|
|
|
|
|
|
if(USE_CCACHE)
|
|
|
|
find_program(CCACHE_FOUND NAMES ccache ccache.bat)
|
|
|
|
if(CCACHE_FOUND)
|
|
|
|
set(SUBPROJECT_CMAKE_ARGS "${SUBPROJECT_CMAKE_ARGS};-DCMAKE_CXX_COMPILER_LAUNCHER=${CCACHE_FOUND}" CACHE INTERNAL "")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2016-12-22 23:12:11 +05:00
|
|
|
#######################################################################
|
2020-03-12 01:30:43 +05:00
|
|
|
set (DEPS_DOWNLOAD_URL "https://github.com/NGSolve/ngsolve_dependencies/releases/download/v1.0.0" CACHE STRING INTERNAL)
|
2021-09-02 17:52:34 +05:00
|
|
|
set (OCC_DOWNLOAD_URL_WIN "${DEPS_DOWNLOAD_URL}/occ75_win64.zip" CACHE STRING INTERNAL)
|
2020-03-12 01:30:43 +05:00
|
|
|
set (TCLTK_DOWNLOAD_URL_WIN "${DEPS_DOWNLOAD_URL}/tcltk_win64.zip" CACHE STRING INTERNAL)
|
|
|
|
set (ZLIB_DOWNLOAD_URL_WIN "${DEPS_DOWNLOAD_URL}/zlib_win64.zip" CACHE STRING INTERNAL)
|
|
|
|
set (CGNS_DOWNLOAD_URL_WIN "${DEPS_DOWNLOAD_URL}/cgns_win64.zip" CACHE STRING INTERNAL)
|
|
|
|
set (CGNS_DOWNLOAD_URL_MAC "${DEPS_DOWNLOAD_URL}/cgns_mac.zip" CACHE STRING INTERNAL)
|
2016-12-22 23:12:11 +05:00
|
|
|
|
2021-10-27 19:50:07 +05:00
|
|
|
|
2017-01-10 16:01:48 +05:00
|
|
|
if(UNIX)
|
2017-01-10 22:45:49 +05:00
|
|
|
message("Checking for write permissions in install directory...")
|
2017-05-30 00:19:34 +05:00
|
|
|
execute_process(COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX})
|
|
|
|
execute_process(COMMAND test -w ${CMAKE_INSTALL_PREFIX} RESULT_VARIABLE res)
|
2017-01-10 22:45:49 +05:00
|
|
|
if(res)
|
2017-01-31 16:20:27 +05:00
|
|
|
message(WARNING "No write access at install directory, please set correct permissions")
|
2017-01-10 16:01:48 +05:00
|
|
|
endif()
|
|
|
|
endif(UNIX)
|
2016-12-22 23:12:11 +05:00
|
|
|
|
2021-10-27 19:50:07 +05:00
|
|
|
if(USE_OCC)
|
|
|
|
if(BUILD_OCC)
|
|
|
|
set(OCC_DIR ${CMAKE_CURRENT_BINARY_DIR}/dependencies/occ)
|
|
|
|
|
|
|
|
ExternalProject_Add(project_freetype
|
|
|
|
URL https://github.com/freetype/freetype/archive/refs/tags/VER-2-11-0.zip
|
|
|
|
URL_MD5 f58ef6a7affb7794c4f125d98e0e6a25
|
|
|
|
DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies
|
|
|
|
${SUBPROJECT_ARGS}
|
|
|
|
CMAKE_ARGS
|
|
|
|
-DCMAKE_INSTALL_PREFIX=${OCC_DIR}
|
|
|
|
-DBUILD_SHARED_LIBS:BOOL=OFF
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=TRUE
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_PNG=TRUE
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_BrotliDec=TRUE
|
|
|
|
${SUBPROJECT_CMAKE_ARGS}
|
|
|
|
UPDATE_COMMAND ""
|
|
|
|
)
|
|
|
|
|
|
|
|
ExternalProject_Add(project_occ
|
|
|
|
DEPENDS project_freetype
|
|
|
|
URL https://github.com/Open-Cascade-SAS/OCCT/archive/refs/tags/V7_5_0.zip
|
|
|
|
URL_MD5 a24e6d3cf2d24bf9347d2d4aee9dd80a
|
|
|
|
DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies
|
|
|
|
${SUBPROJECT_ARGS}
|
|
|
|
CMAKE_ARGS
|
|
|
|
-DCMAKE_INSTALL_PREFIX=${OCC_DIR}
|
|
|
|
-DCMAKE_PREFIX_PATH=${OCC_DIR}
|
|
|
|
-DBUILD_LIBRARY_TYPE:STRING=Static
|
|
|
|
-DBUILD_MODULE_FoundationClasses:BOOL=ON
|
|
|
|
-DBUILD_MODULE_ModelingData:BOOL=ON
|
|
|
|
-DBUILD_MODULE_ModelingAlgorithms:BOOL=ON
|
|
|
|
-DBUILD_MODULE_Visualization:BOOL=ON
|
|
|
|
-DBUILD_MODULE_DataExchange:BOOL=ON
|
|
|
|
-DBUILD_MODULE_ApplicationFramework:BOOL=OFF
|
|
|
|
-DBUILD_MODULE_Draw:BOOL=OFF
|
|
|
|
-DUSE_FREETYPE=OFF
|
|
|
|
${SUBPROJECT_CMAKE_ARGS}
|
|
|
|
UPDATE_COMMAND ""
|
|
|
|
)
|
|
|
|
|
|
|
|
list(APPEND NETGEN_DEPENDENCIES project_occ)
|
|
|
|
set(OpenCascade_ROOT ${OCC_DIR})
|
|
|
|
else(BUILD_OCC)
|
|
|
|
if(WIN32 AND NOT OCC_INCLUDE_DIR AND NOT OpenCASCADE_DIR)
|
|
|
|
# we can download prebuilt occ binaries for windows
|
|
|
|
ExternalProject_Add(win_download_occ
|
|
|
|
${SUBPROJECT_ARGS}
|
|
|
|
URL ${OCC_DOWNLOAD_URL_WIN}
|
|
|
|
UPDATE_COMMAND "" # Disable update
|
|
|
|
BUILD_IN_SOURCE 1
|
|
|
|
CONFIGURE_COMMAND ""
|
|
|
|
BUILD_COMMAND ""
|
|
|
|
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory . ${CMAKE_INSTALL_PREFIX}
|
|
|
|
)
|
|
|
|
list(APPEND NETGEN_DEPENDENCIES win_download_occ)
|
|
|
|
else()
|
|
|
|
find_package(OpenCascade NAMES OpenCasCade OpenCASCADE opencascade REQUIRED)
|
|
|
|
endif()
|
|
|
|
endif(BUILD_OCC)
|
|
|
|
endif(USE_OCC)
|
|
|
|
|
|
|
|
if(BUILD_ZLIB)
|
|
|
|
set(ZLIB_DIR ${CMAKE_CURRENT_BINARY_DIR}/dependencies/zlib)
|
|
|
|
ExternalProject_Add(project_zlib
|
|
|
|
${SUBPROJECT_ARGS}
|
|
|
|
URL https://github.com/madler/zlib/archive/refs/tags/v1.2.11.zip
|
|
|
|
URL_MD5 9d6a627693163bbbf3f26403a3a0b0b1
|
|
|
|
DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies
|
|
|
|
CMAKE_ARGS
|
|
|
|
-DCMAKE_INSTALL_PREFIX=${ZLIB_DIR}
|
|
|
|
${SUBPROJECT_CMAKE_ARGS}
|
|
|
|
UPDATE_COMMAND "" # Disable update
|
|
|
|
BUILD_IN_SOURCE 1
|
|
|
|
)
|
|
|
|
|
|
|
|
list(APPEND NETGEN_DEPENDENCIES project_zlib)
|
|
|
|
list(APPEND NETGEN_CMAKE_PREFIX_PATH ${ZLIB_DIR})
|
|
|
|
if(WIN32)
|
|
|
|
# force linking the static library
|
|
|
|
set(ZLIB_INCLUDE_DIRS ${ZLIB_DIR}/include)
|
|
|
|
set(ZLIB_LIBRARIES ${ZLIB_DIR}/lib/zlibstatic.lib)
|
|
|
|
endif(WIN32)
|
|
|
|
else()
|
|
|
|
include(cmake/external_projects/zlib.cmake)
|
|
|
|
endif()
|
2016-12-22 23:12:11 +05:00
|
|
|
|
|
|
|
#######################################################################
|
|
|
|
if (USE_PYTHON)
|
2017-01-09 23:16:53 +05:00
|
|
|
find_path(PYBIND_INCLUDE_DIR pybind11/pybind11.h PATHS ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies/pybind11/include NO_DEFAULT_PATH)
|
2018-01-25 18:01:57 +05:00
|
|
|
set(NG_INSTALL_PYBIND ON)
|
2016-12-22 23:12:11 +05:00
|
|
|
if( NOT PYBIND_INCLUDE_DIR )
|
2017-01-20 14:16:48 +05:00
|
|
|
# if the pybind submodule is missing, try to initialize and update all submodules
|
2016-12-22 23:12:11 +05:00
|
|
|
execute_process(COMMAND git submodule update --init --recursive WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
2018-01-25 18:01:57 +05:00
|
|
|
find_path(PYBIND_INCLUDE_DIR pybind11/pybind11.h PATHS ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies/pybind11/include NO_DEFAULT_PATH)
|
2016-12-22 23:12:11 +05:00
|
|
|
endif( NOT PYBIND_INCLUDE_DIR )
|
|
|
|
if( PYBIND_INCLUDE_DIR )
|
|
|
|
message("-- Found Pybind11: ${PYBIND_INCLUDE_DIR}")
|
|
|
|
else( PYBIND_INCLUDE_DIR )
|
|
|
|
message(FATAL_ERROR "Could NOT find pybind11!")
|
|
|
|
endif( PYBIND_INCLUDE_DIR )
|
2017-01-09 18:02:50 +05:00
|
|
|
find_package(PythonInterp 3 REQUIRED)
|
|
|
|
find_package(PythonLibs 3 REQUIRED)
|
2016-12-22 23:12:11 +05:00
|
|
|
|
2018-01-25 18:01:57 +05:00
|
|
|
set_vars(NETGEN_CMAKE_ARGS
|
|
|
|
PYTHON_INCLUDE_DIRS
|
|
|
|
PYTHON_LIBRARIES
|
|
|
|
PYTHON_EXECUTABLE
|
|
|
|
PYTHON_VERSION
|
|
|
|
PYBIND_INCLUDE_DIR
|
|
|
|
NG_INSTALL_PYBIND
|
|
|
|
)
|
2016-12-22 23:12:11 +05:00
|
|
|
endif (USE_PYTHON)
|
|
|
|
|
|
|
|
#######################################################################
|
|
|
|
|
|
|
|
if(USE_GUI)
|
2017-02-23 18:45:25 +05:00
|
|
|
include(cmake/external_projects/tcltk.cmake)
|
2016-12-22 23:12:11 +05:00
|
|
|
endif(USE_GUI)
|
|
|
|
|
2020-03-11 19:53:08 +05:00
|
|
|
if(USE_CGNS)
|
|
|
|
include(cmake/external_projects/cgns.cmake)
|
|
|
|
endif(USE_CGNS)
|
|
|
|
|
2017-02-23 18:45:25 +05:00
|
|
|
#######################################################################
|
|
|
|
if(USE_MPI)
|
2017-03-10 20:01:00 +05:00
|
|
|
if(UNIX)
|
2019-10-01 14:48:38 +05:00
|
|
|
if (METIS_DIR)
|
|
|
|
message(STATUS "Using external METIS at: ${METIS_DIR}")
|
|
|
|
else (METIS_DIR)
|
|
|
|
message(STATUS "Looking for system METIS")
|
|
|
|
find_package(METIS QUIET)
|
|
|
|
if(NOT METIS_FOUND)
|
|
|
|
message(WARNING "Could not find METIS, it will be built from source (this might conflict with NGSolve MUMPS)!")
|
|
|
|
include(cmake/external_projects/metis.cmake)
|
|
|
|
endif(NOT METIS_FOUND)
|
|
|
|
endif(METIS_DIR)
|
2017-03-10 20:01:00 +05:00
|
|
|
else(UNIX)
|
|
|
|
find_package(METIS REQUIRED)
|
|
|
|
endif(UNIX)
|
2017-02-23 18:45:25 +05:00
|
|
|
endif(USE_MPI)
|
|
|
|
|
|
|
|
|
2016-12-22 23:12:11 +05:00
|
|
|
#######################################################################
|
|
|
|
# propagate cmake variables to Netgen subproject
|
|
|
|
set_vars( NETGEN_CMAKE_ARGS
|
2017-01-26 18:52:15 +05:00
|
|
|
CMAKE_SHARED_LINKER_FLAGS
|
|
|
|
CMAKE_SHARED_LINKER_FLAGS_RELEASE
|
|
|
|
CMAKE_CXX_FLAGS
|
|
|
|
CMAKE_CXX_FLAGS_RELEASE
|
|
|
|
|
2016-12-22 23:12:11 +05:00
|
|
|
USE_GUI
|
|
|
|
USE_PYTHON
|
|
|
|
USE_MPI
|
|
|
|
USE_VT
|
|
|
|
USE_VTUNE
|
|
|
|
USE_NUMA
|
|
|
|
USE_CCACHE
|
|
|
|
USE_NATIVE_ARCH
|
|
|
|
USE_OCC
|
2017-02-03 19:28:59 +05:00
|
|
|
USE_MPEG
|
2017-09-22 14:06:00 +05:00
|
|
|
USE_JPEG
|
2020-03-11 15:48:05 +05:00
|
|
|
USE_CGNS
|
2017-05-30 00:19:34 +05:00
|
|
|
USE_INTERNAL_TCL
|
2017-02-16 19:01:16 +05:00
|
|
|
INSTALL_PROFILES
|
2016-12-22 23:12:11 +05:00
|
|
|
INTEL_MIC
|
2017-05-30 00:19:34 +05:00
|
|
|
CMAKE_INSTALL_PREFIX
|
2018-12-03 20:28:04 +05:00
|
|
|
ENABLE_UNIT_TESTS
|
2018-12-08 20:10:29 +05:00
|
|
|
ENABLE_CPP_CORE_GUIDELINES_CHECK
|
2018-12-28 17:43:15 +05:00
|
|
|
USE_SPDLOG
|
|
|
|
DEBUG_LOG
|
2019-01-02 20:30:55 +05:00
|
|
|
CHECK_RANGE
|
2020-11-21 19:49:07 +05:00
|
|
|
TRACE_MEMORY
|
2019-06-30 15:52:08 +05:00
|
|
|
BUILD_STUB_FILES
|
2019-11-27 00:26:18 +05:00
|
|
|
BUILD_FOR_CONDA
|
2020-10-01 16:35:53 +05:00
|
|
|
NG_COMPILE_FLAGS
|
2021-10-27 19:50:07 +05:00
|
|
|
OpenCascade_ROOT
|
|
|
|
ZLIB_INCLUDE_DIRS
|
|
|
|
ZLIB_LIBRARIES
|
2016-12-22 23:12:11 +05:00
|
|
|
)
|
|
|
|
|
2017-02-10 15:33:05 +05:00
|
|
|
# propagate all variables set on the command line using cmake -DFOO=BAR
|
|
|
|
# to Netgen subproject
|
|
|
|
get_cmake_property(CACHE_VARS CACHE_VARIABLES)
|
|
|
|
foreach(CACHE_VAR ${CACHE_VARS})
|
|
|
|
get_property(CACHE_VAR_HELPSTRING CACHE ${CACHE_VAR} PROPERTY HELPSTRING)
|
|
|
|
if(CACHE_VAR_HELPSTRING STREQUAL "No help, variable specified on the command line.")
|
|
|
|
get_property(CACHE_VAR_TYPE CACHE ${CACHE_VAR} PROPERTY TYPE)
|
2021-10-27 19:50:07 +05:00
|
|
|
string(REPLACE ";" "|" varvalue "${${CACHE_VAR}}" )
|
|
|
|
set(NETGEN_CMAKE_ARGS ${NETGEN_CMAKE_ARGS};-D${CACHE_VAR}:${CACHE_VAR_TYPE}=${varvalue} CACHE INTERNAL "")
|
2017-02-10 15:33:05 +05:00
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
|
2017-01-10 16:39:12 +05:00
|
|
|
if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles")
|
|
|
|
set(NETGEN_BUILD_COMMAND $(MAKE) --silent )
|
|
|
|
else()
|
|
|
|
set(NETGEN_BUILD_COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/netgen --config ${CMAKE_BUILD_TYPE})
|
|
|
|
endif()
|
|
|
|
|
2021-06-04 18:57:15 +05:00
|
|
|
|
2021-10-27 19:50:07 +05:00
|
|
|
string(REPLACE ";" "|" NETGEN_CMAKE_PREFIX_PATH_ALT_SEP "${NETGEN_CMAKE_PREFIX_PATH}")
|
2016-12-22 23:12:11 +05:00
|
|
|
ExternalProject_Add (netgen
|
2021-10-27 19:50:07 +05:00
|
|
|
${SUBPROJECT_ARGS}
|
2016-12-22 23:12:11 +05:00
|
|
|
DEPENDS ${NETGEN_DEPENDENCIES}
|
|
|
|
SOURCE_DIR ${PROJECT_SOURCE_DIR}
|
2021-10-27 19:50:07 +05:00
|
|
|
CMAKE_ARGS
|
|
|
|
-DUSE_SUPERBUILD=OFF
|
|
|
|
${NETGEN_CMAKE_ARGS}
|
|
|
|
${SUBPROJECT_CMAKE_ARGS}
|
|
|
|
-DCMAKE_PREFIX_PATH=${NETGEN_CMAKE_PREFIX_PATH_ALT_SEP}
|
2016-12-22 23:12:11 +05:00
|
|
|
INSTALL_COMMAND ""
|
|
|
|
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/netgen
|
2017-01-10 16:39:12 +05:00
|
|
|
BUILD_COMMAND ${NETGEN_BUILD_COMMAND}
|
2016-12-22 23:12:11 +05:00
|
|
|
STEP_TARGETS build
|
|
|
|
)
|
|
|
|
|
2017-01-20 14:16:48 +05:00
|
|
|
# Check if the git submodules (i.e. pybind11) are up to date
|
|
|
|
# in case, something is wrong, emit a warning but continue
|
|
|
|
ExternalProject_Add_Step(netgen check_submodules
|
2017-05-30 00:19:34 +05:00
|
|
|
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/check_submodules.cmake
|
2017-01-20 14:16:48 +05:00
|
|
|
DEPENDERS install # Steps on which this step depends
|
|
|
|
)
|
|
|
|
|
|
|
|
# Due to 'ALWAYS 1', this step is always run which also forces a build of
|
|
|
|
# the Netgen subproject
|
|
|
|
ExternalProject_Add_Step(netgen check_submodules1
|
2017-05-30 00:19:34 +05:00
|
|
|
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/check_submodules.cmake
|
2017-01-20 14:16:48 +05:00
|
|
|
DEPENDEES configure # Steps on which this step depends
|
|
|
|
DEPENDERS build # Steps that depend on this step
|
|
|
|
ALWAYS 1 # No stamp file, step always runs
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2019-12-10 22:01:44 +05:00
|
|
|
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build . --target install --config ${CMAKE_BUILD_TYPE} WORKING_DIRECTORY \"${CMAKE_CURRENT_BINARY_DIR}/netgen\")")
|
2016-12-22 23:12:11 +05:00
|
|
|
|
|
|
|
add_custom_target(test_netgen
|
|
|
|
${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/netgen
|
|
|
|
--target test
|
|
|
|
--config ${CMAKE_BUILD_TYPE}
|
|
|
|
)
|