Skip to content

Commit 6920cf0

Browse files
committed
Add logging option
1 parent 3d55ce5 commit 6920cf0

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

CMakeLists.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,6 @@ include(FeatureSummary)
102102
option(ENABLE_LOGGING "Enables logging" ON)
103103
add_feature_info(ENABLE_LOGGING ENABLE_LOGGING "Enables logging")
104104

105-
option(ENABLE_CADETTEST_LOGGING "Enable logging for CadetTest" OFF)
106-
add_feature_info(ENABLE_CADETTEST_LOGGING ENABLE_CADETTEST_LOGGING "Enables logging in Testsets")
107-
108105
option(ENABLE_BENCHMARK "Enables benchmark mode (fine-grained timing)" OFF)
109106
add_feature_info(ENABLE_BENCHMARK ENABLE_BENCHMARK "Enables benchmark mode (fine-grained timing)")
110107

@@ -140,6 +137,9 @@ add_feature_info(ENABLE_CADET_TOOLS ENABLE_CADET_TOOLS "Build CADET tools")
140137
option(ENABLE_TESTS "Build CADET tests" OFF)
141138
add_feature_info(ENABLE_TESTS ENABLE_TESTS "Build CADET tests")
142139

140+
option(ENABLE_CADETTEST_LOGGING "Enable logging for CadetTest" OFF)
141+
add_feature_info(ENABLE_CADETTEST_LOGGING ENABLE_CADETTEST_LOGGING "Enables logging in Testsets")
142+
143143
option(ENABLE_PACKAGED_SUNDIALS "Use packaged SUNDIALS code" ON)
144144
add_feature_info(ENABLE_PACKAGED_SUNDIALS ENABLE_PACKAGED_SUNDIALS "Use packaged SUNDIALS code")
145145

@@ -434,6 +434,10 @@ endif()
434434
find_package(Eigen3 REQUIRED NO_MODULE)
435435
set(EIGEN_TARGET "Eigen3::Eigen")
436436

437+
if (ENABLE_CADETTEST_LOGGING)
438+
439+
endif()
440+
437441
set(IPO_AVAILABLE OFF)
438442
if (ENABLE_IPO)
439443
include(CheckIPOSupported)
@@ -475,6 +479,10 @@ else()
475479
target_compile_definitions(CADET::CompileOptions INTERFACE CADET_LOGLEVEL_MIN=Warning NDEBUG)
476480
endif()
477481

482+
if(ENABLE_CADETTEST_LOGGING)
483+
target_compile_definitions(CADET::CompileOptions INTERFACE ENABLE_CADETTEST_LOGGING)
484+
endif()
485+
478486
if (ENABLE_BENCHMARK)
479487
target_compile_definitions(CADET::CompileOptions INTERFACE CADET_BENCHMARK_MODE)
480488
endif()

CMakeSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"configurationType": "Debug",
5151
"inheritEnvironments": [ "msvc_x64_x64" ],
5252
"buildRoot": "${env.BUILDROOT}_DEBUG_with_Tests",
53-
"cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x64-windows-static -DENABLE_STATIC_LINK_LAPACK=ON -DENABLE_STATIC_LINK_DEPS=ON -DENABLE_TESTS=ON -DENABLE_CADETTEST_LOGGING=ON -DNUM_MAX_AD_DIRS=160 -DENABLE_ANALYTIC_JACOBIAN_CHECK=OFF --fresh",
53+
"cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x64-windows-static -DENABLE_STATIC_LINK_LAPACK=ON -DENABLE_STATIC_LINK_DEPS=ON -DENABLE_TESTS=ON -DENABLE_CADETTEST_LOGGING=OFF -DNUM_MAX_AD_DIRS=160 -DENABLE_ANALYTIC_JACOBIAN_CHECK=OFF --fresh",
5454
"buildCommandArgs": "-m -v:minimal",
5555
"variables": [
5656
{

0 commit comments

Comments
 (0)