mirror of
https://github.com/boostorg/parser.git
synced 2026-01-24 06:02:12 +00:00
Add parser tests.
This commit is contained in:
@@ -59,6 +59,7 @@ add_library(
|
||||
)
|
||||
target_compile_features(yaml-static PUBLIC cxx_generic_lambdas)
|
||||
target_compile_options(yaml-static PUBLIC ${cxx_defs})
|
||||
target_compile_features(yaml-static PUBLIC cxx_std_17)
|
||||
target_include_directories(yaml-static PUBLIC ${CMAKE_SOURCE_DIR}/include)
|
||||
target_link_libraries(yaml-static PUBLIC boost)
|
||||
target_link_libraries(yaml-static ${link_flags})
|
||||
@@ -87,6 +88,7 @@ add_library(
|
||||
)
|
||||
target_compile_features(yaml PUBLIC cxx_generic_lambdas)
|
||||
target_compile_options(yaml PUBLIC ${cxx_defs})
|
||||
target_compile_features(yaml PUBLIC cxx_std_17)
|
||||
target_include_directories(yaml PUBLIC ${CMAKE_SOURCE_DIR}/include)
|
||||
target_link_libraries(yaml PUBLIC boost)
|
||||
target_link_libraries(yaml ${link_flags})
|
||||
|
||||
@@ -9,6 +9,14 @@ add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} -C ${CMAKE_CFG_INTDIR})
|
||||
set(BUILD_HEADER_ONLY_TEST false CACHE BOOL "Set to true to build a test app with -DBOOST_YAML_HEADER_ONLY=1.")
|
||||
|
||||
|
||||
##################################################
|
||||
# Parser tests
|
||||
##################################################
|
||||
add_executable(parser parser.cpp)
|
||||
target_link_libraries(parser yaml gtest gtest_main ${link_flags})
|
||||
add_test(parser --gtest_catch_exceptions=1)
|
||||
|
||||
|
||||
##################################################
|
||||
# Header-only build test
|
||||
##################################################
|
||||
@@ -17,8 +25,8 @@ add_executable(
|
||||
header_only_parse_test
|
||||
parse_yaml_test.cpp
|
||||
)
|
||||
target_link_libraries(header_only_parse_test yaml gtest ${link_flags})
|
||||
target_compile_definitions(header_only_parse_test PRIVATE -DBOOST_YAML_HEADER_ONLY=1)
|
||||
target_link_libraries(header_only_parse_test yaml gtest ${link_flags})
|
||||
target_compile_definitions(header_only_parse_test PRIVATE -DBOOST_YAML_HEADER_ONLY=1)
|
||||
endif ()
|
||||
|
||||
##################################################
|
||||
|
||||
1413
test/parser.cpp
Normal file
1413
test/parser.cpp
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user