Page MenuHomeHEPForge

No OneTemporary

Index: branches/sartre-nnet/src/CMakeLists.txt
===================================================================
--- branches/sartre-nnet/src/CMakeLists.txt (revision 0)
+++ branches/sartre-nnet/src/CMakeLists.txt (revision 200)
@@ -0,0 +1,148 @@
+#===============================================================================
+# CMakeLists.txt (src)
+#
+# Copyright (C) 2010-2013 Tobias Toll and Thomas Ullrich
+#
+# This file is part of Sartre version: 1.00
+#
+# 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: 2015-02-11 16:11:08 +0530 (Wed, 11 Feb 2015) $
+# $Author: tobilibob@gmail.com $
+#===============================================================================
+cmake_minimum_required (VERSION 2.6)
+
+#
+# Compiler flags for release and debug version
+#
+set(CMAKE_C_FLAGS_DEBUG "-g -W")
+set(CMAKE_CXX_FLAGS_DEBUG "-g -W -Wall -Wextra -pedantic -Wno-long-long")
+set(CMAKE_C_FLAGS_RELEASE "-O -W")
+set(CMAKE_CXX_FLAGS_RELEASE "-O -W -Wall -Wextra -pedantic -Wno-long-long -std=c++11")
+
+#
+# Find externak 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 builds with an external configure/make
+# Copy the cuba directory from the source to the build directory so we can build it there
+add_custom_command(
+ OUTPUT cuba
+ COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/cuba ${PROJECT_BINARY_DIR}/cuba
+)
+
+#
+# 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} "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} "NNetAmpApprox.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} "dglap.c")
+set(SARTRE_SRC ${SARTRE_SRC} "laguerre.c")
+add_library(sartre ${SARTRE_SRC})
+
+#
+# This is needed to trigger the configure/make of cuba
+#
+add_dependencies(sartre libcuba.a)
+
+#
+# Cuba (call configure/make shipped with cuba)
+#
+add_custom_target(
+ libcuba.a
+ COMMAND ./configure
+ COMMAND make lib
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/cuba
+ # Add a dependency on the duplicated cuba directory
+ # to ensure that the copying takes place
+ DEPENDS cuba
+)
+
+#
+# Table tools (all stand alone programs)
+#
+add_executable(tableInspector tableInspector.cpp)
+add_executable(tableMerger tableMerger.cpp)
+add_executable(tableQuery tableQuery.cpp)
+target_link_libraries(tableInspector ${CMAKE_CURRENT_BINARY_DIR}/libsartre.a ${LIBS})
+target_link_libraries(tableMerger ${CMAKE_CURRENT_BINARY_DIR}/libsartre.a ${LIBS})
+target_link_libraries(tableQuery ${CMAKE_CURRENT_BINARY_DIR}/libsartre.a ${LIBS})
+
+
+#
+# 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/libcuba.a" DESTINATION sartre/lib)
+
+FILE(GLOB AllIncludeFiles *.h)
+install(FILES ${AllIncludeFiles} DESTINATION sartre/include)
+install(FILES "${PROJECT_SOURCE_DIR}/cuba/cuba.h" DESTINATION sartre/include)
+
+install(TARGETS tableInspector DESTINATION sartre/bin)
+install(TARGETS tableMerger DESTINATION sartre/bin)
+install(TARGETS tableQuery DESTINATION sartre/bin)

File Metadata

Mime Type
text/x-diff
Expires
Sun, Feb 23, 2:19 PM (2 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4486521
Default Alt Text
(5 KB)

Event Timeline