Skip to content

Commit

Permalink
Allow detecting OpenMM source tree in parent folder (convenience check)
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomofiorin committed Dec 12, 2023
1 parent f8ed169 commit 90b0c39
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions devel-tools/build_test_library.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ if(COLVARS_LEPTON)
if(NOT DEFINED LEPTON_DIR)
set(LEPTON_DIR "${COLVARS_SOURCE_DIR}/openmm-source/libraries/lepton")
if(NOT EXISTS ${LEPTON_DIR})
# Try the parent folder
get_filename_component(LEPTON_DIR ${COLVARS_SOURCE_DIR} DIRECTORY)
set(LEPTON_DIR "${LEPTON_DIR}/openmm-source/libraries/lepton")
endif()
if(NOT EXISTS ${LEPTON_DIR})
# Giving up, cloning OpenMM
execute_process(COMMAND git clone --depth=1 https://github.com/openmm/openmm.git "${COLVARS_SOURCE_DIR}/openmm-source")
endif()
message(STATUS "Using Lepton library from: ${LEPTON_DIR}")
Expand Down

0 comments on commit 90b0c39

Please sign in to comment.