basedOpinionated utility library |
git clone git://git.dimitrijedobrota.com/based.git |
Log | Files | Refs | README | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING | |
CMakeLists.txt (656B)
1 cmake_minimum_required(VERSION 3.14) 2 3 project(basedTests LANGUAGES CXX) 4 5 include(../cmake/project-is-top-level.cmake) 6 include(../cmake/folders.cmake) 7 8 # ---- Dependencies ---- 9 10 find_package(Catch2 REQUIRED) 11 include(Catch) 12 13 # ---- Tests ---- 14 15 function(add_test NAME) 16 add_executable("${NAME}" "source/${NAME}.cpp") 17 target_link_libraries("${NAME}" PRIVATE based::based) 18 target_link_libraries("${NAME}" PRIVATE Catch2::Catch2WithMain) 19 target_compile_features("${NAME}" PRIVATE cxx_std_20) 20 catch_discover_tests("${NAME}") 21 endfunction() 22 23 # ---- Algorithm ---- 24 25 add_test(min_test) 26 add_test(max_test) 27 28 # ---- End-of-file commands ---- 29 30 add_folders(Test)