Skip to content

Commit

Permalink
Add NO_DEFAULT_PATH to search for external dependencies in the thirdp…
Browse files Browse the repository at this point in the history
…aty directory

Replace tabs by spaces in cmake files
  • Loading branch information
Mathieu Bague committed Mar 7, 2017
1 parent 98a3b76 commit 935879f
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions cmake/FindDymola.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
# =============================================================================

if (NOT DYMOLA_HOME AND NOT $ENV{DYMOLA_HOME} STREQUAL "")
set(DYMOLA_HOME $ENV{DYMOLA_HOME})
set(DYMOLA_HOME $ENV{DYMOLA_HOME})
endif()

if (NOT DYMOLA_HOME AND NOT $ENV{DYMOLA_ROOT} STREQUAL "")
set(DYMOLA_HOME $ENV{DYMOLA_ROOT})
set(DYMOLA_HOME $ENV{DYMOLA_ROOT})
endif()

if (NOT DYMOLA_HOME OR NOT IS_DIRECTORY "${DYMOLA_HOME}")
Expand Down
8 changes: 4 additions & 4 deletions cmake/FindEurostag.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
# =============================================================================

if (NOT EUROSTAG_SDK_HOME AND NOT $ENV{EUROSTAG_SDK_HOME} STREQUAL "")
set(EUROSTAG_SDK_HOME $ENV{EUROSTAG_SDK_HOME})
set(EUROSTAG_SDK_HOME $ENV{EUROSTAG_SDK_HOME})
endif()

if (NOT EUROSTAG_SDK_HOME AND NOT $ENV{EUROSTAG_SDK_ROOT} STREQUAL "")
set(EUROSTAG_SDK_HOME $ENV{EUROSTAG_SDK_ROOT})
set(EUROSTAG_SDK_HOME $ENV{EUROSTAG_SDK_ROOT})
endif()

if (NOT EUROSTAG_SDK_HOME)
message(FATAL_ERROR "Eurostag SDK not found. The variable EUROSTAG_SDK_HOME is NOT set or is NOT a valid directory")
endif()

find_path(Eurostag_INCLUDE_DIR NAME api_eurostag.h HINTS ${EUROSTAG_SDK_HOME}/include)
find_path(Eurostag_INCLUDE_DIR NAME api_eurostag.h HINTS ${EUROSTAG_SDK_HOME}/include NO_DEFAULT_PATH)
mark_as_advanced(Eurostag_INCLUDE_DIR)

