]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/property_tree/examples/CMakeLists.txt
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / property_tree / examples / CMakeLists.txt
1 #
2 # Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
3 # Copyright (c) 2021 Richard Hodges (hodges.r@gmail.com)
4 #
5 # Distributed under the Boost Software License, Version 1.0. (See accompanying
6 # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 #
8 # Official repository: https://github.com/boostorg/json
9 #
10
11 source_group("test" FILES
12 custom_data_type.cpp
13 debug_settings.cpp
14 empty_ptree_trick.cpp
15 info_grammar_spirit.cpp
16 speed_test.cpp
17 )
18
19 macro(add_example)
20 cmake_parse_arguments("addex" "" "NAME" "SRCS;DEPS" ${ARGN})
21 if("${addex_NAME}" STREQUAL "")
22 message(FATAL_ERROR "add_example: no NAME")
23 endif()
24 if("${addex_SRCS}" STREQUAL "")
25 message(FATAL_ERROR "add_example: no SRCS")
26 endif()
27 message(STATUS "add_example: ${addex_NAME} SRCS: ${addex_SRCS} DEPS: ${addex_DEPS}")
28 add_executable("${PROJECT_NAME}-example-${addex_NAME}"
29 ${addex_SRCS})
30 set_property(TARGET "${PROJECT_NAME}-example-${addex_NAME}" PROPERTY FOLDER "example")
31 target_link_libraries("${PROJECT_NAME}-example-${addex_NAME}" PRIVATE ${addex_DEPS})
32 endmacro()
33 #
34
35 add_example(NAME custom_data_type SRCS custom_data_type.cpp DEPS Boost::property_tree)
36 add_example(NAME debug_settings SRCS debug_settings.cpp DEPS Boost::property_tree)
37 configure_file(debug_settings.xml debug_settings.xml COPYONLY)
38 add_example(NAME empty_ptree_trick SRCS empty_ptree_trick.cpp DEPS Boost::property_tree)
39 add_example(NAME info_grammar_spirit SRCS info_grammar_spirit.cpp DEPS Boost::property_tree)
40 add_example(NAME speed_test SRCS speed_test.cpp DEPS Boost::property_tree)