Skip to content

Commit

Permalink
Explicitly use at least C++17 for compilation
Browse files Browse the repository at this point in the history
Signed-off-by: Tin Švagelj <[email protected]>
  • Loading branch information
Caellian committed Dec 9, 2024
1 parent a0c1502 commit 7ac6888
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ endif(BUILD_INTEL_BACKLIGHT)
if(BUILD_TESTS)
# Create a library strictly for testing
add_library(conky_core ${conky_sources} ${optional_sources})
target_compile_features(conky_core PUBLIC cxx_std_17)
add_dependencies(conky_core generated_hdr_files)
target_link_libraries(conky_core ${conky_libs})
add_executable(conky main.cc)
Expand All @@ -418,6 +419,7 @@ if(BUILD_TESTS)
ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
else()
add_executable(conky main.cc ${conky_sources} ${optional_sources})
target_compile_features(conky_core PRIVATE cxx_std_17)
add_dependencies(conky generated_hdr_files)
target_link_libraries(conky ${conky_libs})
endif()
Expand Down
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ file(GLOB mock_sources mock/*.cc)
add_library(Catch2 STATIC catch2/catch_amalgamated.cpp)

add_executable(test-conky test-common.cc ${test_sources})
target_compile_features(test-conky PRIVATE cxx_std_17)
target_include_directories(test-conky
PUBLIC
${CMAKE_SOURCE_DIR}/src
Expand Down

0 comments on commit 7ac6888

Please sign in to comment.