Commit ca4d9b44 authored by BRAMAS Berenger's avatar BRAMAS Berenger

Update cmake to factorize librairies research

parent 27d3ea79
cmake_minimum_required (VERSION 2.8)
cmake_minimum_required (VERSION 2.8.5)
# check if compiling into source directories
STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource)
......@@ -31,7 +31,6 @@ OPTION( SCALFMM_ATTACHE_SOURCE "Set to ON to compile with -g" OFF )
OPTION( SCALFMM_USE_STARPU "Set to ON to use starpu" OFF )
# Test if openmp is here
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake)
find_package(OpenMP)
......@@ -89,9 +88,25 @@ ADD_DEFINITIONS(-Wall -Wshadow -Wpointer-arith -Wcast-qual -Wconversion)
CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/Src/ScalFmmConfig.h.cmake
${CMAKE_BINARY_DIR}/Src/ScalFmmConfig.h )
# Use Mem stats
MESSAGE( STATUS "SCALFMM_USE_MEM_STATS = ${SCALFMM_USE_MEM_STATS}" )
# Test if openmp is here
include(FindOpenMP)
if(OPENMP_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
# Add CBLAS
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CBLAS_LIBRARIES}")
# Build - lib
add_subdirectory(Src)
# Link with scalfmm lib
set(scalfmm_lib scalfmm)
# Build - Tests
MESSAGE( STATUS "SCALFMM_BUILD_TESTS = ${SCALFMM_BUILD_TESTS}" )
if( SCALFMM_BUILD_TESTS )
......@@ -105,9 +120,6 @@ if( SCALFMM_BUILD_UTESTS )
add_subdirectory(UTests)
endif()
# Use Mem stats
MESSAGE( STATUS "SCALFMM_USE_MEM_STATS = ${SCALFMM_USE_MEM_STATS}" )
# Build - doc
add_subdirectory(Doc)
......
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.8.5)
# check if compiling into source directories
STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource)
......@@ -29,6 +29,8 @@ add_library(
target_link_libraries(
scalfmm
${BLAS_LIBRARIES}
${LAPACK_LIBRARIES}
${STARPU_LIBRARIES}
)
# Adding the entire project dir as an include dir
......
cmake_minimum_required (VERSION 2.8)
cmake_minimum_required (VERSION 2.8.5)
# check if compiling into source directories
STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource)
......@@ -9,19 +9,6 @@ endif(insource)
project(Tests_scalfmm CXX)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BUILD_TYPE})
# Test if openmp is here
include(FindOpenMP)
if(OPENMP_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
# Add CBLAS
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CBLAS_LIBRARIES}")
# Link with scalfmm lib
set(scalfmm_lib scalfmm)
# Find all code files
file(
GLOB_RECURSE
......
cmake_minimum_required (VERSION 2.6)
cmake_minimum_required (VERSION 2.8.5)
# check if compiling into source directories
STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource)
......@@ -9,19 +9,6 @@ endif(insource)
project(UTests_scalfmm CXX)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BUILD_TYPE})
# Test if openmp is here
include(FindOpenMP)
if(OPENMP_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
# Add CBLAS
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CBLAS_LIBRARIES}")
# Link with scalfmm lib
set(scalfmm_lib scalfmm)
# Find all code files
file(
GLOB_RECURSE
......
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