cemplateSimple C++ template engine |
git clone git://git.dimitrijedobrota.com/cemplate.git |
Log | Files | Refs | README | LICENSE | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING | |
CMakeLists.txt (646B)
1 cmake_minimum_required(VERSION 3.14) 2 3 project(cemplateExamples CXX) 4 5 include(../cmake/project-is-top-level.cmake) 6 include(../cmake/folders.cmake) 7 8 if(PROJECT_IS_TOP_LEVEL) 9 find_package(cemplate REQUIRED) 10 endif() 11 12 add_custom_target(run-examples) 13 14 function(add_example NAME) 15 add_executable("${NAME}" "${NAME}.cpp") 16 target_link_libraries("${NAME}" PRIVATE cemplate::cemplate) 17 target_compile_features("${NAME}" PRIVATE cxx_std_20) 18 add_custom_target("run_${NAME}" COMMAND "${NAME}" VERBATIM) 19 add_dependencies("run_${NAME}" "${NAME}") 20 add_dependencies(run-examples "run_${NAME}") 21 endfunction() 22 23 add_example(example) 24 25 add_folders(Example)