Skip to content

Commit 13fe06f

Browse files
committed
[roottest][CMake] Sync minimum CMake version with main ROOT config
Sync minimum CMake version for `roottest/CMakeLists.txt` with the main `CMakeLists.txt`. The motivation for this update is that it was catching wrong manual dependency management in the test macros, which is also fixed in this commit.
1 parent 0ea22e3 commit 13fe06f

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

roottest/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
22

33
project(roottest)
44

roottest/cmake/modules/RoottestMacros.cmake

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,10 +360,13 @@ macro(ROOTTEST_GENERATE_DICTIONARY dictname)
360360

361361
add_dependencies(${targetname_libgen} ${dictname})
362362

363+
# We use the /fast variant of targetname_libgen, so we won't automatically
364+
# build dependencies. Still, the dictname target is a clear dependency (see
365+
# line above), so we have to explicilty build it too.
363366
add_test(NAME ${GENERATE_DICTIONARY_TEST}
364367
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR}
365368
${build_config}
366-
--target ${targetname_libgen}${fast}
369+
--target ${dictname}${fast} ${targetname_libgen}${fast}
367370
-- ${always-make})
368371

369372
set_property(TEST ${GENERATE_DICTIONARY_TEST} PROPERTY ENVIRONMENT ${ROOTTEST_ENVIRONMENT})
@@ -469,10 +472,13 @@ macro(ROOTTEST_GENERATE_REFLEX_DICTIONARY dictionary)
469472

470473
set(GENERATE_REFLEX_TEST ${targetname_libgen}-build)
471474

475+
# We use the /fast variant of targetname_libgen, so we won't automatically
476+
# build dependencies. Still, the targetname_dictgen is a clear dependency
477+
# (see line above), so we have to explicilty build it too.
472478
add_test(NAME ${GENERATE_REFLEX_TEST}
473479
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR}
474480
${build_config}
475-
--target ${targetname_libgen}${fast}
481+
--target ${targetname_dictgen}${fast} ${targetname_libgen}${fast}
476482
-- ${always-make})
477483

478484
set_property(TEST ${GENERATE_REFLEX_TEST} PROPERTY ENVIRONMENT ${ROOTTEST_ENVIRONMENT})

0 commit comments

Comments
 (0)