Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commits (4)
......@@ -7,7 +7,6 @@ Find:
paths:
- modules/find/tests/build/Testing/
script:
- source /etc/profile.d/spack.sh
- cd modules/find/tests
- mkdir -p build
- cd build
......
......@@ -80,7 +80,7 @@
# Here is the order of precedence:
# 1) we look in cmake variable BLAS_LIBDIR or BLAS_DIR (we guess the libdirs) if defined
# 2) we look in environment variable BLAS_LIBDIR or BLAS_DIR (we guess the libdirs) if defined
# 3) we look in common environnment variables depending on the system (INCLUDE, C_INCLUDE_PATH, CPATH - LIB, DYLD_LIBRARY_PATH, LD_LIBRARY_PATH)
# 3) we look in common environnment variables depending on the system (INCLUDE, C_INCLUDE_PATH, CPATH - LIB, DYLD_LIBRARY_PATH, LD_LIBRARY_PATH, LIBRARY_PATH)
# 4) we look in common system paths depending on the system, see for example paths contained in the following cmake variables:
# - CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES, CMAKE_C_IMPLICIT_LINK_DIRECTORIES
#
......@@ -187,6 +187,7 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread)
list(APPEND _libdir "${ENV_MKLROOT}/lib/ia32")
endif()
endif()
list(APPEND _libdir "$ENV{LIBRARY_PATH}")
if (WIN32)
string(REPLACE ":" ";" _libdir2 "$ENV{LIB}")
elseif (APPLE)
......@@ -466,13 +467,15 @@ if( (NOT BLAS_FOUND_WITH_PKGCONFIG) OR BLAS_GIVEN_BY_USER )
endif()
endif()
list(APPEND _libdir "$ENV{LIBRARY_PATH}")
if (WIN32)
string(REPLACE ":" ";" _libdir "$ENV{LIB}")
string(REPLACE ":" ";" _libdir2 "$ENV{LIB}")
elseif (APPLE)
string(REPLACE ":" ";" _libdir "$ENV{DYLD_LIBRARY_PATH}")
string(REPLACE ":" ";" _libdir2 "$ENV{DYLD_LIBRARY_PATH}")
else ()
string(REPLACE ":" ";" _libdir "$ENV{LD_LIBRARY_PATH}")
string(REPLACE ":" ";" _libdir2 "$ENV{LD_LIBRARY_PATH}")
endif ()
list(APPEND _libdir "${_libdir2}")
list(APPEND _libdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
# libiomp5
# --------
......@@ -1445,7 +1448,7 @@ if( (NOT BLAS_FOUND_WITH_PKGCONFIG) OR BLAS_GIVEN_BY_USER )
"\nPlease indicate where to find blas libraries. You have three options:\n"
"- Option 1: Provide the installation directory of BLAS library with cmake option: -DBLAS_DIR=your/path/to/blas\n"
"- Option 2: Provide the directory where to find BLAS libraries with cmake option: -DBLAS_LIBDIR=your/path/to/blas/libs\n"
"- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n"
"- Option 3: Update your environment variable (LIBRARY_PATH or Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n"
"\nTo follow libraries detection more precisely you can activate a verbose mode with -DBLAS_VERBOSE=ON at cmake configure."
"\nYou could also specify a BLAS vendor to look for by setting -DBLA_VENDOR=blas_vendor_name."
"\nList of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit),"
......@@ -1487,7 +1490,7 @@ if( (NOT BLAS_FOUND_WITH_PKGCONFIG) OR BLAS_GIVEN_BY_USER )
"\nPlease indicate where to find blas libraries. You have three options:\n"
"- Option 1: Provide the installation directory of BLAS library with cmake option: -DBLAS_DIR=your/path/to/blas\n"
"- Option 2: Provide the directory where to find BLAS libraries with cmake option: -DBLAS_LIBDIR=your/path/to/blas/libs\n"
"- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n"
"- Option 3: Update your environment variable (LIBRARY_PATH or Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n"
"\nTo follow libraries detection more precisely you can activate a verbose mode with -DBLAS_VERBOSE=ON at cmake configure."
"\nYou could also specify a BLAS vendor to look for by setting -DBLA_VENDOR=blas_vendor_name."
"\nList of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit),"
......
......@@ -69,7 +69,7 @@
# Here is the order of precedence:
# 1) we look in cmake variable CBLAS_LIBDIR or CBLAS_DIR (we guess the libdirs) if defined
# 2) we look in environment variable CBLAS_LIBDIR or CBLAS_DIR (we guess the libdirs) if defined
# 3) we look in common environnment variables depending on the system (INCLUDE, C_INCLUDE_PATH, CPATH - LIB, DYLD_LIBRARY_PATH, LD_LIBRARY_PATH)
# 3) we look in common environnment variables depending on the system (INCLUDE, C_INCLUDE_PATH, CPATH - LIB, DYLD_LIBRARY_PATH, LD_LIBRARY_PATH, LIBRARY_PATH)
# 4) we look in common system paths depending on the system, see for example paths contained in the following cmake variables:
# - CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES, CMAKE_C_IMPLICIT_LINK_DIRECTORIES
#
......@@ -291,16 +291,16 @@ if (BLAS_FOUND)
list(APPEND _lib_env "${ENV_CBLAS_DIR}")
list(APPEND _lib_env "${ENV_CBLAS_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -413,35 +413,35 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT CHAMELEON_FOUN
# ---------------------------------------------------
# call cmake macro to find the header path
if(CHAMELEON_INCDIR)
set(CHAMELEON_morse.h_DIRS "CHAMELEON_morse.h_DIRS-NOTFOUND")
find_path(CHAMELEON_morse.h_DIRS
NAMES morse.h
set(CHAMELEON_chameleon.h_DIRS "CHAMELEON_chameleon.h_DIRS-NOTFOUND")
find_path(CHAMELEON_chameleon.h_DIRS
NAMES chameleon.h
HINTS ${CHAMELEON_INCDIR})
else()
if(CHAMELEON_DIR)
set(CHAMELEON_morse.h_DIRS "CHAMELEON_morse.h_DIRS-NOTFOUND")
find_path(CHAMELEON_morse.h_DIRS
NAMES morse.h
set(CHAMELEON_chameleon.h_DIRS "CHAMELEON_chameleon.h_DIRS-NOTFOUND")
find_path(CHAMELEON_chameleon.h_DIRS
NAMES chameleon.h
HINTS ${CHAMELEON_DIR}
PATH_SUFFIXES "include" "include/chameleon")
else()
set(CHAMELEON_morse.h_DIRS "CHAMELEON_morse.h_DIRS-NOTFOUND")
find_path(CHAMELEON_morse.h_DIRS
NAMES morse.h
set(CHAMELEON_chameleon.h_DIRS "CHAMELEON_chameleon.h_DIRS-NOTFOUND")
find_path(CHAMELEON_chameleon.h_DIRS
NAMES chameleon.h
HINTS ${_inc_env}
PATH_SUFFIXES "chameleon")
endif()
endif()
mark_as_advanced(CHAMELEON_morse.h_DIRS)
mark_as_advanced(CHAMELEON_chameleon.h_DIRS)
# If found, add path to cmake variable
# ------------------------------------
if (CHAMELEON_morse.h_DIRS)
set(CHAMELEON_INCLUDE_DIRS "${CHAMELEON_morse.h_DIRS}")
if (CHAMELEON_chameleon.h_DIRS)
set(CHAMELEON_INCLUDE_DIRS "${CHAMELEON_chameleon.h_DIRS}")
else ()
set(CHAMELEON_INCLUDE_DIRS "CHAMELEON_INCLUDE_DIRS-NOTFOUND")
if(NOT CHAMELEON_FIND_QUIETLY)
message(STATUS "Looking for chameleon -- morse.h not found")
message(STATUS "Looking for chameleon -- chameleon.h not found")
endif()
endif()
......@@ -459,16 +459,16 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT CHAMELEON_FOUN
list(APPEND _lib_env "${ENV_CHAMELEON_DIR}")
list(APPEND _lib_env "${ENV_CHAMELEON_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......@@ -720,7 +720,7 @@ if(CHAMELEON_LIBRARIES)
# test link
unset(CHAMELEON_WORKS CACHE)
include(CheckFunctionExists)
check_function_exists(MORSE_Init CHAMELEON_WORKS)
check_function_exists(CHAMELEON_Init CHAMELEON_WORKS)
mark_as_advanced(CHAMELEON_WORKS)
if(CHAMELEON_WORKS)
......@@ -732,7 +732,7 @@ if(CHAMELEON_LIBRARIES)
set(CHAMELEON_LDFLAGS_OTHER_DEP "${REQUIRED_LDFLAGS}")
else()
if(NOT CHAMELEON_FIND_QUIETLY)
message(STATUS "Looking for chameleon : test of MORSE_Init fails")
message(STATUS "Looking for chameleon : test of CHAMELEON_Init fails")
message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}")
message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}")
message(STATUS "CMAKE_REQUIRED_FLAGS: ${CMAKE_REQUIRED_FLAGS}")
......
......@@ -119,16 +119,16 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT EZTRACE_FOUND)
# Add system library paths to search lib
# --------------------------------------
unset(_lib_env)
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
list(REMOVE_DUPLICATES _lib_env)
# set paths where to look for
......
......@@ -241,16 +241,16 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT FABULOUS_FOUND
list(APPEND _lib_env "${ENV_FABULOUS_DIR}")
list(APPEND _lib_env "${ENV_FABULOUS_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -503,17 +503,16 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR
list(APPEND _lib_env "${ENV_MKLROOT}/lib/ia32")
endif()
endif()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -195,16 +195,16 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT FXT_FOUND) OR
list(APPEND _lib_env "${ENV_FXT_DIR}")
list(APPEND _lib_env "${ENV_FXT_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -195,16 +195,16 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT GTG_FOUND) OR
list(APPEND _lib_env "${ENV_GTG_DIR}")
list(APPEND _lib_env "${ENV_GTG_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -190,16 +190,16 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT HQR_FOUND) OR
list(APPEND _lib_env "${ENV_HQR_DIR}")
list(APPEND _lib_env "${ENV_HQR_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -198,16 +198,16 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT HWLOC_FOUND) O
list(APPEND _lib_env "${ENV_HWLOC_DIR}")
list(APPEND _lib_env "${ENV_HWLOC_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -161,16 +161,16 @@ elseif(ENV_HYPRE_DIR)
list(APPEND _lib_env "${ENV_HYPRE_DIR}")
list(APPEND _lib_env "${ENV_HYPRE_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......@@ -258,7 +258,7 @@ if(HYPRE_LIBRARIES)
endif()
# libstdc++
set(stdcpp_LIBRARY "stdcpp_LIBRARY-NOTFOUND")
find_library(stdcpp_LIBRARY NAMES stdc++)
find_library(stdcpp_LIBRARY NAMES stdc++ NO_SYSTEM_ENVIRONMENT_PATH)
mark_as_advanced(stdcpp_LIBRARY)
if(stdcpp_LIBRARY)
list(APPEND REQUIRED_LIBS "${stdcpp_LIBRARY}")
......
......@@ -187,6 +187,7 @@ macro(Check_Lapack_Libraries LIBRARIES _prefix _name _flags _list _blas _threads
list(APPEND _libdir "${ENV_MKLROOT}/lib/ia32")
endif()
endif()
list(APPEND _libdir "$ENV{LIBRARY_PATH}")
if (WIN32)
string(REPLACE ":" ";" _libdir2 "$ENV{LIB}")
elseif (APPLE)
......
......@@ -291,16 +291,16 @@ if (LAPACK_FOUND)
list(APPEND _lib_env "${ENV_LAPACKE_DIR}")
list(APPEND _lib_env "${ENV_LAPACKE_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -256,16 +256,16 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT MAGMA_FOUND) O
list(APPEND _lib_env "${ENV_MAGMA_DIR}")
list(APPEND _lib_env "${ENV_MAGMA_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -139,16 +139,16 @@ elseif(ENV_METIS_DIR)
list(APPEND _lib_env "${ENV_METIS_DIR}")
list(APPEND _lib_env "${ENV_METIS_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -308,16 +308,16 @@ elseif(ENV_MUMPS_DIR)
list(APPEND _lib_env "${ENV_MUMPS_DIR}")
list(APPEND _lib_env "${ENV_MUMPS_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -176,16 +176,16 @@ elseif(ENV_PAMPA_DIR)
list(APPEND _lib_env "${ENV_PAMPA_DIR}")
list(APPEND _lib_env "${ENV_PAMPA_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -195,16 +195,16 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT PAPI_FOUND) OR
list(APPEND _lib_env "${ENV_PAPI_DIR}")
list(APPEND _lib_env "${ENV_PAPI_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -163,16 +163,16 @@ elseif(ENV_PARMETIS_DIR)
list(APPEND _lib_env "${ENV_PARMETIS_DIR}")
list(APPEND _lib_env "${ENV_PARMETIS_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -382,16 +382,16 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT PARSEC_FOUND)
list(APPEND _lib_env "${ENV_PARSEC_DIR}")
list(APPEND _lib_env "${ENV_PARSEC_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -520,16 +520,16 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT PASTIX_FOUND)
list(APPEND _lib_env "${ENV_PASTIX_DIR}")
list(APPEND _lib_env "${ENV_PASTIX_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -196,16 +196,16 @@ elseif(ENV_PTSCOTCH_DIR)
list(APPEND _lib_env "${ENV_PTSCOTCH_DIR}")
list(APPEND _lib_env "${ENV_PTSCOTCH_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -25,13 +25,15 @@
# _prefix: the name of the CMake variable used when pkg_search_module was called
# e.g. for pkg_search_module(BLAS blas) _prefix would be BLAS
macro(FIND_PKGCONFIG_LIBRARIES_ABSOLUTE_PATH _prefix)
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
# non static case
set(${_prefix}_LIBRARIES_COPY "${${_prefix}_LIBRARIES}")
......
......@@ -185,16 +185,16 @@ elseif(ENV_QUARK_DIR)
list(APPEND _lib_env "${ENV_QUARK_DIR}")
list(APPEND _lib_env "${ENV_QUARK_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -169,6 +169,7 @@ macro(Check_Scalapack_Libraries LIBRARIES _prefix _name _flags _list _blaslapack
list(APPEND _libdir "${ENV_MKLROOT}/lib/ia32")
endif()
endif()
list(APPEND _libdir "$ENV{LIBRARY_PATH}")
if (WIN32)
string(REPLACE ":" ";" _libdir2 "$ENV{LIB}")
elseif (APPLE)
......
......@@ -165,16 +165,16 @@ elseif(ENV_SCOTCH_DIR)
list(APPEND _lib_env "${ENV_SCOTCH_DIR}")
list(APPEND _lib_env "${ENV_SCOTCH_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -205,16 +205,16 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT SIMGRID_FOUND)
list(APPEND _lib_env "${ENV_SIMGRID_DIR}")
list(APPEND _lib_env "${ENV_SIMGRID_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -239,16 +239,16 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT SPM_FOUND) OR
list(APPEND _lib_env "${ENV_SPM_DIR}")
list(APPEND _lib_env "${ENV_SPM_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -544,16 +544,16 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND)
list(APPEND _lib_env "${ENV_STARPU_DIR}")
list(APPEND _lib_env "${ENV_STARPU_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......@@ -759,7 +759,6 @@ if(STARPU_LIBRARIES)
list(APPEND REQUIRED_LIBDIRS "${SIMGRID_LIBRARY_DIRS}")
endif()
list(APPEND REQUIRED_LIBS "${SIMGRID_LIBRARIES}")
list(APPEND REQUIRED_FLAGS "-include starpu_simgrid_wrap.h")
endif()
# BLAS
if (BLAS_FOUND AND STARPU_LOOK_FOR_BLAS)
......
......@@ -138,16 +138,16 @@ elseif(ENV_SUITESPARSE_DIR)
list(APPEND _lib_env "${ENV_SUITESPARSE_DIR}")
list(APPEND _lib_env "${ENV_SUITESPARSE_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -134,16 +134,16 @@ if (LAPACK_FOUND)
list(APPEND _lib_env "${ENV_TMG_DIR}")
list(APPEND _lib_env "${ENV_TMG_DIR}/lib")
else()
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
endif()
list(REMOVE_DUPLICATES _lib_env)
......
......@@ -25,13 +25,15 @@
# hints_paths (input): additional paths to add when looking for libraries
macro(LIBRARIES_ABSOLUTE_PATH lib_list hints_paths)
# collect environment paths to dig
list(APPEND _lib_env "$ENV{LIBRARY_PATH}")
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${_lib_env2}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
# copy the lib list
set (${lib_list}_COPY "${${lib_list}}")
......
......@@ -4,7 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>MORSE CMake "Find modules" documentation</title>
<!-- 2016-09-15 jeu. 08:01 -->
<!-- 2018-07-26 jeu. 15:38 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="generator" content="Org-mode" />
<meta name="author" content="HiePACS" />
......@@ -114,22 +114,14 @@ it is installed, etc.
<h2 id="sec-2"><span class="section-number-2">2</span> How CMake is aware of these specific modules?</h2>
<div class="outline-text-2" id="text-2">
<p>
<code>find_package(LIBNAME)</code> rely on a CMake module file called
<i>FindLIBNAME.cmake</i> which should lies in a directory set in the CMake
variable <code>CMAKE_MODULE_PATH</code>. For example, <code>FindLIBNAME.cmake</code> is in the
relative path <code>./cmake_modules/FindLIBNAME.cmake</code>
To use MORSE modules you should call the <b>MorseInit</b> module as follows:
</p>
<pre class="example">
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules")
find_package(LIBNAME)
</pre>
<p>
To use MORSE modules you can add the path to the modules in your CMake
project like this
</p>
<pre class="example">
list(APPEND CMAKE_MODULE_PATH "${MORSE_DISTRIB_DIR}/cmake_modules/morse/find" )
# For example if Morse CMake modules are located in ./cmake_modules/morse_cmake
# append this directory to the list of directories containing CMake modules
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules/morse_cmake/modules" )
# Include the init module
include(MorseInit)
</pre>
</div>
</div>
......@@ -142,11 +134,12 @@ The general process consists in looking into some system paths known
from CMake to find headers and libraries and define in output some
CMake variables the user need to link with his dependency. Additionaly
to the system paths, some environment variable can also be scanned
like <code>LD_LIBRARY_PATH</code> and <code>CPATH</code>. A custom CMake cache variable
<code>LIBNAME_DIR</code> is also introduced in our modules in order to let users
indicate directly during the "configure" step a specific installation
directory for the library (e.g. where are located the include/, lib/,
etc, sub-directories). The priority order is the following:
like <code>LIBRARY_PATH</code> <code>LD_LIBRARY_PATH</code> and <code>CPATH</code>. A custom CMake cache
variable <code>LIBNAME_DIR</code> is also introduced in our modules in order to let
users indicate directly during the "configure" step a specific
installation directory for the library (e.g. where are located the
include/, lib/, etc, sub-directories). The priority order is the
following:
</p>
<ol class="org-ol">
<li>The CMake variable <code>LIBNAME_DIR</code> is set or both <code>LIBNAME_INCDIR</code> and
......@@ -166,19 +159,18 @@ environment (cf. PKG_CONFIG_PATH environment variable) and is used
<code>INCLUDE</code>, <code>C_INCLUDE_PATH</code>, <code>CPATH</code>, <code>INCLUDE_PATH</code>
</li>
<li>scan the system paths for headers: look into path present in
the CMake variable
<code>CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES</code>
the CMake variable <code>CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES</code>
</li>
</ul>
</li>
<li>for libraries:
<ul class="org-ul">
<li>scan the paths present in the following environment variables
<code>LIB</code> (Windows), <code>DYLD_LIBRARY_PATH</code> (Mac OS X), <code>LD_LIBRARY_PATH</code> (Linux)
<code>LIBRARY_PATH</code>, <code>LIB</code> (Windows), <code>DYLD_LIBRARY_PATH</code> (Mac OS X),
<code>LD_LIBRARY_PATH</code> (Linux)
</li>
<li>scan the system paths for headers: look into path present in
the CMake variable
<code>CMAKE_C_IMPLICIT_LINK_DIRECTORIES</code>
the CMake variable <code>CMAKE_C_IMPLICIT_LINK_DIRECTORIES</code>
</li>
</ul>
</li>
......@@ -216,7 +208,7 @@ during the test. The precise error can also be found in the
<div class="outline-text-3" id="text-3-1">
<p>
If the user does not change the environment (do not modify environment
variables like <code>LD_LIBRARY_PATH</code>), and gives no hint at all about the
variables like <code>LIBRARY_PATH</code>, <code>LD_LIBRARY_PATH</code>), and gives no hint at all about the
location of the libraries, the module will match the situation 4.2 and
will look into system paths.
</p>
......@@ -274,8 +266,8 @@ can be used and the output variables are explained here.
</div>
<div id="postamble" class="status">
<p class="author">Author: HiePACS</p>
<p class="date">Created: 2016-09-15 jeu. 08:01</p>
<p class="creator"><a href="http://www.gnu.org/software/emacs/">Emacs</a> 24.5.1 (<a href="http://orgmode.org">Org</a> mode 8.2.10)</p>
<p class="date">Created: 2018-07-26 jeu. 15:38</p>
<p class="creator"><a href="http://www.gnu.org/software/emacs/">Emacs</a> 25.2.2 (<a href="http://orgmode.org">Org</a> mode 8.2.10)</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>
......
......@@ -52,11 +52,12 @@ The general process consists in looking into some system paths known
from CMake to find headers and libraries and define in output some
CMake variables the user need to link with his dependency. Additionaly
to the system paths, some environment variable can also be scanned
like ~LD_LIBRARY_PATH~ and ~CPATH~. A custom CMake cache variable
~LIBNAME_DIR~ is also introduced in our modules in order to let users
indicate directly during the "configure" step a specific installation
directory for the library (e.g. where are located the include/, lib/,
etc, sub-directories). The priority order is the following:
like ~LIBRARY_PATH~ ~LD_LIBRARY_PATH~ and ~CPATH~. A custom CMake cache
variable ~LIBNAME_DIR~ is also introduced in our modules in order to let
users indicate directly during the "configure" step a specific
installation directory for the library (e.g. where are located the
include/, lib/, etc, sub-directories). The priority order is the
following:
1) The CMake variable ~LIBNAME_DIR~ is set or both ~LIBNAME_INCDIR~ and
~LIBNAME_LIBDIR~ are set
2) The environment variable ~LIBNAME_DIR~ is set or both ~LIBNAME_INCDIR~ and
......@@ -71,7 +72,8 @@ etc, sub-directories). The priority order is the following:
the CMake variable ~CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES~
b) for libraries:
- scan the paths present in the following environment variables
~LIB~ (Windows), ~DYLD_LIBRARY_PATH~ (Mac OS X), ~LD_LIBRARY_PATH~ (Linux)
~LIBRARY_PATH~, ~LIB~ (Windows), ~DYLD_LIBRARY_PATH~ (Mac OS X),
~LD_LIBRARY_PATH~ (Linux)
- scan the system paths for headers: look into path present in
the CMake variable ~CMAKE_C_IMPLICIT_LINK_DIRECTORIES~
......@@ -95,7 +97,7 @@ during the test. The precise error can also be found in the
** How to act on the searching process?
If the user does not change the environment (do not modify environment
variables like ~LD_LIBRARY_PATH~), and gives no hint at all about the
variables like ~LIBRARY_PATH~, ~LD_LIBRARY_PATH~), and gives no hint at all about the
location of the libraries, the module will match the situation 4.2 and
will look into system paths.
......
......@@ -82,7 +82,7 @@ if (ENABLE_CTEST)
CBLAS
CHAMELEON
CPPCHECK
EZTRACE
# EZTRACE # not installed yet, we should do it
FABULOUS
FFTW
FXT
......