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:
@ -97,7 +97,7 @@ else()
|
||||
endif()
|
||||
|
||||
# tests for molecular systems and related pair styles
|
||||
file(GLOB MOL_PAIR_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/mol-pair-*.yaml)
|
||||
file(GLOB MOL_PAIR_TESTS LIST_DIRECTORIES false ${CONFIGURE_DEPENDS} ${TEST_INPUT_FOLDER}/mol-pair-*.yaml)
|
||||
# cannot test MSM with single precision data
|
||||
if(FFT_SINGLE)
|
||||
list(FILTER MOL_PAIR_TESTS EXCLUDE REGEX "msm")
|
||||
@ -115,7 +115,7 @@ foreach(TEST ${MOL_PAIR_TESTS})
|
||||
endforeach()
|
||||
|
||||
# tests for metal-like atomic systems and related pair styles
|
||||
file(GLOB ATOMIC_PAIR_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/atomic-pair-*.yaml)
|
||||
file(GLOB ATOMIC_PAIR_TESTS LIST_DIRECTORIES false ${CONFIGURE_DEPENDS} ${TEST_INPUT_FOLDER}/atomic-pair-*.yaml)
|
||||
foreach(TEST ${ATOMIC_PAIR_TESTS})
|
||||
string(REGEX REPLACE "^.*atomic-pair-(.*)\.yaml" "AtomicPairStyle:\\1" TNAME ${TEST})
|
||||
extract_tags(TEST_TAGS ${TEST})
|
||||
@ -129,7 +129,7 @@ foreach(TEST ${ATOMIC_PAIR_TESTS})
|
||||
endforeach()
|
||||
|
||||
# tests for Si-like manybody systems and related pair styles
|
||||
file(GLOB MANYBODY_PAIR_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/manybody-pair-*.yaml)
|
||||
file(GLOB MANYBODY_PAIR_TESTS LIST_DIRECTORIES false ${CONFIGURE_DEPENDS} ${TEST_INPUT_FOLDER}/manybody-pair-*.yaml)
|
||||
foreach(TEST ${MANYBODY_PAIR_TESTS})
|
||||
string(REGEX REPLACE "^.*manybody-pair-(.*)\.yaml" "ManybodyPairStyle:\\1" TNAME ${TEST})
|
||||
extract_tags(TEST_TAGS ${TEST})
|
||||
@ -146,7 +146,7 @@ endforeach()
|
||||
add_executable(test_bond_style test_bond_style.cpp)
|
||||
target_link_libraries(test_bond_style PRIVATE lammps style_tests)
|
||||
|
||||
file(GLOB BOND_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/bond-*.yaml)
|
||||
file(GLOB BOND_TESTS LIST_DIRECTORIES false ${CONFIGURE_DEPENDS} ${TEST_INPUT_FOLDER}/bond-*.yaml)
|
||||
foreach(TEST ${BOND_TESTS})
|
||||
string(REGEX REPLACE "^.*bond-(.*)\.yaml" "BondStyle:\\1" TNAME ${TEST})
|
||||
extract_tags(TEST_TAGS ${TEST})
|
||||
@ -163,7 +163,7 @@ endforeach()
|
||||
add_executable(test_angle_style test_angle_style.cpp)
|
||||
target_link_libraries(test_angle_style PRIVATE lammps style_tests)
|
||||
|
||||
file(GLOB ANGLE_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/angle-*.yaml)
|
||||
file(GLOB ANGLE_TESTS LIST_DIRECTORIES false ${CONFIGURE_DEPENDS} ${TEST_INPUT_FOLDER}/angle-*.yaml)
|
||||
foreach(TEST ${ANGLE_TESTS})
|
||||
string(REGEX REPLACE "^.*angle-(.*)\.yaml" "AngleStyle:\\1" TNAME ${TEST})
|
||||
extract_tags(TEST_TAGS ${TEST})
|
||||
@ -177,7 +177,7 @@ foreach(TEST ${ANGLE_TESTS})
|
||||
endforeach()
|
||||
|
||||
# kspace style tester, currently uses the pair style tool
|
||||
file(GLOB KSPACE_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/kspace-*.yaml)
|
||||
file(GLOB KSPACE_TESTS LIST_DIRECTORIES false ${CONFIGURE_DEPENDS} ${TEST_INPUT_FOLDER}/kspace-*.yaml)
|
||||
# cannot test MSM with single precision data
|
||||
if(FFT_SINGLE)
|
||||
list(FILTER KSPACE_TESTS EXCLUDE REGEX "msm")
|
||||
@ -202,7 +202,7 @@ endif()
|
||||
target_link_libraries(test_fix_timestep PRIVATE lammps style_tests)
|
||||
|
||||
# tests for timestep related fixes (time integration, thermostat, force manipulation, constraints/restraints)
|
||||
file(GLOB FIX_TIMESTEP_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/fix-timestep-*.yaml)
|
||||
file(GLOB FIX_TIMESTEP_TESTS LIST_DIRECTORIES false ${CONFIGURE_DEPENDS} ${TEST_INPUT_FOLDER}/fix-timestep-*.yaml)
|
||||
foreach(TEST ${FIX_TIMESTEP_TESTS})
|
||||
string(REGEX REPLACE "^.*fix-timestep-(.*)\.yaml" "FixTimestep:\\1" TNAME ${TEST})
|
||||
extract_tags(TEST_TAGS ${TEST})
|
||||
@ -223,7 +223,7 @@ endforeach()
|
||||
add_executable(test_dihedral_style test_dihedral_style.cpp)
|
||||
target_link_libraries(test_dihedral_style PRIVATE lammps style_tests)
|
||||
|
||||
file(GLOB DIHEDRAL_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/dihedral-*.yaml)
|
||||
file(GLOB DIHEDRAL_TESTS LIST_DIRECTORIES false ${CONFIGURE_DEPENDS} ${TEST_INPUT_FOLDER}/dihedral-*.yaml)
|
||||
foreach(TEST ${DIHEDRAL_TESTS})
|
||||
string(REGEX REPLACE "^.*dihedral-(.*)\.yaml" "DihedralStyle:\\1" TNAME ${TEST})
|
||||
extract_tags(TEST_TAGS ${TEST})
|
||||
@ -240,7 +240,7 @@ endforeach()
|
||||
add_executable(test_improper_style test_improper_style.cpp)
|
||||
target_link_libraries(test_improper_style PRIVATE lammps style_tests)
|
||||
|
||||
file(GLOB IMPROPER_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/improper-*.yaml)
|
||||
file(GLOB IMPROPER_TESTS LIST_DIRECTORIES false ${CONFIGURE_DEPENDS} ${TEST_INPUT_FOLDER}/improper-*.yaml)
|
||||
foreach(TEST ${IMPROPER_TESTS})
|
||||
string(REGEX REPLACE "^.*improper-(.*)\.yaml" "ImproperStyle:\\1" TNAME ${TEST})
|
||||
extract_tags(TEST_TAGS ${TEST})
|
||||
|
||||
Reference in New Issue
Block a user