1 cmake_minimum_required(VERSION 2.8.5)
4 include("${CMAKE_SOURCE_DIR}/../shared_CMakeLists.txt")
6 #ppam executable (serialize, cluster, classif)
9 find_path(CDS_INCLUDE_PATH "cds/cds.h")
10 find_library(CDS_LIBRARY cds)
11 include_directories(${CDS_INCLUDE_PATH})
13 #GSL: standard location
14 find_path(GSL_INCLUDE_PATH "gsl/gsl_linalg.h")
15 include_directories(${GSL_INCLUDE_PATH})
16 find_library(GSL_LIBRARY gsl)
17 find_library(GSLCBLAS_LIBRARY gslcblas)
18 set(GSL_LIBRARIES ${GSL_LIBRARY} ${GSLCBLAS_LIBRARY})
20 #MPI: standard location
21 find_package(MPI REQUIRED)
22 include_directories(${MPI_INCLUDE_PATH})
24 #LibXml2: standard location
25 find_package(LibXml2 REQUIRED)
26 include_directories(${LIBXML2_INCLUDE_DIR})
28 file(GLOB_RECURSE ppam_src "${CMAKE_SOURCE_DIR}/*.c")
29 add_executable(ppam.exe ${ppam_src})
30 add_library(ppam SHARED ${ppam_src})
31 target_link_libraries(ppam.exe m cds ${MPI_LIBRARIES} ${LIBXML2_LIBRARIES} ${GSL_LIBRARIES} ${CDS_LIBRARY})
32 target_link_libraries(ppam m cds ${MPI_LIBRARIES} ${LIBXML2_LIBRARIES} ${GSL_LIBRARIES} ${CDS_LIBRARY})
34 if (MPI_COMPILE_FLAGS)
35 set_target_properties(ppam.exe PROPERTIES
36 COMPILE_FLAGS "${MPI_COMPILE_FLAGS}")
39 set_target_properties(ppam.exe PROPERTIES
40 LINK_FLAGS "${MPI_LINK_FLAGS}")