use CMAKE_PREFIX_PATH instead of ADDITIONAL_PATHS

This commit is contained in:
Matthias Hochsteger 2016-02-15 09:08:26 +01:00
parent 395a8f6d0c
commit fcf5fd5fbb

View File

@ -52,12 +52,10 @@ endif(INTEL_MIC)
#######################################################################
# Append install paths of software in non-standard paths (e.g. openmpi, metis, intel mkl, ...)
# cmake -DUSE_MPI=ON -DADDITIONAL_PATHS="/opt/openmpi165;/opt/metis51" ../
# cmake -DUSE_MPI=ON -DCMAKE_PREFIX_PATH="/opt/openmpi165;/opt/metis51" ../
set(ADDITIONAL_PATHS "" CACHE PATH "List of paths to additional libraries in non-standard locations, seperated by ';'")
if (ADDITIONAL_PATHS)
list(REVERSE CMAKE_SYSTEM_PREFIX_PATH)
list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${ADDITIONAL_PATHS})
list(REVERSE CMAKE_SYSTEM_PREFIX_PATH)
set(CMAKE_PREFIX_PATH ${ADDITIONAL_PATHS})
endif (ADDITIONAL_PATHS)
#######################################################################
@ -481,4 +479,7 @@ endif(USE_PYTHON)
message("
------------------------------------------------------------------------
")
if (ADDITIONAL_PATHS)
message(WARNING "The use of ADDITIONAL_PATHS is depricated, use CMAKE_PREFIX_PATH instead")
endif (ADDITIONAL_PATHS)