Changeset View
Changeset View
Standalone View
Standalone View
src/univalue/CMakeLists.txt
Show All 39 Lines | if(UNIVALUE_BUILD_TESTS) | ||||
# test_json is not meant to run in an automated test suite. | # test_json is not meant to run in an automated test suite. | ||||
add_executable(json_test EXCLUDE_FROM_ALL test/test_json.cpp) | add_executable(json_test EXCLUDE_FROM_ALL test/test_json.cpp) | ||||
target_link_libraries(json_test univalue) | target_link_libraries(json_test univalue) | ||||
add_dependencies(check-univalue json_test) | add_dependencies(check-univalue json_test) | ||||
endif(UNIVALUE_BUILD_TESTS) | endif(UNIVALUE_BUILD_TESTS) | ||||
# Generate lib/univalue_escapes.h | # Generate lib/univalue_escapes.h | ||||
include(NativeExecutable) | include(NativeExecutable) | ||||
add_native_executable(univalue_gen gen/gen.cpp) | add_native_executable(univalue_gen | ||||
native_target_include_directories(univalue_gen PUBLIC include) | SOURCES | ||||
gen/gen.cpp | |||||
INCLUDE_DIRS | |||||
include | |||||
) | |||||
# Custom target to regenerate univalue_escapes.h | # Custom target to regenerate univalue_escapes.h | ||||
add_custom_target(generate_univalue_escapes_h | add_custom_target(generate_univalue_escapes_h | ||||
COMMAND univalue_gen > ${CMAKE_CURRENT_SOURCE_DIR}/lib/univalue_escapes.h | COMMAND univalue_gen > ${CMAKE_CURRENT_SOURCE_DIR}/lib/univalue_escapes.h | ||||
) | ) |