Commit b5fe642b authored by BRAMAS Berenger's avatar BRAMAS Berenger

Add Starpu in cmake files

parent cb59f55d
......@@ -28,6 +28,7 @@ OPTION( SCALFMM_BUILD_DEBUG "Set to ON to build in Debug" OFF )
OPTION( SCALFMM_USE_MEM_STATS "Set to ON to profile memory" OFF )
OPTION( SCALFMM_USE_DOUBLE_PRECISION "Set to ON to compile in double precision" OFF )
OPTION( SCALFMM_ATTACHE_SOURCE "Set to ON to compile with -g" OFF )
OPTION( SCALFMM_USE_STARPU "Set to ON to use starpu" OFF )
......@@ -45,6 +46,11 @@ else()
SET(CMAKE_BUILD_TYPE Release)
endif()
# starpu
if( SCALFMM_USE_STARPU )
set( STARPU_LIBRARIES "-lstarpu" )
endif()
# Attach source code to exec
if( SCALFMM_ATTACHE_SOURCE )
MESSAGE( STATUS "Use -g in compiler flags" )
......
......@@ -34,6 +34,7 @@ INCLUDE_DIRECTORIES(
${CMAKE_BINARY_DIR}/Src
)
# Add execs - 1 cpp = 1 exec
foreach(exec ${source_tests_files})
get_filename_component(
......@@ -61,6 +62,15 @@ foreach(exec ${source_tests_files})
endif()
endif()
# Test starpu dependency
file(STRINGS "${exec}" lines_starpu REGEX "@FUSE_STARPU")
if(lines_starpu)
if( NOT SCALFMM_USE_STARPU )
MESSAGE( STATUS "This needs Starpu = ${exec}" )
set(compile_exec "FALSE")
endif()
endif()
# Dependency are OK
if( compile_exec )
add_executable(
......@@ -72,6 +82,7 @@ foreach(exec ${source_tests_files})
${scalfmm_lib}
${BLAS_LIBRARIES}
${LAPACK_LIBRARIES}
${STARPU_LIBRARIES}
)
endif()
endforeach(exec)
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