Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 40514e2a authored by THIBAULT Samuel's avatar THIBAULT Samuel Committed by Mathieu Faverge
Browse files

Make cmake include starpu_simgrid_wrap.h only after tests

Because it #define main and thus makes link tests fail.
parent 45c82f14
No related branches found
No related tags found
1 merge request!103Make cmake include starpu_simgrid_wrap.h only after tests
...@@ -612,9 +612,6 @@ if( CHAMELEON_SCHED_STARPU ) ...@@ -612,9 +612,6 @@ if( CHAMELEON_SCHED_STARPU )
list(INSERT CHAMELEON_DEP 0 ${STARPU_LIBRARIES_DEP}) list(INSERT CHAMELEON_DEP 0 ${STARPU_LIBRARIES_DEP})
set(CMAKE_REQUIRED_LIBRARIES "${STARPU_LIBRARIES_DEP}") set(CMAKE_REQUIRED_LIBRARIES "${STARPU_LIBRARIES_DEP}")
endif() endif()
if (CHAMELEON_SIMULATION)
list(APPEND CMAKE_REQUIRED_FLAGS "-include" "starpu_simgrid_wrap.h")
endif()
string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
check_function_exists(starpu_data_idle_prefetch_on_node HAVE_STARPU_IDLE_PREFETCH) check_function_exists(starpu_data_idle_prefetch_on_node HAVE_STARPU_IDLE_PREFETCH)
if ( HAVE_STARPU_IDLE_PREFETCH ) if ( HAVE_STARPU_IDLE_PREFETCH )
...@@ -1007,6 +1004,19 @@ if(CHAMELEON_ENABLE_DOC) ...@@ -1007,6 +1004,19 @@ if(CHAMELEON_ENABLE_DOC)
endif() endif()
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
###############################################################################
# Make cmake include starpu_simgrid_wrap.h (which #define main and thus makes #
# link tests fail) only after tests. #
###############################################################################
if( CHAMELEON_SCHED_STARPU )
if ( STARPU_FOUND )
if (CHAMELEON_SIMULATION)
list(APPEND CMAKE_REQUIRED_FLAGS "-include" "starpu_simgrid_wrap.h")
endif()
endif()
endif()
############################################################################### ###############################################################################
# Config files (pkg_config) # # Config files (pkg_config) #
############################# #############################
......
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