@@ -225,7 +225,7 @@ endif ()
225
225
#
226
226
#-------------------------------------------------
227
227
228
- file (GLOB_RECURSE TEST_SOURCES CONFIGURE_DEPENDS test /*.cpp test /*.hpp)
228
+ file (GLOB TEST_SOURCES CONFIGURE_DEPENDS test /*.cpp test /*.hpp)
229
229
add_executable (mrdox-test ${TEST_SOURCES} )
230
230
231
231
target_include_directories (mrdox-test
@@ -269,6 +269,7 @@ if (MRDOX_BUILD_TESTS)
269
269
${CMAKE_SOURCE_DIR} /addons
270
270
${CMAKE_BINARY_DIR} /addons
271
271
BYPRODUCTS ${CMAKE_BINARY_DIR} /addons
272
+ DEPENDS ${CMAKE_SOURCE_DIR} /addons
272
273
)
273
274
274
275
file (GLOB_RECURSE TEST_SOURCES CONFIGURE_DEPENDS source /*.cpp source /*.hpp)
@@ -310,6 +311,34 @@ if (MRDOX_BUILD_TESTS)
310
311
--relaxng ${CMAKE_CURRENT_BINARY_DIR} /mrdox.rng ${XML_SOURCES}
311
312
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
312
313
endif ()
314
+
315
+ add_executable (handlebars-test
316
+ test /unit/handlebars.cpp
317
+ include /mrdox/Support/Handlebars.hpp
318
+ lib/Support/Handlebars.cpp
319
+ include /mrdox/Support/Path .hpp
320
+ lib/Support/Path .cpp
321
+ include /mrdox/Support/Error.hpp
322
+ lib/Support/Error.cpp
323
+ include /mrdox/Support/Dom.hpp
324
+ lib/Support/Dom.cpp
325
+ )
326
+ target_include_directories (handlebars-test PRIVATE include )
327
+ target_compile_features (handlebars-test PRIVATE cxx_std_20)
328
+ target_link_libraries (handlebars-test PRIVATE fmt::fmt)
329
+ target_link_libraries (handlebars-test PUBLIC clangToolingInclusions)
330
+ target_include_directories (handlebars-test SYSTEM PUBLIC ${LLVM_INCLUDE_DIRS} )
331
+ target_compile_definitions (handlebars-test PRIVATE MRDOX_UNIT_TEST_DIR="${CMAKE_CURRENT_SOURCE_DIR} /test/unit" )
332
+ target_compile_definitions (handlebars-test PRIVATE MRDOX_STATIC_LINK)
333
+ target_compile_definitions (handlebars-test PUBLIC -DFMT_HEADER_ONLY)
334
+ if (MSVC )
335
+ target_compile_options (handlebars-test PRIVATE /EHsc)
336
+ endif ()
337
+ if (LLVM_CONFIGURATION_TYPE STREQUAL RELWITHDEBINFO)
338
+ target_compile_definitions (handlebars-test PUBLIC -D_ITERATOR_DEBUG_LEVEL=0)
339
+ target_compile_options (handlebars-test PUBLIC /MD )
340
+ endif ()
341
+ add_test (NAME handlebars-test COMMAND handlebars-test )
313
342
endif ()
314
343
315
344
0 commit comments