also make CMake scripts in unittest tree consistent
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
# build LAMMPS plugins, but not on Windows
|
# build LAMMPS plugins, but not on Windows
|
||||||
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" AND PKG_PLUGIN)
|
if((NOT (CMAKE_SYSTEM_NAME STREQUAL "Windows")) AND PKG_PLUGIN)
|
||||||
ExternalProject_Add(plugins
|
ExternalProject_Add(plugins
|
||||||
SOURCE_DIR "${LAMMPS_DIR}/examples/plugins"
|
SOURCE_DIR "${LAMMPS_DIR}/examples/plugins"
|
||||||
BINARY_DIR ${CMAKE_BINARY_DIR}/build-plugins
|
BINARY_DIR ${CMAKE_BINARY_DIR}/build-plugins
|
||||||
|
|||||||
@ -15,7 +15,7 @@ if(CMAKE_VERSION VERSION_LESS 3.12)
|
|||||||
else()
|
else()
|
||||||
find_package(Python COMPONENTS Interpreter)
|
find_package(Python COMPONENTS Interpreter)
|
||||||
endif()
|
endif()
|
||||||
if (Python_EXECUTABLE)
|
if(Python_EXECUTABLE)
|
||||||
add_custom_target(check-tests
|
add_custom_target(check-tests
|
||||||
${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/check_tests.py
|
${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/check_tests.py
|
||||||
-s ${LAMMPS_SOURCE_DIR} -t ${CMAKE_CURRENT_SOURCE_DIR}/tests
|
-s ${LAMMPS_SOURCE_DIR} -t ${CMAKE_CURRENT_SOURCE_DIR}/tests
|
||||||
@ -33,7 +33,7 @@ else()
|
|||||||
target_link_libraries(style_tests PUBLIC mpi_stubs)
|
target_link_libraries(style_tests PUBLIC mpi_stubs)
|
||||||
endif()
|
endif()
|
||||||
# propagate sanitizer options to test tools
|
# propagate sanitizer options to test tools
|
||||||
if (ENABLE_SANITIZER AND (NOT ENABLE_SANITIZER STREQUAL "none"))
|
if(ENABLE_SANITIZER AND (NOT (ENABLE_SANITIZER STREQUAL "none")))
|
||||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
|
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
|
||||||
target_compile_options(style_tests PUBLIC -fsanitize=${ENABLE_SANITIZER})
|
target_compile_options(style_tests PUBLIC -fsanitize=${ENABLE_SANITIZER})
|
||||||
target_link_options(style_tests PUBLIC -fsanitize=${ENABLE_SANITIZER})
|
target_link_options(style_tests PUBLIC -fsanitize=${ENABLE_SANITIZER})
|
||||||
@ -56,7 +56,7 @@ endif()
|
|||||||
# tests for a molecular systems and related pair styles
|
# tests for a 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 ${TEST_INPUT_FOLDER}/mol-pair-*.yaml)
|
||||||
# cannot test MSM with single precision data
|
# cannot test MSM with single precision data
|
||||||
if (FFT_SINGLE)
|
if(FFT_SINGLE)
|
||||||
list(FILTER MOL_PAIR_TESTS EXCLUDE REGEX "msm")
|
list(FILTER MOL_PAIR_TESTS EXCLUDE REGEX "msm")
|
||||||
endif()
|
endif()
|
||||||
foreach(TEST ${MOL_PAIR_TESTS})
|
foreach(TEST ${MOL_PAIR_TESTS})
|
||||||
@ -106,7 +106,7 @@ endforeach()
|
|||||||
# kspace style tester, currently uses the pair style tool
|
# 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 ${TEST_INPUT_FOLDER}/kspace-*.yaml)
|
||||||
# cannot test MSM with single precision data
|
# cannot test MSM with single precision data
|
||||||
if (FFT_SINGLE)
|
if(FFT_SINGLE)
|
||||||
list(FILTER KSPACE_TESTS EXCLUDE REGEX "msm")
|
list(FILTER KSPACE_TESTS EXCLUDE REGEX "msm")
|
||||||
endif()
|
endif()
|
||||||
foreach(TEST ${KSPACE_TESTS})
|
foreach(TEST ${KSPACE_TESTS})
|
||||||
|
|||||||
Reference in New Issue
Block a user