Commit a7e91c79 authored by gsell's avatar gsell
Browse files

review of master CMakeList.txt and CMakeList.txt of OPAL and IPPL plus...

review of master CMakeList.txt and CMakeList.txt of OPAL and IPPL plus required changes in the source code
parent 331b9ea3
cmake_minimum_required (VERSION 3.1)
project (OPAL)
set (OPAL_VERSION_MAJOR 1)
SET (OPAL_VERSION_MINOR 9.0)
set (PACKAGE \"opal\")
set (PACKAGE_BUGREPORT \"opal@lists.psi.ch\")
set (PACKAGE_NAME \"OPAL\")
set (PACKAGE_TARNAME \"opal\")
set (PACKAGE_VERSION "${OPAL_VERSION_MAJOR}.${OPAL_VERSION_MINOR}")
set (PACKAGE_VERSION_STR "\"${PACKAGE_VERSION}\"")
string (REGEX REPLACE "\\.([0-9])\\." ".0\\1." PACKAGE_VERSION ${PACKAGE_VERSION})
project (OPAL VERSION 1.9.0)
set (PROJECT_BUGREPORT opal@lists.psi.ch)
string (REGEX REPLACE "\\.([0-9])\\." ".0\\1." PACKAGE_VERSION ${PROJECT_VERSION})
string (REGEX REPLACE "\\.([0-9])$" ".0\\1" PACKAGE_VERSION ${PACKAGE_VERSION})
string (REGEX REPLACE "\\." "" PACKAGE_VERSION ${PACKAGE_VERSION})
message (PACKAGE_VERSION=${PACKAGE_VERSION})
if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
......@@ -46,6 +42,10 @@ set (CMAKE_CXX_STANDARD_REQUIRED ON)
set (CMAKE_CXX_EXTENSIONS OFF)
add_compile_options (-Wall)
add_definitions (-DIPPL_LINUX -DIPPL_STRINGSTREAM)
add_definitions (-DIPPL_MPI -DMPICH_SKIP_MPICXX -DIPPL_DONT_POOL -DIPPL_USE_XDIV_RNG -DPETE_BITWISE_COPY -DIPPL_HAS_TEMPLATED_COMPLEX -DIPPL_USE_PARTIAL_SPECIALIZATION -Drestrict=__restrict__ -DNOCTAssert)
add_compile_options (-ftemplate-depth=1024 -funroll-loops -fstrict-aliasing)
# compiler dependent flags
if ( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel" )
......@@ -228,8 +228,6 @@ else ()
set (OPAL_WC_REVISION \"\")
endif ()
set (IPPL_USED_FROM_OPAL "TRUE")
add_subdirectory (ippl)
add_subdirectory (optimizer)
add_subdirectory (src)
......
IF (NOT IPPL_USED_FROM_OPAL)
CMAKE_MINIMUM_REQUIRED (VERSION 2.8.10)
PROJECT (IPPL)
SET (IPPL_VERSION_MAJOR 1)
SET (IPPL_VERSION_MINOR 5.00.1)
project (IPPL CXX)
set (IPPL_VERSION_MAJOR 1)
set (IPPL_VERSION_MINOR 1.4)
IF (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
SET (CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE
)
ENDIF (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
set (IPPL_VERSION_NAME "V${IPPL_VERSION_MAJOR}.${IPPL_VERSION_MINOR}")
MESSAGE (STATUS "Build type is: " ${CMAKE_BUILD_TYPE})
set (IPPL_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
# Select flags.
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g ")
SET (CMAKE_CXX_FLAGS_RELEASE "-O3")
SET (CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
# Resolve all library dependencies
SET (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules")
find_package (MPI REQUIRED)
message (STATUS "The C++ compiler identification is: ${CMAKE_CXX_COMPILER_ID}")
message (STATUS "The C++ compiler version is: ${CMAKE_CXX_COMPILER_VERSION}")
message (STATUS "The MPI C++ compiler is: ${MPI_CXX_COMPILER}")
message (STATUS "The underlying C++ compiler is: ${CMAKE_CXX_COMPILER}")
# compiler dependent flags
if ( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel" )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -diag-disable 383 -diag-disable 981 -std=c++11")
elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wsign-compare -Wunused-variable -Warray-bounds -DIPPL_RESTRICT_BUG")
elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
if (${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS "4.7.3")
message (FATAL_ERROR "To build OPAL you need GCC version 4.7.3 or greater")
elseif (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER "4.7.2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-reorder -Wno-unused-local-typedefs -std=c++11")
endif ()
if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
add_definitions (-DNOPAssert)
else ()
message (STATUS "Unknown C++ compiler. Please use the GNU or Intel compiler, IF you are having problems.")
endif ()
FIND_PACKAGE (H5Hut REQUIRED)
FIND_PACKAGE (HDF5 REQUIRED)
FIND_PACKAGE (GSL REQUIRED)
set (BOOSTROOT $ENV{BOOST_DIR})
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED OFF)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package (Boost 1.55.0 REQUIRED COMPONENTS regex filesystem system)
if (Boost_INCLUDE_DIRS)
message (STATUS "Found boost include dir: ${Boost_INCLUDE_DIR}")
message (STATUS "Found boost library dir: ${Boost_LIBRARY_DIR}")
message (STATUS "Found boost libraries: ${Boost_LIBRARIES}")
include_directories (${Boost_INCLUDE_DIRS})
add_definitions (-DIPPL_DEBUG)
endif ()
set (IPPL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src" PARENT_SCOPE)
set (IPPL_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src" PARENT_SCOPE)
set (IPPL_LIBRARY "ippl" PARENT_SCOPE)
### Uldis Locans 2014.09.05 ###
#OPTION (ENABLE_DKS "Enable DKS" OFF)
### Load DKS package ###
IF (ENABLE_DKS)
#FIND_PACKAGE(DKS 1.1.0 REQUIRED HINTS $ENV{DKS_PREFIX} $ENV{DKS_DIR} $ENV{DKS})
#MESSAGE (STATUS "Found DKS library: ${DKS_LIBRARY}")
#MESSAGE (STATUS "Found DKS include dir: ${DKS_INCLUDE_DIR}")
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDKS_MPI")
### OpenCL compiler flags ###
#SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lOpenCL -pthread -DDKS_OPENCL")
### CUDA compiler flags ###
#SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lcudart -lcufft -lcublas -DDKS_CUDA")
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDKS_CUDA")
### if any accelerator enabled set flag to use DKS ###
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DIPPL_DKS -DIPPL_DKS_CUDA -DOPAL_DKS")
ENDIF (ENABLE_DKS)
### END DKS part ###
# Handle options
OPTION (ENABLE_AMR "Enable BoxLib based AMR solver" OFF)
#OPTION (ENABLE_SAAMG_SOLVER "Enable iterative SA-AMG-PCG self field solver" OFF)
IF (ENABLE_AMR)
MESSAGE (STATUS "Enable AMR_SOLVER " ${ENABLE_AMR})
find_package (AMReX CONFIG REQUIRED HINTS $ENV{AMREX_HOME}/cmake $ENV{AMREX_DIR}/cmake $ENV{AMREX_PREFIX}/cmake)
MESSAGE (STATUS "Found AMReX include dir: ${AMREX_INCLUDE_DIR}")
MESSAGE (STATUS "Found AMReX library dir: ${AMREX_LIBRARY_DIR}")
MESSAGE (STATUS "Found AMReX libraries: ${AMREX_LIBRARIES}")
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_AMR")
ENDIF (ENABLE_AMR)
#if (ENABLE_SAAMG_SOLVER)
# find_package (Trilinos REQUIRED HINTS $ENV{TRILINOS_PREFIX} $ENV{TRILINOS_DIR} $ENV{TRILINOS})
#
# message (STATUS "Found Trilinos: ${Trilinos_DIR}")
# message (STATUS " Trilinos version: ${Trilinos_VERSION}")
# message (STATUS " Trilinos package list: ${Trilinos_PACKAGE_LIST}")
# message (STATUS " Trilinos libraries: ${Trilinos_LIBRARIES}")
# message (STATUS " Trilinos TPL libraries: ${Trilinos_TPL_LIBRARIES}")
#
# if (NOT ${MPI_CXX_COMPILER} STREQUAL ${Trilinos_CXX_COMPILER} )
# message (STATUS "Compiler mismatch:")
# message (STATUS " Trilinos was compiled with:")
# message (STATUS " ${Trilinos_C_COMPILER}")
# message (STATUS " ${Trilinos_CXX_COMPILER}")
# message (STATUS " ${Trilinos_Fortran_COMPILER}")
# message (STATUS " You are using:")
# message (STATUS " ${CMAKE_C_COMPILER}")
# message (STATUS " ${CMAKE_CXX_COMPILER}")
# message (STATUS " ${CMAKE_Fortran_COMPILER}")
# message (FATAL "")
# endif ()
#endif ()
INCLUDE(FindGit)
IF(GIT_FOUND)
SET (OPAL_WC_REVISION 0)
EXECUTE_PROCESS(
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND git rev-parse HEAD
OUTPUT_VARIABLE GIT_OUT OUTPUT_STRIP_TRAILING_WHITESPACE
)
SET (OPAL_WC_REVISION \"${GIT_OUT}\")
ELSE()
MESSAGE (STATUS "could not find git")
SET (OPAL_WC_REVISION \"\")
ENDIF()
SET (IPPL_USED_FROM_OPAL "TRUE")
ADD_SUBDIRECTORY (ippl)
#ADD_SUBDIRECTORY (classic/5.0/src)
#ADD_SUBDIRECTORY (src)
IF (BUILD_OPAL_UNIT_TESTS)
ADD_SUBDIRECTORY(tests)
ENDIF (BUILD_OPAL_UNIT_TESTS)
ELSE(NOT IPPL_USED_FROM_OPAL)
PROJECT (IPPL CXX)
SET (IPPL_VERSION_MAJOR 1)
SET (IPPL_VERSION_MINOR 1.4)
SET (PACKAGE \"ippl\")
SET (PACKAGE_BUGREPORT \"andreas.adelmann@psi.ch\")
SET (PACKAGE_NAME \"IPPL\")
SET (PACKAGE_STRING \"IPPL\ 1.1.4\")
SET (PACKAGE_TARNAME \"ippl\")
SET (PACKAGE_VERSION \"1.1.4\")
SET (VERSION \"1.1.4\")
set (IPPL_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
OPTION (LINUXGCC "Use Linux GCC flags" ON)
OPTION (LINUXPGI "Use Linux PGI flags" OFF)
SET (CMAKE_CXX_COMPILER ${MPI_COMPILER})
SET (IPPL_CXX_FLAGS "")
SET (OTHER_CXX_FLAGS "")
IF (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
SET (CMAKE_BUILD_TYPE RelWithDebInfo)
add_subdirectory (src)
option (ENABLE_IPPLTESTS "IPPL Tests" OFF)
if (ENABLE_IPPLTESTS)
add_subdirectory (test)
endif ()
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/cmake/${PROJECT_NAME}Config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config_install.cmake )
ENDIF (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
### CXX_FLAGS specific to build type ########################
IF (${CMAKE_BUILD_TYPE} STREQUAL "Release")
SET (OTHER_CXX_FLAGS
"-DNOPAssert ${OTHER_CXX_FLAGS}"
)
ELSE (${CMAKE_BUILD_TYPE} STREQUAL "Release")
SET (OTHER_CXX_FLAGS
"-DIPPL_DEBUG ${OTHER_CXX_FLAGS}"
)
ENDIF (${CMAKE_BUILD_TYPE} STREQUAL "Release")
### CXX_FLAGS common to all compilers and platforms which ###
### may be written to the configure file ###
SET (IPPL_CXX_FLAGS
"-DIPPL_MPI -DMPICH_SKIP_MPICXX -DIPPL_DONT_POOL -DIPPL_USE_XDIV_RNG -DPETE_BITWISE_COPY -DIPPL_HAS_TEMPLATED_COMPLEX -DIPPL_USE_PARTIAL_SPECIALIZATION -Drestrict=__restrict__ -DNOCTAssert ${IPPL_CXX_FLAGS}"
)
### CXX_FLAGS common to all compilers and platforms which ###
### may *not* be written to the configure file ###
SET (OTHER_CXX_FLAGS
"-Wall ${OTHER_CXX_FLAGS}"
)
### Uldis Locans 2014.09.05 ###
#OPTION (ENABLE_DKS "Enable DKS" OFF)
### Load DKS package ###
IF (ENABLE_DKS)
#FIND_PACKAGE(DKS 1.1.0 REQUIRED HINTS $ENV{DKS_PREFIX} $ENV{DKS_DIR} $ENV{DKS})
#MESSAGE (STATUS "Found DKS library: ${DKS_LIBRARY_DIR}")
#MESSAGE (STATUS "Found DKS include dir: ${DKS_INCLUDE_DIR}")
SET (IPPL_CXX_FLAGS "${IPPL_CXX_FLAGS} -DDKS_MPI")
### OpenCL compiler flags ###
#SET (IPPL_CXX_FLAGS "${IPPL_CXX_FLAGS} -lOpenCL -lpthread -DDKS_OPENCL")
### End OpenCL ###
### CUDA compiler flags ###
#SET (IPPL_CXX_FLAGS "${IPPL_CXX_FLAGS} -lcudart -lcufft -lcublas -lnvToolsExt -DDKS_CUDA")
SET (IPPL_CXX_FLAGS "${IPPL_CXX_FLAGS} -DDKS_CUDA")
### End Cuda ###
### if any accelerator enabled set flag to use DKS ###
SET (IPPL_CXX_FLAGS "${IPPL_CXX_FLAGS} -DIPPL_DKS")
ENDIF (ENABLE_DKS)
### CXX_FLAGS specific to compiler and platform #############
#find_package (MPI REQUIRED)
message (STATUS "The C++ compiler identification is: ${CMAKE_CXX_COMPILER_ID}")
message (STATUS "The C++ compiler version is: ${CMAKE_CXX_COMPILER_VERSION}")
message (STATUS "The MPI C++ compiler is: ${MPI_CXX_COMPILER}")
message (STATUS "The underlying C++ compiler is: ${CMAKE_CXX_COMPILER}")
IF (LINUXGCC)
MESSAGE (STATUS "Linux GCC flags SET")
SET (IPPL_CXX_FLAGS
"-DIPPL_LINUX -DIPPL_STRINGSTREAM ${IPPL_CXX_FLAGS}"
)
SET (OTHER_CXX_FLAGS
"-ftemplate-depth-80 -funroll-loops -fstrict-aliasing ${OTHER_CXX_FLAGS}"
)
IF (NOT IPPL_USED_FROM_OPAL)
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
SET (OTHER_CXX_FLAGS
"-std=c++0x -diag-disable 383,981 ${OTHER_CXX_FLAGS}")
ELSEIF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
SET (OTHER_CXX_FLAGS
"-Wall -Wsign-compare -Wunused-variable -Warray-bounds -DIPPL_RESTRICT_BUG ${OTHER_CXX_FLAGS}")
ELSEIF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
IF (${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS "4.8.0")
SET (OTHER_CXX_FLAGS
"-Wall -std=c++0x")
ELSEIF (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER "4.7")
SET (OTHER_CXX_FLAGS
"-Wall -Wno-reorder -std=c++1y")
ENDIF ()
ELSE ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
# using unknown compiler
MESSAGE (STATUS "${COMPILER_NAME} is using a compiler (${CMAKE_CXX_COMPILER_ID}) we were not thinking of!
Please use the gnu compiler or the intel compiler if you are having problems.")
ENDIF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
ENDIF (NOT IPPL_USED_FROM_OPAL)
SET (IPPL_VERSION_NAME "\"V${IPPL_VERSION_MAJOR}.${IPPL_VERSION_MINOR} Linux GNU\"")
ENDIF (LINUXGCC)
IF (LINUXPGI)
MESSAGE(STATUS "Linux PGI flags SET")
SET (IPPL_CXX_FLAGS
"-DIPPLProf -DIPPL_GPLUSPLUS -DMPICH_IGNORE_CXX_SEEK -DIPPL_LINUX ${IPPL_CXX_FLAGS}"
)
SET (IPPL_VERSION_NAME "\"V${IPPL_VERSION_MAJOR}.${IPPL_VERSION_MINOR} Linux PGI\"")
ENDIF (LINUXPGI)
SET (IPPLLINUXGCCF
"-DIPPL_LINUX -DIPPL_STRINGSTREAM"
)
SET (CMAKE_CXX_FLAGS
"${OTHER_CXX_FLAGS} ${IPPL_CXX_FLAGS} ${CMAKE_CXX_FLAGS} "
)
SET (IPPL_CMAKE_CXX_FLAGS "${IPPL_CXX_FLAGS}" PARENT_SCOPE)
SET (IPPL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src" PARENT_SCOPE)
SET (IPPL_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src" PARENT_SCOPE)
SET (IPPL_LIBRARY "ippl" PARENT_SCOPE)
### add test directories ####################################
ADD_SUBDIRECTORY (src)
OPTION (ENABLE_IPPLTESTS "IPPL Tests" OFF)
IF (ENABLE_IPPLTESTS)
ADD_SUBDIRECTORY (test)
ENDIF (ENABLE_IPPLTESTS)
### write configure file ####################################
CONFIGURE_FILE ( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${PROJECT_NAME}Config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config_install.cmake )
### install files ###########################################
INSTALL (
FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config_install.cmake
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/${PROJECT_NAME}"
RENAME ${PROJECT_NAME}Config.cmake
)
install (
FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config_install.cmake
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/${PROJECT_NAME}"
RENAME ${PROJECT_NAME}Config.cmake
)
ENDIF (NOT IPPL_USED_FROM_OPAL)
......@@ -46,39 +46,37 @@ STRING (REGEX REPLACE " +" ";" COMPILE_FLAGS_LIST ${COMPILE_FLAGS_STR})
LIST (LENGTH COMPILE_FLAGS_LIST NUMBER_OF_COMPILE_FLAGS)
SET (CURRENT_FLAG_INDEX 0)
MESSAGE (STATUS "")
MESSAGE (STATUS "Building IPPL with:")
WHILE (${CURRENT_FLAG_INDEX} LESS ${NUMBER_OF_COMPILE_FLAGS})
if (UNUSED)
MESSAGE (STATUS "")
MESSAGE (STATUS "Building IPPL with:")
WHILE (${CURRENT_FLAG_INDEX} LESS ${NUMBER_OF_COMPILE_FLAGS})
SET (FLAGS_PRETTY_PRINT "")
LIST (GET COMPILE_FLAGS_LIST ${CURRENT_FLAG_INDEX} CURRENT_FLAG)
STRING (LENGTH ${CURRENT_FLAG} LENGTH_INCL_NEXT)
WHILE (${LENGTH_INCL_NEXT} LESS ${PRETTY_PRINT_WIDTH})
SET (FLAGS_PRETTY_PRINT
"${FLAGS_PRETTY_PRINT} ${CURRENT_FLAG}")
MATH (EXPR CURRENT_FLAG_INDEX "(${CURRENT_FLAG_INDEX} + 1)")
IF (${CURRENT_FLAG_INDEX} EQUAL ${NUMBER_OF_COMPILE_FLAGS})
SET (LENGTH_INCL_NEXT ${PRETTY_PRINT_WIDTH})
ELSE(${CURRENT_FLAG_INDEX} EQUAL ${NUMBER_OF_COMPILE_FLAGS})
LIST (GET COMPILE_FLAGS_LIST ${CURRENT_FLAG_INDEX} CURRENT_FLAG)
IF (CURRENT_FLAG)
STRING (LENGTH ${CURRENT_FLAG} LENGTH_CURRENT_FLAG)
MATH (EXPR LENGTH_INCL_NEXT "${LENGTH_INCL_NEXT} + 1 + ${LENGTH_CURRENT_FLAG}")
ENDIF (CURRENT_FLAG)
ENDIF(${CURRENT_FLAG_INDEX} EQUAL ${NUMBER_OF_COMPILE_FLAGS})
SET (FLAGS_PRETTY_PRINT
"${FLAGS_PRETTY_PRINT} ${CURRENT_FLAG}")
MATH (EXPR CURRENT_FLAG_INDEX "(${CURRENT_FLAG_INDEX} + 1)")
IF (${CURRENT_FLAG_INDEX} EQUAL ${NUMBER_OF_COMPILE_FLAGS})
SET (LENGTH_INCL_NEXT ${PRETTY_PRINT_WIDTH})
ELSE(${CURRENT_FLAG_INDEX} EQUAL ${NUMBER_OF_COMPILE_FLAGS})
LIST (GET COMPILE_FLAGS_LIST ${CURRENT_FLAG_INDEX} CURRENT_FLAG)
IF (CURRENT_FLAG)
STRING (LENGTH ${CURRENT_FLAG} LENGTH_CURRENT_FLAG)
MATH (EXPR LENGTH_INCL_NEXT "${LENGTH_INCL_NEXT} + 1 + ${LENGTH_CURRENT_FLAG}")
ENDIF (CURRENT_FLAG)
ENDIF(${CURRENT_FLAG_INDEX} EQUAL ${NUMBER_OF_COMPILE_FLAGS})
ENDWHILE (${LENGTH_INCL_NEXT} LESS ${PRETTY_PRINT_WIDTH})
STRING (STRIP ${FLAGS_PRETTY_PRINT} FLAGS_PRETTY_PRINT)
MESSAGE (STATUS "${FLAGS_PRETTY_PRINT}")
ENDWHILE()
MESSAGE (STATUS "")
SET (IPPL_SRCS_FORT
# FFT/fftpack.F
)
ENDWHILE()
MESSAGE (STATUS "")
endif ()
SET (IPPL_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
MACRO (ADD_IPPL_SOURCES )
......
......@@ -4,7 +4,7 @@
#ifndef IPPL_VERSIONS_H
#define IPPL_VERSIONS_H
const char *ippl_version_name = ${IPPL_VERSION_NAME};
const char *ippl_version_name = "${IPPL_VERSION_NAME}";
const char *ippl_compile_arch = ${IPPL_COMPILE_ARCH};
const char *ippl_compile_line = ${IPPL_COMPILE_LINE};
const char *ippl_compile_date = ${IPPL_COMPILE_DATE};
......
/* Name of package */
//#define PACKAGE ${PACKAGE}
/* Define to the address where bug reports for this package should be sent. */
//#define PACKAGE_BUGREPORT ${PACKAGE_BUGREPORT}
/* Define to the full name of this package. */
//#define PACKAGE_NAME ${PACKAGE_NAME}
/* Define to the one symbol short name of this package. */
//#define PACKAGE_TARNAME ${PACKAGE_TARNAME}
/* Define to the version of this package. */
//#define PACKAGE_VERSION ${PACKAGE_VERSION}
/* repository svn version */
//#define SVN_VERSION ${OPAL_WC_REVISION}
/*#define GIT_VERSION ${GIT_VERSION}*/
/* Version number of package */
//#define VERSION ${VERSION}
/* OPAL version number */
#define IPPL_OPAL_VERSION ${OPAL_PACKAGE_VERSION}
......
......@@ -2114,7 +2114,7 @@ void AmrMultiGrid::writeSDDSHeader_m(std::ofstream& outfile) {
<< indent << "no_row_counts=1\n"
<< "&end\n"
<< Ippl::getNodes() << '\n'
<< PACKAGE_NAME << " " << OPAL_VERSION_STR << " git rev. #" << Util::getGitRevision() << '\n'
<< OPAL_PROJECT_NAME << " " << OPAL_PROJECT_VERSION << " git rev. #" << Util::getGitRevision() << '\n'
<< (OpalData::getInstance()->isInOPALTMode()? "opal-t":
(OpalData::getInstance()->isInOPALCyclMode()? "opal-cycl": "opal-env")) << std::endl;
*/
......
......@@ -219,7 +219,7 @@ void IndexMap::saveSDDS(double startS) const {
<< indent << "no_row_counts=1 \n"
<< "&end\n";
sdds << PACKAGE_NAME << " " << OPAL_VERSION_STR << " # git rev. " << Util::getGitRevision() << std::endl;
sdds << OPAL_PROJECT_NAME << " " << OPAL_PROJECT_VERSION << " # git rev. " << Util::getGitRevision() << std::endl;
}
std::vector<std::vector<int> > allItems(SIZE);
......
......@@ -651,7 +651,7 @@ void StatisticalErrors::writeSDDSData(std::ofstream &out,
const std::map<std::string, std::vector<double> > &data,
const std::vector<std::string> &order) {
out << Ippl::getNodes() << "\n"
<< PACKAGE_NAME << " " << OPAL_VERSION_STR << " # git rev. " << Util::getGitRevision() << std::endl;
<< OPAL_PROJECT_NAME << " " << OPAL_PROJECT_VERSION << " # git rev. " << Util::getGitRevision() << std::endl;
size_t sizeData = data.find("s")->second.size();
size_t numColumns = order.size();
......@@ -1074,4 +1074,4 @@ std::pair<int, int> StatisticalErrors::getNextObjectiveToProcess(int tag, char *
memcpy(reinterpret_cast<char*>(&nextJob.second), messageBuffer + sizeof(int), sizeof(int));
return nextJob;
}
\ No newline at end of file
}
......@@ -163,7 +163,7 @@ void Save::execute() {
std::string comchar = "// ";
os << comchar << "<OPAL Version " << OPAL_VERSION_STR << " GIT version "
os << comchar << "<OPAL Version " << OPAL_PROJECT_VERSION << " GIT version "
<< Util::getGitRevision() << " (c) PSI, http://amas.web.psi.ch"
<< std::endl << ";" << std::endl ;
......@@ -188,7 +188,7 @@ void Save::execute() {
os << comchar << "</Special definitions> ;"
<< std::endl << ";" << std::endl ;
os << comchar << "<OPAL Version " << OPAL_VERSION_STR << " GIT version "
os << comchar << "<OPAL Version " << OPAL_PROJECT_VERSION << " GIT version "
<< Util::getGitRevision() << " (c) PSI, http://amas.web.psi.ch"
<< std::endl << ";" << std::endl ;
}
......@@ -197,4 +197,4 @@ void Save::execute() {
void Save::parse(Statement &statement) {
parseShortcut(statement);
}
\ No newline at end of file
}
set (DKS_VERSION_OPAL \"${DKS_VERSION}\")
set (CMAKE_CXX_FLAGS
add_definitions (
"${IPPL_CMAKE_CXX_FLAGS} -DPARALLEL_IO ${CMAKE_CXX_FLAGS}"
)
......@@ -38,7 +38,6 @@ else (ENABLE_AMR AND ENABLE_AMR_MG_SOLVER)
set (AMR_MG_SOLVER_LIBS "")
endif(ENABLE_AMR AND ENABLE_AMR_MG_SOLVER)
set (PACKAGE_COMPILE_OPTIONS \"${CMAKE_CXX_FLAGS}\")
configure_file(config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/OPALconfig.h)
configure_file(revision.h.in ${CMAKE_CURRENT_SOURCE_DIR}/OPALrevision.h)
......
......@@ -172,7 +172,7 @@ void LossDataSink::writeHeaderH5() {
// Write file attributes to describe phase space to H5 file.
std::stringstream OPAL_version;
OPAL_version << PACKAGE_NAME << " " << OPAL_VERSION_STR << " # git rev. " << Util::getGitRevision();
OPAL_version << OPAL_PROJECT_NAME << " " << OPAL_PROJECT_VERSION << " # git rev. " << Util::getGitRevision();
WRITE_FILEATTRIB_STRING ("OPAL_version", OPAL_version.str().c_str());
WRITE_FILEATTRIB_STRING ("tUnit", "s");
WRITE_FILEATTRIB_STRING ("xUnit", "m");
......@@ -910,7 +910,7 @@ void LossDataSink::writeStatistics() {
<< indent << "no_row_counts=1\n"
<< "&end\n";
statOut << PACKAGE_NAME << " " << OPAL_VERSION_STR << " git rev. " << Util::getGitRevision() << std::endl;
statOut << OPAL_PROJECT_NAME << " " << OPAL_PROJECT_VERSION << " git rev. " << Util::getGitRevision() << std::endl;
}
for (auto entry: statFileEntries_s) {
......
......@@ -126,7 +126,7 @@ int main(int argc, char *argv[]) {
*gmsg << endl
<< "This is OPAL (Object Oriented Parallel Accelerator Library) Version " << OPAL_VERSION_STR << "\n\n"
<< "This is OPAL (Object Oriented Parallel Accelerator Library) Version " << OPAL_PROJECT_VERSION << "\n\n"
<< " (c) PSI, http://amas.web.psi.ch" << endl
<< "The optimiser (former opt-Pilot) is integrated " << endl
<< endl;
......@@ -238,11 +238,11 @@ int main(int argc, char *argv[]) {
continue;
} else if (argStr == std::string("-version") ||
argStr == std::string("--version")) {
INFOMSG("OPAL Version " << OPAL_VERSION_STR << ", git rev. " << Util::getGitRevision() << endl);
INFOMSG("OPAL Version " << OPAL_PROJECT_VERSION << ", git rev. " << Util::getGitRevision() << endl);
IpplInfo::printVersion(true);
std::string options = (IpplInfo::compileOptions() +
std::string(" ") +
std::string(PACKAGE_COMPILE_OPTIONS) +
std::string(OPAL_COMPILE_OPTIONS) +
std::string(" "));
std::set<std::string> uniqOptions;
while (options.length() > 0) {
......
......@@ -2111,7 +2111,7 @@ void AmrMultiGrid::writeSDDSHeader_m(std::ofstream& outfile) {
<< indent << "no_row_counts=1\n"
<< "&end\n"
<< Ippl::getNodes() << '\n'
<< PACKAGE_NAME << " " << OPAL_VERSION_STR << " git rev. #" << Util::getGitRevision() << '\n'
<< OPAL_PROJECT_NAME << " " << OPAL_PROJECT_VERSION << " git rev. #" << Util::getGitRevision() << '\n'
<< (OpalData::getInstance()->isInOPALTMode()? "opal-t":
(OpalData::getInstance()->isInOPALCyclMode()? "opal-cycl": "opal-env")) << std::endl;
}
......
......@@ -919,7 +919,7 @@ void DataSink::writeSDDSHeader(std::ofstream &outputFile,
<< "&end\n";
outputFile << Ippl::getNodes() << std::endl;
outputFile << PACKAGE_NAME << " " << OPAL_VERSION_STR << " git rev. #" << Util::getGitRevision() << std::endl;
outputFile << OPAL_PROJECT_NAME << " " << OPAL_PROJECT_VERSION << " git rev. #" << Util::getGitRevision() << std::endl;
outputFile << (OpalData::getInstance()->isInOPALTMode()? "opal-t":
<