add simple check whether the compiled executable can actually run
This commit is contained in:
@ -1,5 +1,14 @@
|
|||||||
include(GTest)
|
include(GTest)
|
||||||
|
|
||||||
|
# check if we can run the compiled executable and whether it prints
|
||||||
|
# the LAMMPS version header in the output for an empty input
|
||||||
|
file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/in.empty)
|
||||||
|
add_test(NAME RunLammps
|
||||||
|
COMMAND $<TARGET_FILE:lmp> -log none -echo none -in in.empty
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
set_tests_properties(RunLammps PROPERTIES
|
||||||
|
PASS_REGULAR_EXPRESSION "^LAMMPS \\([0-9]+ [A-Za-z]+ 2[0-9][0-9][0-9]\\)")
|
||||||
|
|
||||||
if(BUILD_MPI)
|
if(BUILD_MPI)
|
||||||
function(add_mpi_test)
|
function(add_mpi_test)
|
||||||
set(MPI_TEST_NUM_PROCS 1)
|
set(MPI_TEST_NUM_PROCS 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user