Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F8308915
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
11 KB
Subscribers
None
View Options
Index: trunk/src/CMakeLists.txt
===================================================================
--- trunk/src/CMakeLists.txt (revision 476)
+++ trunk/src/CMakeLists.txt (revision 477)
@@ -1,163 +1,163 @@
#===============================================================================
# CMakeLists.txt (src)
#
# Copyright (C) 2010-2019 Tobias Toll and Thomas Ullrich
#
# This file is part of Sartre.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation.
# This program is distributed in the hope that it will be useful,
# but without any warranty; without even the implied warranty of
# merchantability or fitness for a particular purpose. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Author: Thomas Ullrich
# Last update:
# $Date$
# $Author$
#===============================================================================
include(ExternalProject)
cmake_minimum_required (VERSION 3.1)
#
# Compiler flags for release and debug version
#
set(CMAKE_C_FLAGS "-W")
set(CMAKE_C_FLAGS_DEBUG "-g")
set(CMAKE_C_FLAGS_RELEASE "-O")
message("COMPILER = ${CMAKE_CXX_COMPILER_ID}")
set(CMAKE_CXX_FLAGS "-W -Wall -Wextra -Wpedantic -Wno-long-long")
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-potentially-evaluated-expression")
endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O")
-set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
#
# Find external required packages
# (see also FindGSL.cmake and FindROOT.cmke in cmake/modules)
# Herer we need only the root library to create the table
# tools.
#
# GSL
find_package(GSL REQUIRED)
include_directories(${GSL_INCLUDE_DIR})
# ROOT
find_package(ROOT REQUIRED)
include_directories(${ROOT_INCLUDE_DIR})
set(LIBS ${LIBS} ${ROOT_LIBRARIES})
#BOOST
if (MULTITHREADED)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
find_package(Boost 1.39 COMPONENTS thread REQUIRED)
if (Boost_FOUND)
include_directories(${Boost_INCLUDE_DIR})
endif(Boost_FOUND)
endif (MULTITHREADED)
#
# Include files from sartre package
#
include_directories(${PROJECT_SOURCE_DIR}/src)
include_directories(${PROJECT_SOURCE_DIR}/gemini)
include_directories(${PROJECT_SOURCE_DIR}/cuba)
#
# Cuba is built using the autoconf shipped with it
#
ExternalProject_Add(
cuba
DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/cuba ${PROJECT_BINARY_DIR}/cuba
SOURCE_DIR ${PROJECT_BINARY_DIR}/cuba
PREFIX ${PROJECT_BINARY_DIR}/cuba
CONFIGURE_COMMAND ${PROJECT_BINARY_DIR}/cuba/configure --prefix=${PROJECT_BINARY_DIR}/cuba/build
BUILD_COMMAND make lib
BUILD_IN_SOURCE 1
)
#
# Defines source files for sartre library
#
set(SARTRE_SRC "AlphaStrong.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "Amplitudes.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "BreakupProduct.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "CrossSection.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "DglapEvolution.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "DipoleModel.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "DipoleModelParameters.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "Event.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "ExclusiveFinalStateGenerator.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "FinalStateGenerator.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "FrangibleNucleus.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "EventGeneratorSettings.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "Integrals.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "Kinematics.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "ModeFinderFunctor.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "Nucleon.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "Nucleus.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "PhotonFlux.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "Sartre.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "Settings.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "Table.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "TableCollection.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "TableGeneratorNucleus.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "TableGeneratorSettings.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "WaveOverlap.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "TwoBodyVectorMesonDecay.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "EicSmearFormatWriter.cpp")
set(SARTRE_SRC ${SARTRE_SRC} "VectorMesonDecayMass.cpp")
add_library(sartre ${SARTRE_SRC})
#
# Table tools (all stand alone programs)
#
add_executable(tableInspector tableInspector.cpp)
add_executable(tableMerger tableMerger.cpp)
add_executable(tableQuery tableQuery.cpp)
add_executable(tableDumper tableDumper.cpp)
add_executable(tableVarianceMaker tableVarianceMaker.cpp)
add_executable(tablePriority tablePriority.cpp)
target_link_libraries(tableInspector sartre ${LIBS})
target_link_libraries(tableMerger sartre ${LIBS})
target_link_libraries(tableQuery sartre ${LIBS})
target_link_libraries(tableDumper sartre ${LIBS})
target_link_libraries(tableVarianceMaker sartre ${LIBS})
target_link_libraries(tablePriority sartre ${LIBS})
add_dependencies(tableInspector sartre)
add_dependencies(tableMerger sartre)
add_dependencies(tableQuery sartre)
add_dependencies(tableDumper sartre)
add_dependencies(tableVarianceMaker sartre)
add_dependencies(tablePriority sartre)
#
# Install library and include files (make install) within
# the distribution tree. Top level CMakeLists.txt will install
# Sartre in final destination.
#
install(TARGETS sartre DESTINATION sartre/lib)
install(FILES "${PROJECT_BINARY_DIR}/cuba/build/lib/libcuba.a" DESTINATION sartre/lib)
FILE(GLOB AllIncludeFiles *.h)
install(FILES ${AllIncludeFiles} DESTINATION sartre/include)
install(FILES "${PROJECT_BINARY_DIR}/cuba/build/include/cuba.h" DESTINATION sartre/include)
install(TARGETS tableInspector DESTINATION sartre/bin)
install(TARGETS tableMerger DESTINATION sartre/bin)
install(TARGETS tableQuery DESTINATION sartre/bin)
install(TARGETS tableDumper DESTINATION sartre/bin)
install(TARGETS tableVarianceMaker DESTINATION sartre/bin)
install(TARGETS tablePriority DESTINATION sartre/bin)
Index: trunk/examples/CMakeLists.txt
===================================================================
--- trunk/examples/CMakeLists.txt (revision 476)
+++ trunk/examples/CMakeLists.txt (revision 477)
@@ -1,162 +1,162 @@
#===============================================================================
# CMakeLists.txt (examples)
#
# Copyright (C) 2010-2019 Tobias Toll and Thomas Ullrich
#
# This file is part of Sartre.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation.
# This program is distributed in the hope that it will be useful,
# but without any warranty; without even the implied warranty of
# merchantability or fitness for a particular purpose. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Author: Thomas Ullrich
# Last update:
# $Date$
# $Author$
#===============================================================================
cmake_minimum_required (VERSION 3.1)
project(SARTRE_EXAMPLES)
#
# Compiler options
#
set(CMAKE_CXX_FLAGS "-W -Wall -Wextra -pedantic -Wno-long-long")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O")
-set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
#
# Set the location of the installed sartre package
#
set(SARTRE_DIR "$ENV{SARTRE_DIR}")
if (IS_DIRECTORY "${SARTRE_DIR}" AND
IS_DIRECTORY "${SARTRE_DIR}/lib" AND
IS_DIRECTORY "${SARTRE_DIR}/include" AND
IS_DIRECTORY "${SARTRE_DIR}/gemini" AND
IS_DIRECTORY "${SARTRE_DIR}/tables")
message (STATUS "Using Sartre installed in ${SARTRE_DIR}")
else()
message(FATAL_ERROR "Environment variable SARTRE_DIR does not point to a valid Sartre installation.")
endif()
message(STATUS "System = ${CMAKE_SYSTEM}")
#
# User can select if Sartre is to be compiled
# in multithreaded mode or not.
# Default is off.
# cmake -DMULTITHREADED=ON .
#
option(MULTITHREADED "Switch on/off multithreaded mode" OFF)
if (MULTITHREADED)
add_definitions(-DSARTRE_IN_MULTITHREADED_MODE)
message (STATUS "MULTITHREADED mode is ON")
endif (MULTITHREADED)
#
# See if optional libraries (Glut & OpenGL) are present.
# If not skip the examples that require them.
#
# GLUT
#find_package(GLUT)
#if (GLUT_FOUND)
# message("blah")
# include_directories(${GLUT_INCLUDE_DIR})
# set(LIBS ${LIBS} ${GLUT_LIBRARIES})
#endif()
# OpenGL
find_package(OpenGL)
if (OPENGL_FOUND)
include_directories(${OPENGL_INCLUDE_DIR})
set(LIBS ${LIBS} ${OPENGL_LIBRARIES})
endif()
#
# Built all programs in example directory
#
add_executable(createBSatBDependenceTable createBSatBDependenceTable.cpp)
add_executable(heraCompare heraCompare.cpp)
add_executable(sartreMain sartreMain.cpp)
add_executable(sartreTest sartreTest.cpp)
add_executable(tableGeneratorMain tableGeneratorMain.cpp)
add_executable(tableGeneratorUPCMain tableGeneratorUPCMain.cpp)
add_executable(lambdaGeneratorMain lambdaGeneratorMain.cpp)
add_executable(convergenceTest convergenceTest.cpp)
#if (OPENGL_FOUND AND GLUT_FOUND)
# add_executable(nucleusAnimation nucleusAnimation.cpp)
#endif()
#
# Make sure the files to search for external libraries are available
#
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules")
#
# Compiler options
#
set(CMAKE_C_FLAGS_DEBUG " -g -W")
set(CMAKE_CXX_FLAGS_DEBUG " -g -W -Wall -Wextra -pedantic -Wno-long-long -std=c++11")
set(CMAKE_C_FLAGS_RELEASE " -O -W")
set(CMAKE_CXX_FLAGS_RELEASE " -O -W -Wall -Wextra -pedantic -Wno-long-long -std=c++11")
set(CMAKE_C_FLAGS " -O -W")
set(CMAKE_CXX_FLAGS " -O -std=c++11 -W -Wall -Wextra -pedantic -Wno-long-long")
#
# Include files locations
#
include_directories("${SARTRE_DIR}/include")
#
# Find external required packages
# (see also FindGSL.cmake and FindROOT.cmke in cmake/modules)
#
# GSL
find_package(GSL REQUIRED)
include_directories(${GSL_INCLUDE_DIR})
set(LIBS ${LIBS} ${GSL_LIBRARIES})
# ROOT
find_package(ROOT REQUIRED)
include_directories(${ROOT_INCLUDE_DIR})
set(LIBS ${LIBS} ${ROOT_LIBRARIES} "-lEG -lMathMore -lUnuran" )
#BOOST
if (MULTITHREADED)
set(Boost_USE_MULTITHREADED ON)
find_package(Boost 1.39 COMPONENTS thread REQUIRED)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIR})
set(LIBS ${LIBS} ${Boost_LIBRARIES} -lboost_system)
endif(Boost_FOUND)
endif (MULTITHREADED)
#
# Libraries to link with
#
#link_directories(${SARTRE_DIR}/lib)
file (GLOB ALLSARTRE ${SARTRE_DIR}/lib/*)
set(LIBS ${ALLSARTRE} ${ALLSARTRE} ${LIBS} ${ALLSARTRE})
target_link_libraries(createBSatBDependenceTable ${LIBS})
target_link_libraries(heraCompare ${LIBS})
target_link_libraries(sartreMain ${LIBS})
target_link_libraries(sartreTest ${LIBS})
target_link_libraries(tableGeneratorMain ${LIBS})
target_link_libraries(tableGeneratorUPCMain ${LIBS})
target_link_libraries(lambdaGeneratorMain ${LIBS})
target_link_libraries(convergenceTest ${LIBS})
#if (OPENGL_FOUND AND GLUT_FOUND)
# target_link_libraries(nucleusAnimation ${LIBS})
#endif()
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Dec 21, 1:36 PM (15 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4022983
Default Alt Text
(11 KB)
Attached To
rSARTRESVN sartresvn
Event Timeline
Log In to Comment