...
 
Commits (6)
......@@ -78,6 +78,14 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeScripts)
# To transform relative path into absolute for a list of libraries
include(LibrariesAbsolutePath)
set(CMAKE_Fortran_MODULE_DIRECTORY ${PROJECT_BINARY_DIR}/MOD)
# Set the RPATH config
# use, i.e. don't skip the full RPATH for the build tree
set(CMAKE_SKIP_BUILD_RPATH FALSE)
# when building, don't use the install RPATH already
# (but later on when installing)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
# the RPATH to be used when installing
list(APPEND CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
# Define some variables which will be fill in with ccmake or cmake-gui
option(PAMPA_CTEST_MEMCHECK "Use valgrind memcheck explicitly during ctests" OFF)
......@@ -188,6 +196,10 @@ if (COMMON_COMPRESSION)
# BZIP2
find_package (BZip2)
if (BZIP2_FOUND)
list(GET BZIP2_LIBRARIES 0 first_lib)
get_filename_component(lib_path "${first_lib}" PATH)
set(BZIP2_LIBRARY_DIR "${lib_path}")
list(APPEND CMAKE_INSTALL_RPATH "${BZIP2_LIBRARY_DIR}")
add_definitions (-DCOMMON_FILE_COMPRESS_BZ2)
include_directories(${BZIP2_INCLUDE_DIR})
list (APPEND PAMPA_DEPENDENCIES ${BZIP2_LIBRARY} ${BZIP2_LIBRARIES})
......@@ -202,6 +214,10 @@ if (COMMON_COMPRESSION)
# ZLIB
find_package (ZLIB)
if (ZLIB_FOUND)
list(GET ZLIB_LIBRARIES 0 first_lib)
get_filename_component(lib_path "${first_lib}" PATH)
set(ZLIB_LIBRARY_DIR "${lib_path}")
list(APPEND CMAKE_INSTALL_RPATH "${ZLIB_LIBRARY_DIR}")
add_definitions (-DCOMMON_FILE_COMPRESS_GZ)
include_directories(${ZLIB_INCLUDE_DIR})
list (APPEND PAMPA_DEPENDENCIES ${ZLIB_LIBRARIES})
......@@ -212,8 +228,9 @@ endif (COMMON_COMPRESSION)
# PT-Scotch
option (PTSCOTCH "Build PaMPA with PT-Scotch dependencies" ON)
if (PTSCOTCH)
add_definitions (-DPTSCOTCH)
find_package(PTSCOTCH REQUIRED)
list(APPEND CMAKE_INSTALL_RPATH "${PTSCOTCH_LIBRARY_DIRS_DEP}")
add_definitions (-DPTSCOTCH)
file(STRINGS "${PTSCOTCH_INCLUDE_DIRS}/scotch.h" CHECK_SCOTCH_VERSION REGEX "^[ \t]*#define[ \t]+SCOTCH_[A-Z]+[ \t]+[0-9]+.*$")
foreach(item IN ITEMS VERSION RELEASE PATCHLEVEL)
string(REGEX REPLACE ".*#define[ \t]+SCOTCH_${item}[ \t]+([0-9]+).*" "\\1" XYZ ${CHECK_SCOTCH_VERSION})
......@@ -229,6 +246,10 @@ endif ()
# MPI
find_package(MPI REQUIRED)
list(GET MPI_C_LIBRARIES 0 first_lib)
get_filename_component(lib_path "${first_lib}" PATH)
set(MPI_LIBRARY_DIR "${lib_path}")
list(APPEND CMAKE_INSTALL_RPATH "${MPI_LIBRARY_DIR}")
include_directories(${MPI_INCLUDE_PATH})
if (MPI_C_LIBRARIES)
list (APPEND PAMPA_DEPENDENCIES ${MPI_C_LIBRARIES} m)
......@@ -245,6 +266,10 @@ endif ()
# Pthread
if (NOT PTHREAD STREQUAL "None")
find_package(Threads REQUIRED)
list(GET CMAKE_THREAD_LIBS_INIT 0 first_lib)
get_filename_component(lib_path "${first_lib}" PATH)
set(PTHREAD_LIBRARY_DIR "${lib_path}")
list(APPEND CMAKE_INSTALL_RPATH "${PTHREAD_LIBRARY_DIR}")
if (NOT CMAKE_USE_PTHREADS_INIT) # if pthread was not found
message (FATAL_ERROR "Pthread are not available")
endif()
......@@ -258,9 +283,9 @@ if (NOT PTHREAD STREQUAL "None")
endif ()
# Define PaMPA version
set(PAMPA_CORE_VERSION "2")
set(PAMPA_CORE_RELEASE "0")
set(PAMPA_CORE_PATCHLEVEL "0")
set(PAMPA_VERSION "3")
set(PAMPA_RELEASE "0")
set(PAMPA_PATCHLEVEL "0")
# Add some flags
add_definitions(-Drestrict=__restrict)
......@@ -454,7 +479,8 @@ message (STATUS "
* *
* We are very eager to get feed-back from our users! *
* *
* Please send us an e-mail (pampaATinria.fr) to tell us how *
* Please post issues on *
* https://gitlab.inria.fr/PaMPA/PaMPA/issues to tell us how *
* PaMPA works for you. *
* It will help us update our roadmap and provide new features. *
* *
......
......@@ -32,7 +32,7 @@ PROJECT_NAME = PaMPA
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = @PAMPA_CORE_VERSION@.@PAMPA_CORE_RELEASE@
PROJECT_NUMBER = @PAMPA_VERSION@.@PAMPA_RELEASE@
# Using the PROJECT_BRIEF tag one can provide an optional one line description
......@@ -53,7 +53,7 @@ PROJECT_LOGO =
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
OUTPUT_DIRECTORY = api_@PAMPA_CORE_VERSION@.@PAMPA_CORE_RELEASE@
OUTPUT_DIRECTORY = api_@PAMPA_VERSION@.@PAMPA_RELEASE@
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
......
......@@ -45,15 +45,15 @@ if (DOXYGEN_FOUND)
add_custom_target (apipdfdoc
COMMAND ${CMAKE_COMMAND} -E echo_append "Building Api Pdf Documentation..."
COMMAND make
COMMAND ${CMAKE_COMMAND} -E copy refman.pdf ../pampa_v${PAMPA_CORE_VERSION}.${PAMPA_CORE_RELEASE}.pdf
COMMAND ${CMAKE_COMMAND} -E copy refman.pdf ../pampa_v${PAMPA_VERSION}.${PAMPA_RELEASE}.pdf
COMMAND ${CMAKE_COMMAND} -E echo "Done."
WORKING_DIRECTORY ${PAMPA_SOURCE_DIR}/doc/api_${PAMPA_CORE_VERSION}.${PAMPA_CORE_RELEASE}/latex)
WORKING_DIRECTORY ${PAMPA_SOURCE_DIR}/doc/api_${PAMPA_VERSION}.${PAMPA_RELEASE}/latex)
add_dependencies (apipdfdoc apidoc)
endif (UNIX)
add_dependencies (apidoc pampa)
# User documentation
file (GLOB USER_PAGES ${PAMPA_SOURCE_DIR}/doc/user_pages/*.c)
file (GLOB USER_PAGES ${PAMPA_SOURCE_DIR}/doc/user_pages/*.txt)
add_custom_command (OUTPUT pampa_user.h
COMMAND ${CMAKE_COMMAND} -E copy
......@@ -79,9 +79,9 @@ if (DOXYGEN_FOUND)
add_custom_target (userpdfdoc
COMMAND ${CMAKE_COMMAND} -E echo_append "Building User Pdf Documentation..."
COMMAND make
COMMAND ${CMAKE_COMMAND} -E copy refman.pdf ../pampa_v${PAMPA_CORE_VERSION}.${PAMPA_CORE_RELEASE}.pdf
COMMAND ${CMAKE_COMMAND} -E copy refman.pdf ../pampa_v${PAMPA_VERSION}.${PAMPA_RELEASE}.pdf
COMMAND ${CMAKE_COMMAND} -E echo "Done."
WORKING_DIRECTORY ${PAMPA_SOURCE_DIR}/doc/user_${PAMPA_CORE_VERSION}.${PAMPA_CORE_RELEASE}/latex)
WORKING_DIRECTORY ${PAMPA_SOURCE_DIR}/doc/user_${PAMPA_VERSION}.${PAMPA_RELEASE}/latex)
add_dependencies (userpdfdoc userdoc)
endif (UNIX)
add_dependencies (userdoc pampa)
......@@ -90,7 +90,7 @@ if (DOXYGEN_FOUND)
add_custom_target (doc DEPENDS apidoc apipdfdoc userdoc userpdfdoc)
# Specify where man documentation will be installed
file (GLOB MAN_FILES ${PAMPA_SOURCE_DIR}/doc/user_${PAMPA_CORE_VERSION}.${PAMPA_CORE_RELEASE}/man/man3/*.3)
file (GLOB MAN_FILES ${PAMPA_SOURCE_DIR}/doc/user_${PAMPA_VERSION}.${PAMPA_RELEASE}/man/man3/*.3)
install (FILES ${MAN_FILES}
DESTINATION share/man/man3)
endif (DOXYGEN_FOUND)
......@@ -32,7 +32,7 @@ PROJECT_NAME = PaMPA
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = @PAMPA_CORE_VERSION@.@PAMPA_CORE_RELEASE@
PROJECT_NUMBER = @PAMPA_VERSION@.@PAMPA_RELEASE@
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer
......@@ -52,7 +52,7 @@ PROJECT_LOGO =
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
OUTPUT_DIRECTORY = user_@PAMPA_CORE_VERSION@.@PAMPA_CORE_RELEASE@
OUTPUT_DIRECTORY = user_@PAMPA_VERSION@.@PAMPA_RELEASE@
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
......