2
0
mirror of https://github.com/boostorg/parser.git synced 2026-01-23 05:42:26 +00:00
Files
parser/example/CMakeLists.txt
Zach Laine d60d33e40b Finish implementing support for parsing into structs as if they were tuples.
This makes it possible to map from sequence parsers onto structs with no
semantic actions.  Also, add a doc section describing how parsing structs
works (including a couple of short example programs).

Fixes #45.
Partially addresses #28.
2024-01-03 23:24:37 -06:00

38 lines
980 B
CMake

# Copyright (C) 2020 T. Zachary Laine
#
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
include_directories(${CMAKE_HOME_DIRECTORY})
include(CTest)
enable_testing()
add_custom_target(run_examples COMMAND ${CMAKE_CTEST_COMMAND} -VV -C ${CMAKE_CFG_INTDIR})
macro(add_sample name)
add_executable(${name} ${name}.cpp)
target_link_libraries(${name} parser)
set_property(TARGET ${name} PROPERTY CXX_STANDARD ${CXX_STD})
add_test(${name} ${CMAKE_CURRENT_BINARY_DIR}/${name})
endmacro()
add_sample(hello)
add_sample(trivial)
add_sample(trivial_skipper)
add_sample(semantic_actions)
add_sample(rule_intro)
add_sample(struct_rule)
add_sample(parsing_into_a_struct)
add_sample(roman_numerals)
if (Boost_FOUND)
if (NOT BUILD_WITHOUT_HANA)
add_sample(self_filling_symbol_table)
add_sample(json)
endif()
add_sample(callback_json)
endif()