1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2024-11-10 00:45:36 +00:00

first cmake draft, source relocation, not working

This commit is contained in:
Antonin Portelli 2024-01-28 22:13:07 -03:00
parent 0b5da3866e
commit 0b5c6e851c
103 changed files with 177 additions and 8 deletions

12
.gitignore vendored
View File

@ -12,22 +12,18 @@ sandbox/*
# autotools
autom4te.cache/*
*.in
*.in~
config.h*
configure
configure~
.buildutils/*
aclocal.m4
# bison/flex generated sources
lib/*Lexer.cpp
lib/*Parser.cpp
lib/*Parser.hpp
lib/LatAnalyze/*Lexer.cpp
lib/LatAnalyze/*Parser.cpp
lib/LatAnalyze/*Parser.hpp
# Eigen headers and archives
lib/Eigen
lib/eigen_files.mk
lib/LatAnalyze/Eigen
eigen-*.tar.bz2
# CI builds

42
CMakeLists.txt Normal file
View File

@ -0,0 +1,42 @@
cmake_minimum_required(VERSION 3.11.0)
project(
LatAnalyze
VERSION 3.6
LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 11)
include(FetchContent)
include(FindPackageMessage)
set(FETCHCONTENT_BASE_DIR ${CMAKE_BINARY_DIR}/deps)
FetchContent_Declare(
Eigen3
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
GIT_TAG 3.4.0)
FetchContent_GetProperties(Eigen3)
if(NOT eigen3_POPULATED)
FetchContent_Populate(Eigen3)
message(STATUS "Eigen3 fetched")
endif()
file(CREATE_LINK ${eigen3_SOURCE_DIR}/Eigen ${CMAKE_SOURCE_DIR}/lib/LatAnalyze/Eigen
SYMBOLIC)
find_package(GSL REQUIRED)
find_package(HDF5 REQUIRED COMPONENTS C CXX)
find_package(Minuit2)
if(Minuit2_FOUND)
find_package_message(
Minuit2
"Found Minuit2: ${Minuit2_DIR} (found version \"${Minuit2_VERSION}\")" " ")
else()
message(STATUS "Minuit2 not found")
endif()
find_package(NLopt)
if(NLopt_FOUND)
find_package_message(
NLopt "Found NLopt: ${NLopt_DIR} (found version \"${NLopt_VERSION}\")" " ")
else()
message(STATUS "NLopt not found")
endif()
add_subdirectory(lib)

0
config.h.in Normal file
View File

131
lib/CMakeLists.txt Normal file
View File

@ -0,0 +1,131 @@
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}")
include(FindBISON)
include(FindFLEX)
find_package(BISON REQUIRED)
find_package(FLEX REQUIRED)
bison_target(AsciiParser LatAnalyze/Io/AsciiParser.ypp
${CMAKE_CURRENT_BINARY_DIR}/AsciiParser.cpp
COMPILE_FLAGS "-Wno-deprecated")
flex_target(AsciiLexer LatAnalyze/Io/AsciiLexer.lpp
${CMAKE_CURRENT_BINARY_DIR}/AsciiLexer.cpp)
add_flex_bison_dependency(AsciiLexer AsciiParser)
bison_target(MathParser LatAnalyze/Core/MathParser.ypp
${CMAKE_CURRENT_BINARY_DIR}/MathParser.cpp
COMPILE_FLAGS "-Wno-deprecated")
flex_target(MathLexer LatAnalyze/Core/MathLexer.lpp
${CMAKE_CURRENT_BINARY_DIR}/MathLexer.cpp)
add_flex_bison_dependency(MathLexer MathParser)
add_library(LatAnalyze SHARED)
file(GLOB_RECURSE EIGEN_HEADERS Eigen/*)
target_sources(
LatAnalyze
PRIVATE ${BISON_AsciiParser_OUTPUTS}
${FLEX_AsciiLexer_OUTPUTS}
${BISON_MathParser_OUTPUTS}
${FLEX_MathLexer_OUTPUTS}
LatAnalyze/Core/Exceptions.cpp
LatAnalyze/Core/Mat.cpp
LatAnalyze/Core/Math.cpp
LatAnalyze/Core/MathInterpreter.cpp
LatAnalyze/Core/OptParser.cpp
LatAnalyze/Core/Plot.cpp
LatAnalyze/Core/ThreadPool.cpp
LatAnalyze/Core/Utilities.cpp
LatAnalyze/Functional/CompiledFunction.cpp
LatAnalyze/Functional/CompiledModel.cpp
LatAnalyze/Functional/Function.cpp
LatAnalyze/Functional/Model.cpp
LatAnalyze/Functional/TabFunction.cpp
LatAnalyze/Global.cpp
LatAnalyze/Io/AsciiFile.cpp
LatAnalyze/Io/BinReader.cpp
LatAnalyze/Io/File.cpp
LatAnalyze/Io/Hdf5File.cpp
LatAnalyze/Io/Io.cpp
LatAnalyze/Io/Xml/tinyxml2.cpp
LatAnalyze/Io/XmlReader.cpp
LatAnalyze/Numerical/DWT.cpp
LatAnalyze/Numerical/DWTFilters.cpp
LatAnalyze/Numerical/Derivative.cpp
LatAnalyze/Numerical/GslFFT.cpp
LatAnalyze/Numerical/GslHybridRootFinder.cpp
LatAnalyze/Numerical/GslMinimizer.cpp
LatAnalyze/Numerical/GslQagsIntegrator.cpp
LatAnalyze/Numerical/Minimizer.cpp
LatAnalyze/Numerical/MinuitMinimizer.cpp
LatAnalyze/Numerical/NloptMinimizer.cpp
LatAnalyze/Numerical/RootFinder.cpp
LatAnalyze/Numerical/Solver.cpp
LatAnalyze/Physics/CorrelatorFitter.cpp
LatAnalyze/Physics/DataFilter.cpp
LatAnalyze/Physics/EffectiveMass.cpp
LatAnalyze/Statistics/FitInterface.cpp
LatAnalyze/Statistics/Histogram.cpp
LatAnalyze/Statistics/Random.cpp
LatAnalyze/Statistics/StatArray.cpp
LatAnalyze/Statistics/XYSampleData.cpp
LatAnalyze/Statistics/XYStatData.cpp
PUBLIC FILE_SET
public_headers
TYPE
HEADERS
FILES
${EIGEN_HEADERS}
LatAnalyze/Core/Eigen.hpp
LatAnalyze/Core/EigenPlugin.hpp
LatAnalyze/Core/Exceptions.hpp
LatAnalyze/Core/Mat.hpp
LatAnalyze/Core/Math.hpp
LatAnalyze/Core/MathInterpreter.hpp
LatAnalyze/Core/OptParser.hpp
LatAnalyze/Core/ParserState.hpp
LatAnalyze/Core/Plot.hpp
LatAnalyze/Core/ThreadPool.hpp
LatAnalyze/Core/Utilities.hpp
LatAnalyze/Core/stdincludes.hpp
LatAnalyze/Functional/CompiledFunction.hpp
LatAnalyze/Functional/CompiledModel.hpp
LatAnalyze/Functional/Function.hpp
LatAnalyze/Functional/Model.hpp
LatAnalyze/Functional/TabFunction.hpp
LatAnalyze/Global.hpp
LatAnalyze/Io/AsciiFile.hpp
LatAnalyze/Io/BinReader.hpp
LatAnalyze/Io/File.hpp
LatAnalyze/Io/Hdf5File.hpp
LatAnalyze/Io/Io.hpp
LatAnalyze/Io/IoObject.hpp
LatAnalyze/Io/Xml/tinyxml2.hpp
LatAnalyze/Io/XmlReader.hpp
LatAnalyze/Numerical/DWT.hpp
LatAnalyze/Numerical/DWTFilters.hpp
LatAnalyze/Numerical/Derivative.hpp
LatAnalyze/Numerical/FFT.hpp
LatAnalyze/Numerical/GslFFT.hpp
LatAnalyze/Numerical/GslHybridRootFinder.hpp
LatAnalyze/Numerical/GslMinimizer.hpp
LatAnalyze/Numerical/GslQagsIntegrator.hpp
LatAnalyze/Numerical/Integrator.hpp
LatAnalyze/Numerical/Minimizer.hpp
LatAnalyze/Numerical/MinuitMinimizer.hpp
LatAnalyze/Numerical/NloptMinimizer.hpp
LatAnalyze/Numerical/RootFinder.hpp
LatAnalyze/Numerical/Solver.hpp
LatAnalyze/Physics/CorrelatorFitter.hpp
LatAnalyze/Physics/DataFilter.hpp
LatAnalyze/Physics/EffectiveMass.hpp
LatAnalyze/Statistics/Dataset.hpp
LatAnalyze/Statistics/FitInterface.hpp
LatAnalyze/Statistics/Histogram.hpp
LatAnalyze/Statistics/MatSample.hpp
LatAnalyze/Statistics/Random.hpp
LatAnalyze/Statistics/StatArray.hpp
LatAnalyze/Statistics/XYSampleData.hpp
LatAnalyze/Statistics/XYStatData.hpp
LatAnalyze/includes.hpp)
target_link_libraries(LatAnalyze PUBLIC GSL::gsl HDF5 Minuit2 NLopt)

Some files were not shown because too many files have changed in this diff Show More