set(components
Expand All @@ -42,7 +42,7 @@ foreach(component ${components})
string(TOUPPER ${component} COMPONENT)
set(Eurostag_${component}_FIND_QUIETLY true)

find_library(Eurostag_${component}_LIBRARY lib${component}.a HINTS ${EUROSTAG_SDK_HOME}/lib)
find_library(Eurostag_${component}_LIBRARY lib${component}.a HINTS ${EUROSTAG_SDK_HOME}/lib NO_DEFAULT_PATH)
mark_as_advanced(Eurostag_${component}_LIBRARY)
find_package_handle_standard_args(Eurostag_${component} DEFAULT_MSG Eurostag_${component}_LIBRARY)

Expand Down
10 changes: 5 additions & 5 deletions cmake/FindHDF5.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@
# =============================================================================

if (NOT HDF5_HOME AND NOT $ENV{HDF5_HOME} STREQUAL "")
set(HDF5_HOME $ENV{HDF5_HOME})
set(HDF5_HOME $ENV{HDF5_HOME})
endif()

if (NOT HDF5_HOME AND NOT $ENV{HDF5_ROOT} STREQUAL "")
set(HDF5_HOME $ENV{HDF5_ROOT})
set(HDF5_HOME $ENV{HDF5_ROOT})
endif()

if (NOT HDF5_HOME)
message(FATAL_ERROR "HDF5 libraries not found. The variable HDF5_HOME is NOT set or is NOT a valid directory")
endif()

find_path(HDF5_INCLUDE_DIR NAME hdf5.h H5pubconf.h HINTS ${HDF5_HOME}/include)
find_path(HDF5_INCLUDE_DIR NAME hdf5.h H5pubconf.h HINTS ${HDF5_HOME}/include NO_DEFAULT_PATH)
if (USE_STATIC_LIBS)
find_library(HDF5_LIBRARY libhdf5.a HINTS ${HDF5_HOME}/lib)
find_library(HDF5_LIBRARY libhdf5.a HINTS ${HDF5_HOME}/lib NO_DEFAULT_PATH)
else()
find_library(HDF5_LIBRARY hdf5 HINTS ${HDF5_HOME}/lib)
find_library(HDF5_LIBRARY hdf5 HINTS ${HDF5_HOME}/lib NO_DEFAULT_PATH)
endif()

mark_as_advanced(HDF5_INCLUDE_DIR HDF5_LIBRARY)
Expand Down
6 changes: 3 additions & 3 deletions cmake/FindIntelFortran.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
# =============================================================================

if (NOT INTEL_HOME AND NOT $ENV{INTEL_HOME} STREQUAL "")
set(INTEL_HOME $ENV{INTEL_HOME})
set(INTEL_HOME $ENV{INTEL_HOME})
endif()

if (NOT INTEL_HOME AND NOT $ENV{INTEL_ROOT} STREQUAL "")
set(INTEL_HOME $ENV{INTEL_ROOT})
set(INTEL_HOME $ENV{INTEL_ROOT})
endif()

if (NOT INTEL_HOME)
Expand All @@ -28,7 +28,7 @@ foreach (component ${IntelFortran_FIND_COMPONENTS})
string(TOUPPER ${component} COMPONENT)
set(IntelFortran_${component}_FIND_QUIETLY true)

find_library(IntelFortran_${component}_LIBRARY ${component} HINTS ${INTEL_HOME}/lib/intel64)
find_library(IntelFortran_${component}_LIBRARY ${component} HINTS ${INTEL_HOME}/lib/intel64 NO_DEFAULT_PATH)
mark_as_advanced(IntelFortran_${component}_LIBRARY)
find_package_handle_standard_args(IntelFortran_${component} DEFAULT_MSG IntelFortran_${component}_LIBRARY)

Expand Down
10 changes: 5 additions & 5 deletions cmake/FindLog4cpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
# =============================================================================

if (NOT LOG4CPP_HOME AND NOT $ENV{LOG4CPP_HOME} STREQUAL "")
set(LOG4CPP_HOME $ENV{LOG4CPP_HOME})
set(LOG4CPP_HOME $ENV{LOG4CPP_HOME})
endif()

if (NOT LOG4CPP_HOME AND NOT $ENV{LOG4CPP_ROOT} STREQUAL "")
set(LOG4CPP_HOME $ENV{LOG4CPP_ROOT})
set(LOG4CPP_HOME $ENV{LOG4CPP_ROOT})
endif()

if (NOT LOG4CPP_HOME)
message(FATAL_ERROR "Log4Cpp libraries not found. The variable LOG4CPP_HOME is NOT set or is NOT a valid directory")
endif()

find_path(Log4cpp_INCLUDE_DIR NAME log4cpp/Category.hh log4cpp/Appender.hh HINTS ${LOG4CPP_HOME}/include)
find_path(Log4cpp_INCLUDE_DIR NAME log4cpp/Category.hh log4cpp/Appender.hh HINTS ${LOG4CPP_HOME}/include NO_DEFAULT_PATH)
if (USE_STATIC_LIBS)
find_library(Log4cpp_LIBRARY liblog4cpp.a HINTS ${LOG4CPP_HOME}/lib)
find_library(Log4cpp_LIBRARY liblog4cpp.a HINTS ${LOG4CPP_HOME}/lib NO_DEFAULT_PATH)
else()
find_library(Log4cpp_LIBRARY log4cpp HINTS ${LOG4CPP_HOME}/lib)
find_library(Log4cpp_LIBRARY log4cpp HINTS ${LOG4CPP_HOME}/lib NO_DEFAULT_PATH)
endif()

mark_as_advanced(Log4cpp_INCLUDE_DIR Log4cpp_LIBRARY)
Expand Down
10 changes: 5 additions & 5 deletions cmake/FindMatio.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@ endfunction()


if (NOT MATIO_HOME AND NOT $ENV{MATIO_HOME} STREQUAL "")
set(MATIO_HOME $ENV{MATIO_HOME})
set(MATIO_HOME $ENV{MATIO_HOME})
endif()

if (NOT MATIO_HOME AND NOT $ENV{MATIO_ROOT} STREQUAL "")
set(MATIO_HOME $ENV{MATIO_ROOT})
set(MATIO_HOME $ENV{MATIO_ROOT})
endif()

if (NOT MATIO_HOME)
message(FATAL_ERROR "Matio libraries not found. The variable MATIO_HOME is NOT set or is NOT a valid directory")
endif()

find_path(Matio_INCLUDE_DIR NAME matio.h matio_pubconf.h HINTS ${MATIO_HOME}/include)
find_path(Matio_INCLUDE_DIR NAME matio.h matio_pubconf.h HINTS ${MATIO_HOME}/include NO_DEFAULT_PATH)
if (USE_STATIC_LIBS)
find_library(Matio_LIBRARY libmatio.a HINTS ${MATIO_HOME}/lib)
find_library(Matio_LIBRARY libmatio.a HINTS ${MATIO_HOME}/lib NO_DEFAULT_PATH)
else()
find_library(Matio_LIBRARY matio HINTS ${MATIO_HOME}/lib)
find_library(Matio_LIBRARY matio HINTS ${MATIO_HOME}/lib NO_DEFAULT_PATH)
endif()

mark_as_advanced(Matio_INCLUDE_DIR Matio_LIBRARY)
Expand Down
6 changes: 3 additions & 3 deletions cmake/FindMatlab.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
# =============================================================================

if (NOT MATLAB_HOME AND NOT $ENV{MATLAB_HOME} STREQUAL "")
set(MATLAB_HOME $ENV{MATLAB_HOME})
set(MATLAB_HOME $ENV{MATLAB_HOME})
endif()

if (NOT MATLAB_HOME AND NOT $ENV{MATLAB_ROOT} STREQUAL "")
set(MATLAB_HOME $ENV{MATLAB_ROOT})
set(MATLAB_HOME $ENV{MATLAB_ROOT})
endif()

if (NOT MATLAB_HOME)
message(FATAL_ERROR "Matlab not found. The variable MATLAB_HOME is NOT set or is NOT a valid directory")
endif()

find_program(Matlab_COMPILER mcc HINTS ${MATLAB_HOME}/bin)
find_program(Matlab_COMPILER mcc HINTS ${MATLAB_HOME}/bin NO_DEFAULT_PATH)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Matlab "Matlab compiler not found." Matlab_COMPILER)

Expand Down

0 comments on commit 935879f

Please sign in to comment.