forked from biojppm/rapidyaml
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
17 lines (14 loc) · 770 Bytes
/
CMakeLists.txt
File metadata and controls
17 lines (14 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
project(ryml-quickstart-ints LANGUAGES CXX)
# create a target to amalgamate ryml into a single header:
include(amalgamate.cmake)
amalgamate_ryml(SINGLE_HEADER_DIR SINGLE_HEADER)
# now simply define the executable:
add_executable(ryml-quickstart-ints ../quickstart-ints.cpp ${SINGLE_HEADER})
target_compile_features(ryml-quickstart-ints PUBLIC cxx_std_11)
target_compile_definitions(ryml-quickstart-ints PUBLIC -DRYML_SINGLE_HEADER)
target_compile_definitions(ryml-quickstart-ints PUBLIC -DRYML_SINGLE_HEADER_INTS)
target_include_directories(ryml-quickstart-ints PUBLIC "${SINGLE_HEADER_DIR}")
add_custom_target(run ryml-quickstart-ints
COMMAND $<TARGET_FILE:ryml-quickstart-ints>
DEPENDS ryml-quickstart-ints)