Skip to content

Commit 7ac6888

Browse files
committed
Explicitly use at least C++17 for compilation
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
1 parent a0c1502 commit 7ac6888

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ endif(BUILD_INTEL_BACKLIGHT)
407407
if(BUILD_TESTS)
408408
# Create a library strictly for testing
409409
add_library(conky_core ${conky_sources} ${optional_sources})
410+
target_compile_features(conky_core PUBLIC cxx_std_17)
410411
add_dependencies(conky_core generated_hdr_files)
411412
target_link_libraries(conky_core ${conky_libs})
412413
add_executable(conky main.cc)
@@ -418,6 +419,7 @@ if(BUILD_TESTS)
418419
ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
419420
else()
420421
add_executable(conky main.cc ${conky_sources} ${optional_sources})
422+
target_compile_features(conky_core PRIVATE cxx_std_17)
421423
add_dependencies(conky generated_hdr_files)
422424
target_link_libraries(conky ${conky_libs})
423425
endif()

tests/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ file(GLOB mock_sources mock/*.cc)
2727
add_library(Catch2 STATIC catch2/catch_amalgamated.cpp)
2828

2929
add_executable(test-conky test-common.cc ${test_sources})
30+
target_compile_features(test-conky PRIVATE cxx_std_17)
3031
target_include_directories(test-conky
3132
PUBLIC
3233
${CMAKE_SOURCE_DIR}/src

0 commit comments

Comments
 (0)