Skip to content

Commit 3742e8f

Browse files
committed
Add cmake variable for controlling uvgRTP prints
1 parent e014dcd commit 3742e8f

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

CMakePresets.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"CHECK_PC_MD5": false,
2121
"ENABLE_CI_TESTING": false,
2222
"ENABLE_MY_TESTING": false,
23-
"ENABLE_V3CRTP": false
23+
"ENABLE_V3CRTP": false,
24+
"ENABLE_UVGRTP_PRINTS": true
2425
}
2526
},
2627
{
@@ -31,7 +32,8 @@
3132
"CMAKE_BUILD_TYPE": "Release",
3233
"ENABLE_TESTING": true,
3334
"ENABLE_CI_TESTING": true,
34-
"CMAKE_CXX_FLAGS_RELEASE": "-O3 -DNDEBUG"
35+
"CMAKE_CXX_FLAGS_RELEASE": "-O3 -DNDEBUG",
36+
"ENABLE_UVGRTP_PRINTS": false
3537
}
3638
},
3739
{

src/app/dependencies/FindDependencies.cmake

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,14 @@ if(ENABLE_V3CRTP)
3636
set(UVGV3CRTP_DISABLE_TESTS ON CACHE BOOL "" FORCE)
3737
set(UVGV3CRTP_DISABLE_EXAMPLES ON CACHE BOOL "" FORCE)
3838
set(UVGV3CRTP_DISABLE_INSTALL OFF CACHE BOOL "" FORCE)
39-
39+
40+
# Disable uvgRTP prints unless using a debug prints
41+
if(ENABLE_UVGRTP_PRINTS)
42+
set(UVGRTP_DISABLE_PRINTS OFF CACHE BOOL "" FORCE)
43+
else()
44+
set(UVGRTP_DISABLE_PRINTS ON CACHE BOOL "" FORCE)
45+
endif()
46+
4047
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/dependencies/uvgV3CRTP)
4148

4249
include_directories(${uvgv3crtp_SOURCE_DIR}/include)

0 commit comments

Comments
 (0)