Skip to content

Commit 7548ce3

Browse files
authored
[math] Migrate old Makefiles to CMake and reenable non-covered tests
1 parent af04fd2 commit 7548ce3

16 files changed

Lines changed: 146 additions & 527 deletions

cmake/modules/RootMacros.cmake

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,14 @@ function(REFLEX_GENERATE_DICTIONARY dictionary)
198198
LIST(APPEND definitions "$<FILTER:$<TARGET_PROPERTY:${dictionary},COMPILE_DEFINITIONS>,EXCLUDE,^$>")
199199
ENDIF()
200200

201+
set(ROOT_genreflex_CMD $<TARGET_FILE:genreflex>)
201202
add_custom_command(
202-
OUTPUT ${gensrcdict} ${rootmapname}
203203
COMMAND ${ROOT_genreflex_CMD}
204204
ARGS ${headerfiles} -o ${gensrcdict} ${rootmapopts} --select=${selectionfile}
205205
${ARG_OPTIONS}
206206
"-I$<JOIN:$<REMOVE_DUPLICATES:$<FILTER:${include_dirs},EXCLUDE,^$>>,;-I>"
207207
"$<$<BOOL:$<JOIN:${definitions},>>:-D$<JOIN:${definitions},;-D>>"
208+
OUTPUT ${gensrcdict} ${rootmapname}
208209
DEPENDS ${headerfiles} ${selectionfile} ${ARG_DEPENDS}
209210

210211
COMMAND_EXPAND_LISTS
@@ -2749,8 +2750,6 @@ macro(ROOTTEST_GENERATE_REFLEX_DICTIONARY dictionary)
27492750
set(CMAKE_ROOTTEST_NOROOTMAP OFF)
27502751
endif()
27512752
2752-
set(ROOT_genreflex_CMD ${ROOT_BINDIR}/genreflex)
2753-
27542753
ROOTTEST_TARGETNAME_FROM_FILE(targetname ${dictionary})
27552754
27562755
set(targetname_libgen ${targetname}-libgen)

math/genvector/test/CMakeLists.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,22 @@ ROOT_EXECUTABLE(testGenvector testGenVector.cxx LIBRARIES GenVector Hist Smatrix
1616
ROOT_ADD_TEST(test-genvector-genvector COMMAND testGenvector)
1717

1818
ROOT_EXECUTABLE(testVectorIO testVectorIO.cxx LIBRARIES GenVector Tree Hist Gpad Physics)
19+
target_include_directories(testVectorIO PRIVATE ./)
1920
ROOT_ADD_TEST(test-genvector-vectorio COMMAND testVectorIO
20-
COPY_TO_BUILDDIR ${CMAKE_CURRENT_SOURCE_DIR}/Track.h)
21+
COPY_TO_BUILDDIR ${CMAKE_CURRENT_SOURCE_DIR}/Track.h
22+
FIXTURES_SETUP vectoriofixture)
23+
24+
ROOT_GENERATE_DICTIONARY(GVTrackDict Track.h LINKDEF TrackLinkDef.h OPTIONS -inlineInputHeader)
25+
ROOT_EXECUTABLE(testVectorIOdict testVectorIO.cxx GVTrackDict.cxx LIBRARIES GenVector Tree Hist Gpad Physics)
26+
REFLEX_GENERATE_DICTIONARY(GVTrackDictXml Track.h SELECTION TrackDict.xml)
27+
ROOT_EXECUTABLE(testVectorIOdictXml testVectorIO.cxx GVTrackDictXml.cxx LIBRARIES GenVector Tree Hist Gpad Physics)
28+
target_include_directories(testVectorIOdict PRIVATE ./)
29+
target_include_directories(testVectorIOdictXml PRIVATE ./)
30+
target_compile_definitions(testVectorIOdictXml PRIVATE USE_REFLEX)
31+
ROOT_ADD_TEST(test-genvector-vectoriodict COMMAND testVectorIOdict
32+
FIXTURES_REQUIRED vectoriofixture FIXTURES_SETUP vectoriodictrun)
33+
ROOT_ADD_TEST(test-genvector-vectoriodictxml COMMAND testVectorIOdictXml
34+
FIXTURES_REQUIRED vectoriodictrun)
2135

2236
ROOT_EXECUTABLE(coordinates3D coordinates3D.cxx LIBRARIES GenVector)
2337
ROOT_ADD_TEST(test-genvector-coordinates3D COMMAND coordinates3D)

math/genvector/test/Makefile

Lines changed: 0 additions & 207 deletions
This file was deleted.

math/mathcore/test/fit/Makefile

Lines changed: 0 additions & 114 deletions
This file was deleted.

math/smatrix/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,5 @@ ROOT_GENERATE_DICTIONARY(G__Smatrix32
5757
Core
5858
MathCore
5959
)
60+
61+
ROOT_ADD_TEST_SUBDIRECTORY(test)

0 commit comments

Comments
 (0)