mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
Agent-Logs-Url: https://github.com/XRPLF/rippled/sessions/7538f6f4-df9a-4ffd-b181-e6caf4c74795 Co-authored-by: mvadari <8029314+mvadari@users.noreply.github.com>
23 lines
521 B
CMake
23 lines
521 B
CMake
include(isolate_headers)
|
|
|
|
function(xrpl_add_test name)
|
|
set(target ${PROJECT_NAME}.test.${name})
|
|
|
|
file(
|
|
GLOB_RECURSE sources
|
|
CONFIGURE_DEPENDS
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/${name}/*.cpp"
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/${name}.cpp"
|
|
)
|
|
add_executable(${target} ${ARGN} ${sources})
|
|
|
|
isolate_headers(
|
|
${target}
|
|
"${CMAKE_SOURCE_DIR}"
|
|
"${CMAKE_SOURCE_DIR}/tests/${name}"
|
|
PRIVATE
|
|
)
|
|
|
|
add_test(NAME ${target} COMMAND ${target})
|
|
endfunction()
|