mirror of
https://github.com/XRPLF/rippled.git
synced 2026-02-06 23:15:32 +00:00
Unity builds were intended to speed up builds, by bundling multiple files into compilation units. However, now that ccache is available on all platforms, there is no need for unity builds anymore, as ccache stores compiled individual build objects for reuse. This change therefore removes the ability to make unity builds.
14 lines
456 B
CMake
14 lines
456 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 ()
|