Skip to content

Commit

Permalink
update CMakeLists.txt and CMakePresets.json
Browse files Browse the repository at this point in the history
  • Loading branch information
AmrElsayyad authored and lukka committed Apr 28, 2024
1 parent 04b81ea commit e59b7ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# CMakeLists.txt
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.15)
project(cpp_template)

# Find dependencies provided by vcpkg (via vcpkg.cmake)
Expand All @@ -9,13 +9,13 @@ find_package(fmt CONFIG REQUIRED)
# main target
add_executable(main)
target_sources(main PRIVATE src/main.cpp)
target_link_libraries(main PRIVATE unofficial::sqlite3::sqlite3 fmt::fmt)
set_property(TARGET main PROPERTY CXX_STANDARD 20)
target_link_libraries(main PRIVATE unofficial::sqlite3::sqlite3 fmt::fmt-header-only)
set_property(TARGET main PROPERTY CXX_STANDARD 23)

# tests target
add_executable(tests)
target_sources(tests PRIVATE src/test.cpp)
target_link_libraries(tests PRIVATE unofficial::sqlite3::sqlite3 fmt::fmt)
set_property(TARGET tests PROPERTY CXX_STANDARD 20)
target_link_libraries(tests PRIVATE unofficial::sqlite3::sqlite3 fmt::fmt-header-only)
set_property(TARGET tests PROPERTY CXX_STANDARD 23)
enable_testing()
add_test(tests tests)
1 change: 0 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"$schema": "https://cmake.org/cmake/help/latest/_downloads/3e2d73bff478d88a7de0de736ba5e361/schema.json",
"version": 8,
"cmakeMinimumRequired": {
"major": 3,
Expand Down

0 comments on commit e59b7ca

Please sign in to comment.