Conditionally support the CONFIGURE_DEPENDS flag for globbing of CMake 3.12 and later.

# Conflicts:
#	cmake/Modules/Packages/COLVARS.cmake
This commit is contained in:
Axel Kohlmeyer
2023-01-06 18:54:01 -05:00
parent a7ba11fee9
commit 3036f8d4c6
12 changed files with 48 additions and 41 deletions

View File

@ -6,7 +6,7 @@ if(ENABLE_TESTING)
find_program(VALGRIND_BINARY NAMES valgrind)
# generate custom suppression file
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/lammps.supp "\n")
file(GLOB VALGRIND_SUPPRESSION_FILES ${LAMMPS_TOOLS_DIR}/valgrind/[^.]*.supp)
file(GLOB VALGRIND_SUPPRESSION_FILES ${CONFIGURE_DEPENDS} ${LAMMPS_TOOLS_DIR}/valgrind/[^.]*.supp)
foreach(SUPP ${VALGRIND_SUPPRESSION_FILES})
file(READ ${SUPP} SUPPRESSIONS)
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/lammps.supp "${SUPPRESSIONS}")