File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,16 @@ cmake_minimum_required(VERSION 3.0)
22
33project (example)
44
5+ include (cmake/CPM.cmake)
6+ cpmusepackagelock(package-lock)
7+
8+ cpmgetpackage(CheckWarning.cmake)
9+
510add_library (example src/example.cpp)
611target_include_directories (example PUBLIC include )
7- target_compile_options (example PRIVATE -Werror -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wpedantic )
12+ target_check_warning (example)
813
914if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR )
10- include (cmake/CPM.cmake)
11- cpmusepackagelock(package-lock)
1215 cpmgetpackage(Format.cmake)
1316
1417 if (BUILD_TESTING)
@@ -21,7 +24,7 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
2124
2225 add_executable (example_test test /example_test.cpp)
2326 target_link_libraries (example_test PRIVATE example Catch2::Catch2WithMain)
24- target_compile_options (example_test PRIVATE -Werror -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wpedantic )
27+ target_check_warning (example_test)
2528 catch_discover_tests(example_test)
2629 endif ()
2730endif ()
Original file line number Diff line number Diff line change 11# CPM Package Lock
22# This file should be committed to version control
33
4+ # CheckWarning.cmake
5+ CPMDeclarePackage(CheckWarning.cmake
6+ VERSION 1.0.0
7+ GITHUB_REPOSITORY threeal/CheckWarning.cmake
8+ SYSTEM YES
9+ EXCLUDE_FROM_ALL YES
10+ )
411# Format.cmake
512CPMDeclarePackage(Format.cmake
613 VERSION 1.7.3
You can’t perform that action at this time.
0 commit comments