From 341b4bc73b61bd1a6f26ceafd9dbf5cba1c19dbd Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Sat, 10 Feb 2024 10:55:22 +0100 Subject: [PATCH] adding CLI binaries --- CMakeLists.txt | 8 ++++++++ examples/CMakeLists.txt | 21 +++++++++++++++++++++ physics/CMakeLists.txt | 7 +++++++ utils/CMakeLists.txt | 18 ++++++++++++++++++ 4 files changed, 54 insertions(+) create mode 100644 examples/CMakeLists.txt create mode 100644 physics/CMakeLists.txt create mode 100644 utils/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f9837f..f45f21e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,11 @@ include(GNUInstallDirs) # C++ standard set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED True) +set(CMAKE_CXX_EXTENSIONS OFF) + +# installation rpath setup +set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") # fetch and create symbolic link to Eigen headers set(FETCHCONTENT_BASE_DIR ${CMAKE_BINARY_DIR}/deps) @@ -53,6 +58,9 @@ endif() # subdirectories add_subdirectory(lib) +add_subdirectory(examples) +add_subdirectory(physics) +add_subdirectory(utils) # summary message(STATUS "---------------------------") diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt new file mode 100644 index 0000000..3cdefb6 --- /dev/null +++ b/examples/CMakeLists.txt @@ -0,0 +1,21 @@ +set(EXAMPLES_STEM + exCompiledDoubleFunction + exDerivative + exDWT + exFit + exFitSample + exIntegrator + exInterp + exMat + exMathInterpreter + exMin + exPlot + exPValue + exRand + exRootFinder + exThreadPool) + +foreach(_stem ${EXAMPLES_STEM}) + add_executable(${_stem} ${_stem}.cpp) + target_link_libraries(${_stem} LatAnalyze) +endforeach() diff --git a/physics/CMakeLists.txt b/physics/CMakeLists.txt new file mode 100644 index 0000000..c64dee4 --- /dev/null +++ b/physics/CMakeLists.txt @@ -0,0 +1,7 @@ +set(PHYSICS_STEM 2pt-fit) + +foreach(_stem ${PHYSICS_STEM}) + add_executable(latan-${_stem} ${_stem}.cpp) + target_link_libraries(latan-${_stem} LatAnalyze) + install(TARGETS latan-${_stem} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +endforeach() diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt new file mode 100644 index 0000000..dc32172 --- /dev/null +++ b/utils/CMakeLists.txt @@ -0,0 +1,18 @@ +set(UTILS_STEM + plot + resample + sample-combine + sample-dwt + sample-element + sample-fake + sample-ft + sample-merge + sample-plot-corr + sample-plot + sample-read) + +foreach(_stem ${UTILS_STEM}) + add_executable(latan-${_stem} ${_stem}.cpp) + target_link_libraries(latan-${_stem} LatAnalyze) + install(TARGETS latan-${_stem} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +endforeach()