Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 32c1ba6a authored by PRUVOST Florent's avatar PRUVOST Florent
Browse files

simgrid.h may not exist anymore, look for simgrid_config.h instead

parent 2f901956
No related branches found
No related tags found
No related merge requests found
...@@ -124,37 +124,46 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT SIMGRID_FOUND) ...@@ -124,37 +124,46 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT SIMGRID_FOUND)
# Try to find the simgrid header in the given paths # Try to find the simgrid header in the given paths
# ------------------------------------------------- # -------------------------------------------------
set(SIMGRID_hdrs_to_find "simgrid.h;simgrid_config.h")
# call cmake macro to find the header path # call cmake macro to find the header path
if(SIMGRID_INCDIR) if(SIMGRID_INCDIR)
set(SIMGRID_simgrid.h_DIRS "SIMGRID_simgrid.h_DIRS-NOTFOUND") foreach(simgrid_hdr ${SIMGRID_hdrs_to_find})
find_path(SIMGRID_simgrid.h_DIRS set(SIMGRID_${simgrid_hdr}_DIRS "SIMGRID_${simgrid_hdr}_DIRS-NOTFOUND")
NAMES simgrid.h find_path(SIMGRID_${simgrid_hdr}_DIRS
HINTS ${SIMGRID_INCDIR}) NAMES ${simgrid_hdr}
HINTS ${SIMGRID_INCDIR})
mark_as_advanced(SIMGRID_${simgrid_hdr}_DIRS)
endforeach()
else() else()
if(SIMGRID_DIR) if(SIMGRID_DIR)
set(SIMGRID_simgrid.h_DIRS "SIMGRID_simgrid.h_DIRS-NOTFOUND") foreach(simgrid_hdr ${SIMGRID_hdrs_to_find})
find_path(SIMGRID_simgrid.h_DIRS set(SIMGRID_${simgrid_hdr}_DIRS "SIMGRID_${simgrid_hdr}_DIRS-NOTFOUND")
NAMES simgrid.h find_path(SIMGRID_${simgrid_hdr}_DIRS
HINTS ${SIMGRID_DIR} NAMES ${simgrid_hdr}
PATH_SUFFIXES "include" "include/simgrid") HINTS ${SIMGRID_DIR}
PATH_SUFFIXES "include" "include/simgrid")
mark_as_advanced(SIMGRID_${simgrid_hdr}_DIRS)
endforeach()
else() else()
set(SIMGRID_simgrid.h_DIRS "SIMGRID_simgrid.h_DIRS-NOTFOUND") set(SIMGRID_${simgrid_hdr}_DIRS "SIMGRID_${simgrid_hdr}_DIRS-NOTFOUND")
find_path(SIMGRID_simgrid.h_DIRS find_path(SIMGRID_${simgrid_hdr}_DIRS
NAMES simgrid.h NAMES ${simgrid_hdr}
HINTS ${_inc_env} HINTS ${_inc_env}
PATH_SUFFIXES "simgrid") PATH_SUFFIXES "simgrid")
endif() mark_as_advanced(SIMGRID_${simgrid_hdr}_DIRS)
endif()
endforeach()
endif() endif()
mark_as_advanced(SIMGRID_simgrid.h_DIRS)
# Add path to cmake variable # Add path to cmake variable
# ------------------------------------ # ------------------------------------
if (SIMGRID_simgrid.h_DIRS) if (SIMGRID_simgrid_config.h_DIRS)
set(SIMGRID_INCLUDE_DIRS "${SIMGRID_simgrid.h_DIRS}") set(SIMGRID_INCLUDE_DIRS "${SIMGRID_simgrid_config.h_DIRS}")
else () else ()
set(SIMGRID_INCLUDE_DIRS "SIMGRID_INCLUDE_DIRS-NOTFOUND") set(SIMGRID_INCLUDE_DIRS "SIMGRID_INCLUDE_DIRS-NOTFOUND")
if(NOT SIMGRID_FIND_QUIETLY) if(NOT SIMGRID_FIND_QUIETLY)
message(STATUS "Looking for simgrid -- simgrid.h not found") message(STATUS "Looking for simgrid -- simgrid_config.h not found")
endif() endif()
endif () endif ()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment