Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.4:Update
netgen
0001-Optionally-use-system-provided-Catch2.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Optionally-use-system-provided-Catch2.patch of Package netgen
From 2aa63672c1ec26a96a4d0ce111370e333fb78e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de> Date: Wed, 3 Mar 2021 18:45:22 +0100 Subject: [PATCH] Optionally use system provided Catch2 --- CMakeLists.txt | 12 +++++++++++- cmake/SuperBuild.cmake | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e5ade9b..036ccc01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,8 @@ option( DEBUG_LOG "Enable more debug output (may increase computation time) - on option( CHECK_RANGE "Check array range access, automatically enabled if built in debug mode" OFF) option( BUILD_STUB_FILES "Build stub files for better autocompletion" ON) option( BUILD_FOR_CONDA "Link python libraries only to executables" OFF) +option( DOWNLOAD_DEPENDENCIES "Download any dependencies not found on the system" ON) + option( USE_SUPERBUILD "use ccache" ON) option( TRACE_MEMORY "Enable memory tracing" OFF) @@ -378,7 +380,16 @@ enable_testing() include(CTest) if(ENABLE_UNIT_TESTS) - include(${CMAKE_CURRENT_LIST_DIR}/cmake/external_projects/catch.cmake) + if(DOWNLOAD_DEPENDENCIES) + include(${CMAKE_CURRENT_LIST_DIR}/cmake/external_projects/catch.cmake) + else(DOWNLOAD_DEPENDENCIES) + find_package(Catch2 REQUIRED) + set_target_properties(Catch2::Catch2 PROPERTIES IMPORTED_GLOBAL TRUE) + add_library(project_catch ALIAS Catch2::Catch2) + get_target_property(_CATCH_INCLUDE_DIR_BASE Catch2::Catch2 INTERFACE_INCLUDE_DIRECTORIES) + string(CONCAT CATCH_INCLUDE_DIR ${_CATCH_INCLUDE_DIR_BASE} "/catch2") + endif(DOWNLOAD_DEPENDENCIES) + message(STATUS "Catch2 include dir: ${CATCH_INCLUDE_DIR}") endif(ENABLE_UNIT_TESTS) diff --git a/cmake/SuperBuild.cmake b/cmake/SuperBuild.cmake index 6e9600df..da6e3a96 100644 --- a/cmake/SuperBuild.cmake +++ b/cmake/SuperBuild.cmake @@ -139,6 +139,7 @@ set_vars( NETGEN_CMAKE_ARGS CMAKE_PREFIX_PATH CMAKE_INSTALL_PREFIX ENABLE_UNIT_TESTS + DOWNLOAD_DEPENDENCIES ENABLE_CPP_CORE_GUIDELINES_CHECK USE_SPDLOG DEBUG_LOG -- 2.30.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor