Skip to content

Commit

Permalink
Enable C++ when building examples
Browse files Browse the repository at this point in the history
  • Loading branch information
funbiscuit committed Nov 19, 2023
1 parent a345459 commit 78218d0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ option(TESTS_COV "Run coverage on tests" OFF)
option(BUILD_SINGLE_HEADER "Build single-header version" OFF)
option(BUILD_EXAMPLES "Builds example applications" OFF)

if (${BUILD_TESTS})
# C++ is only used in tests
if (BUILD_TESTS OR BUILD_EXAMPLES)
# C++ is only used in tests and examples
enable_language(CXX)
set(CMAKE_CXX_STANDARD 20)
endif ()

if (${BUILD_TESTS})
if (${TESTS_COV})
include(CodeCoverage)
append_coverage_compiler_flags()
Expand Down

0 comments on commit 78218d0

Please sign in to comment.