make lammps-shell test compatible with MULTI-CONFIG CMake builders
This commit is contained in:
@ -8,12 +8,18 @@ if(CMAKE_VERSION VERSION_LESS 3.12)
|
|||||||
else()
|
else()
|
||||||
find_package(Python 3.5 COMPONENTS Interpreter)
|
find_package(Python 3.5 COMPONENTS Interpreter)
|
||||||
endif()
|
endif()
|
||||||
|
get_property(BUILD_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||||
|
if(BUILD_IS_MULTI_CONFIG)
|
||||||
|
set(LAMMPS_SHELL_EXE_DIR ${CMAKE_BINARY_DIR}/$<CONFIG>)
|
||||||
|
else()
|
||||||
|
set(LAMMPS_SHELL_EXE_DIR ${CMAKE_BINARY_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
if(Python_EXECUTABLE)
|
if(Python_EXECUTABLE)
|
||||||
if(BUILD_LAMMPS_SHELL)
|
if(BUILD_LAMMPS_SHELL)
|
||||||
add_test(NAME LammpsShell
|
add_test(NAME LammpsShell
|
||||||
COMMAND ${Python_EXECUTABLE} -u ${CMAKE_CURRENT_SOURCE_DIR}/test_lammps_shell.py -v
|
COMMAND ${Python_EXECUTABLE} -u ${CMAKE_CURRENT_SOURCE_DIR}/test_lammps_shell.py -v
|
||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
WORKING_DIRECTORY ${LAMMPS_SHELL_EXE_DIR})
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
message(STATUS "Skipping Tests for LAMMPS tools: no suitable Python interpreter")
|
message(STATUS "Skipping Tests for LAMMPS tools: no suitable Python interpreter")
|
||||||
|
|||||||
Reference in New Issue
Block a user