Unverified Commit 954f7282 authored by Richard Berger's avatar Richard Berger
Browse files

Always set CMAKE_LIBRARY_PATH if environment variable LIBRARY_PATH is set

This resolves issues such as CUDA_CUDA_LIBRARY NOTFOUND if LIBRARY_PATH is
set to the CUDA stubs folder, but ignored by CMake.
parent 2010cf97
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -32,6 +32,12 @@ endif()
# Cmake modules/macros are in a subdirectory to keep this file cleaner
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Modules)

# make sure LIBRARY_PATH is set if environment variable is set
if (DEFINED ENV{LIBRARY_PATH})
  set(CMAKE_LIBRARY_PATH "$ENV{LIBRARY_PATH};${CMAKE_LIBRARY_PATH}")
  message(STATUS "Setting CMAKE_LIBRARY_PATH to ${CMAKE_LIBRARY_PATH}")
endif()

include(LAMMPSUtils)

get_lammps_version(${LAMMPS_SOURCE_DIR}/version.h PROJECT_VERSION)