Commit ff9c6a27 authored by PRUVOST Florent's avatar PRUVOST Florent
Browse files

adapt Chameleon CMakeLists to be used with SIMGRID as a component of STARPU

parent 12f9ec3b
...@@ -567,6 +567,8 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/") ...@@ -567,6 +567,8 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
if(CHAMELEON_USE_CUDA) if(CHAMELEON_USE_CUDA)
list(APPEND STARPU_COMPONENT_LIST "CUDA") list(APPEND STARPU_COMPONENT_LIST "CUDA")
endif() endif()
else()
set(STARPU_COMPONENT_LIST "SIMGRID")
endif() endif()
if(CHAMELEON_USE_MPI) if(CHAMELEON_USE_MPI)
list(APPEND STARPU_COMPONENT_LIST "MPI") list(APPEND STARPU_COMPONENT_LIST "MPI")
...@@ -583,12 +585,12 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/") ...@@ -583,12 +585,12 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
message("-- ${Blue}Add definition CHAMELEON_SCHED_STARPU" message("-- ${Blue}Add definition CHAMELEON_SCHED_STARPU"
" - Activate StarPU in Chameleon${ColourReset}") " - Activate StarPU in Chameleon${ColourReset}")
add_definitions(-DCHAMELEON_SCHED_STARPU) # TODO: remove that add_definitions(-DCHAMELEON_SCHED_STARPU) # TODO: remove that
include_directories(${STARPU_INCLUDE_DIRS}) include_directories(${STARPU_INCLUDE_DIRS_DEP})
if(STARPU_LINKER_FLAGS) if(STARPU_LINKER_FLAGS)
list(APPEND CMAKE_EXE_LINKER_FLAGS "${STARPU_LINKER_FLAGS}") list(APPEND CMAKE_EXE_LINKER_FLAGS "${STARPU_LINKER_FLAGS}")
endif() endif()
set(CMAKE_REQUIRED_INCLUDES "${STARPU_INCLUDE_DIRS}") set(CMAKE_REQUIRED_INCLUDES "${STARPU_INCLUDE_DIRS}")
foreach(libdir ${STARPU_LIBRARY_DIRS}) foreach(libdir ${STARPU_LIBRARY_DIRS_DEP})
list(APPEND CMAKE_REQUIRED_FLAGS "-L${libdir}") list(APPEND CMAKE_REQUIRED_FLAGS "-L${libdir}")
endforeach() endforeach()
list(APPEND CMAKE_REQUIRED_FLAGS "-include" "starpu_simgrid_wrap.h") list(APPEND CMAKE_REQUIRED_FLAGS "-include" "starpu_simgrid_wrap.h")
...@@ -653,6 +655,10 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/") ...@@ -653,6 +655,10 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
# the RPATH to be used when installing # the RPATH to be used when installing
list(APPEND CMAKE_INSTALL_RPATH "${FXT_LIBRARY_DIRS}") list(APPEND CMAKE_INSTALL_RPATH "${FXT_LIBRARY_DIRS}")
endif() endif()
if(SIMGRID_FOUND AND SIMGRID_LIBRARY_DIRS)
# the RPATH to be used when installing
list(APPEND CMAKE_INSTALL_RPATH "${SIMGRID_LIBRARY_DIRS}")
endif()
if(STARPU_FOUND AND STARPU_LIBRARY_DIRS) if(STARPU_FOUND AND STARPU_LIBRARY_DIRS)
# the RPATH to be used when installing # the RPATH to be used when installing
list(APPEND CMAKE_INSTALL_RPATH "${STARPU_LIBRARY_DIRS}") list(APPEND CMAKE_INSTALL_RPATH "${STARPU_LIBRARY_DIRS}")
...@@ -675,6 +681,14 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/") ...@@ -675,6 +681,14 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
Print_Find_Library_Status(fxt libfxt) Print_Find_Library_Status(fxt libfxt)
endif () endif ()
endif() endif()
if(CHAMELEON_SIMULATION AND (NOT SIMGRID_FOUND OR NOT SIMGRID_LIBRARIES))
if (NOT SIMGRID_simgrid.h_DIRS)
Print_Find_Header_Status(simgrid simgrid.h)
endif ()
if (NOT SIMGRID_simgrid_LIBRARY)
Print_Find_Library_Status(simgrid libsimgrid)
endif ()
endif()
if( (NOT STARPU_SHM_FOUND) OR (NOT STARPU_SHM_LIBRARIES) OR if( (NOT STARPU_SHM_FOUND) OR (NOT STARPU_SHM_LIBRARIES) OR
( STARPU_LOOK_FOR_MPI AND (NOT STARPU_MPI_FOUND OR NOT STARPU_MPI_LIBRARIES) ) ( STARPU_LOOK_FOR_MPI AND (NOT STARPU_MPI_FOUND OR NOT STARPU_MPI_LIBRARIES) )
) )
...@@ -698,6 +712,9 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/") ...@@ -698,6 +712,9 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
if(NOT HWLOC_FOUND OR NOT HWLOC_LIBRARIES) if(NOT HWLOC_FOUND OR NOT HWLOC_LIBRARIES)
message(FATAL_ERROR "hwloc library is required but has not been found") message(FATAL_ERROR "hwloc library is required but has not been found")
endif() endif()
if(CHAMELEON_SIMULATION AND (NOT SIMGRID_FOUND OR NOT SIMGRID_LIBRARIES))
message(FATAL_ERROR "SimGrid library is required but has not been found")
endif()
if(CHAMELEON_ENABLE_TRACING AND (NOT FXT_FOUND OR NOT FXT_LIBRARIES)) if(CHAMELEON_ENABLE_TRACING AND (NOT FXT_FOUND OR NOT FXT_LIBRARIES))
message(FATAL_ERROR "FxT library is required but has not been found") message(FATAL_ERROR "FxT library is required but has not been found")
endif() endif()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment