diff --git a/CMakeLists.txt b/CMakeLists.txt index 62ef6f15e21dce1ac4b0858994416f6e2efbd4f9..3daefe3985c0182262d7541290ad1dcb65b4ee01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -985,7 +985,8 @@ if(HAVE_SOLVER) ${ENV_PETSC_DIR}/${ENV_PETSC_ARCH}/lib "") # petsc 3.1 creates only one library (libpetsc) if(NOT PETSC_LIBS) - find_library(PETSC_LIBS petsc PATHS ${ENV_PETSC_DIR}/${ENV_PETSC_ARCH}/lib) + find_library(PETSC_LIBS petsc PATHS ${ENV_PETSC_DIR}/${ENV_PETSC_ARCH}/lib + NO_DEFAULT_PATH) endif(NOT PETSC_LIBS) if(PETSC_LIBS) set_config_option(HAVE_PETSC "PETSc") @@ -1003,17 +1004,18 @@ if(HAVE_SOLVER) else(SLEPC_DIR) set(ENV_SLEPC_DIR $ENV{SLEPC_DIR}) endif(SLEPC_DIR) - find_library(SLEPC_LIB slepc PATHS ${ENV_SLEPC_DIR}/${ENV_PETSC_ARCH}/lib) + find_library(SLEPC_LIB slepc PATHS ${ENV_SLEPC_DIR}/${ENV_PETSC_ARCH}/lib + NO_DEFAULT_PATH) if(SLEPC_LIB) find_path(SLEPC_INC "slepc.h" PATHS ${ENV_SLEPC_DIR} PATH_SUFFIXES include - ${ENV_PETSC_ARCH}/include include/slepc) + ${ENV_PETSC_ARCH}/include include/slepc NO_DEFAULT_PATH) if(SLEPC_INC) message(STATUS "Using SLEPc dir: ${ENV_SLEPC_DIR}") set_config_option(HAVE_SLEPC "SLEPc") list(APPEND EXTERNAL_LIBRARIES ${SLEPC_LIB}) list(APPEND EXTERNAL_INCLUDES ${SLEPC_INC}) find_path(SLEPC_INC2 "slepcconf.h" PATHS ${ENV_SLEPC_DIR} - PATH_SUFFIXES ${ENV_PETSC_ARCH}/include) + PATH_SUFFIXES ${ENV_PETSC_ARCH}/include NO_DEFAULT_PATH) if(SLEPC_INC2) list(APPEND EXTERNAL_INCLUDES ${SLEPC_INC2}) endif(SLEPC_INC2)