xo-arena: nix-build works, including utest

This commit is contained in:
Roland Conybeare 2026-02-26 00:47:49 +11:00
commit 1ae0ebd600
3 changed files with 11 additions and 12 deletions

View file

@ -87,7 +87,6 @@ add_subdirectory(xo-facet) # sep iface,data
add_subdirectory(xo-allocutil)
add_subdirectory(xo-refcnt)
add_subdirectory(xo-subsys)
#add_subdirectory(xo-randomgen)
add_subdirectory(xo-flatstring)
add_subdirectory(xo-pyutil)
add_subdirectory(xo-reflect)

View file

@ -4,7 +4,7 @@
# xo dependencies
xo-cmake,
# xo-refcnt,
xo-randomgen,
xo-reflectutil,
xo-indentlog,
} :
@ -15,13 +15,15 @@ stdenv.mkDerivation (finalattrs:
src = ../xo-arena;
cmakeFlags = ["-DCMAKE_MODULE_PATH=${xo-cmake}/share/cmake"];
cmakeFlags = ["-DCMAKE_MODULE_PATH=${xo-cmake}/share/cmake"
"-DENABLE_TESTING=1"
];
doCheck = true;
nativeBuildInputs = [
cmake catch2 xo-cmake
cmake catch2
xo-cmake xo-randomgen
];
propagatedBuildInputs = [
# xo-refcnt
xo-reflectutil
xo-indentlog
];

View file

@ -6,12 +6,10 @@ set(SELF_SOURCE_FILES
filename.test.cpp code_location.test.cpp function.test.cpp pretty_vector.test.cpp
indentlog_utest_main.cpp log_streambuf.test.cpp toppstr.test.cpp cond.test.cpp)
xo_add_utest_executable(${SELF_EXECUTABLE_NAME} ${SELF_SOURCE_FILES})
# ----------------------------------------------------------------
# 3rd party dependency: catch2
xo_self_dependency(${SELF_EXECUTABLE_NAME} indentlog)
xo_external_target_dependency(${SELF_EXECUTABLE_NAME} Catch2 Catch2::Catch2)
if (ENABLE_TESTING)
xo_add_utest_executable(${SELF_EXECUTABLE_NAME} ${SELF_SOURCE_FILES})
xo_self_dependency(${SELF_EXECUTABLE_NAME} indentlog)
xo_external_target_dependency(${SELF_EXECUTABLE_NAME} Catch2 Catch2::Catch2)
endif()
# end CMakeLists.txt