Massive reorganization of CMake files

This commit is contained in:
Paolo Andreetto
2020-06-29 14:44:26 +02:00
parent 9d899928b8
commit a60a21bfe4
14 changed files with 292 additions and 439 deletions

View File

@@ -1,41 +1,27 @@
set(HEADERS
Archives.h
Array.h
Debug.h
Export.h
Function.h
Macros.h
Mpl.h
Object.h
ObjectProps.h
Options.h
Serializable.h
Signal.h
Singleton.h
SmartPointer.h
StaticInterface.h
StringReader.h
Types.h
Uuid.h
Timer.h
)
set(HEADERS Options.h
StaticInterface.h)
set(SOURCES Options.cpp)
set(LIBRARIES ${Boost_PROGRAM_OPTIONS_LIBRARY})
set(libname ${PACKAGE_LIBPREFIX}Core)
set(ULIB_SHARED_LIBRARIES ${ULIB_SHARED_LIBRARIES} ${libname} PARENT_SCOPE)
set(ULIB_SELECTED_MODULES ${ULIB_SELECTED_MODULES} Core PARENT_SCOPE)
add_library(${libname} SHARED ${SOURCES})
set_target_properties(${libname} PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_SOVERSION})
target_link_libraries(${libname} ${LIBRARIES})
install(TARGETS ${libname}
EXPORT "${PROJECT_NAME}Targets"
RUNTIME DESTINATION ${PACKAGE_INSTALL_BIN_DIR} COMPONENT bin
LIBRARY DESTINATION ${PACKAGE_INSTALL_LIB_DIR} COMPONENT lib)
install(FILES ${HEADERS} DESTINATION ${PACKAGE_INSTALL_INC_DIR}/Core)
SET(SOURCES
Archives.cpp
Object.cpp
Options.cpp
Serializable.cpp
Signal.cpp
Uuid.cpp
)
set(LIBRARIES
${Boost_SERIALIZATION_LIBRARY}
${Boost_SIGNALS_LIBRARY}
${Boost_PROGRAM_OPTIONS_LIBRARY}
${ROOT_LIBRARIES}
)
uLib_add_shared_library(${uLib-module})
add_subdirectory(testing)

View File

@@ -1,37 +1,6 @@
#set(HEADERS
# DetectorChamber.h
# ExperimentFitEvent.h
# GeantEvent.h
# HitMC.h
# MuonScatter.h
# MuonEvent.h
# MuonError.h
# ChamberHitEvent.h
# Hit.h
# LinearFit.h
# Solid.h
# Matter.h
# Scene.h
#)
#set(SOURCES
# Solid.cpp
# Scene.cpp
#)
#set(LIBRARIES
# ${Boost_SERIALIZATION_LIBRARY}
# ${Boost_SIGNALS_LIBRARY}
# ${Boost_PROGRAM_OPTIONS_LIBRARY}
# ${Eigen_LIBRARY}
# ${Geant4_LIBRARIES}
# ${ROOT_LIBRARIES}
# ${PACKAGE_LIBPREFIX}Core
# ${PACKAGE_LIBPREFIX}Math
#)
set(HEADERS MuonScatter.h MuonError.h MuonEvent.h)
uLib_add_shared_library(${uLib-module})
add_subdirectory(testing)
set(ULIB_SELECTED_MODULES ${ULIB_SELECTED_MODULES} Detectors PARENT_SCOPE)
install(FILES ${HEADERS}
DESTINATION ${PACKAGE_INSTALL_INC_DIR}/Detectors)

View File

@@ -1,53 +1,53 @@
set(HEADERS ContainerBox.h
Dense.h
Geometry.h
Transform.h
StructuredData.h
StructuredGrid.h
VoxImage.h
VoxRaytracer.h
Utils.h
VoxImageFilter.h
VoxImageFilter.hpp
VoxImageFilterLinear.hpp
VoxImageFilterMedian.hpp
VoxImageFilterABTrim.hpp
VoxImageFilterBilateral.hpp
VoxImageFilterThreshold.hpp
VoxImageFilter2ndStat.hpp
VoxImageFilterCustom.hpp
Accumulator.h
TriangleMesh.h
BitCode.h
Structured2DGrid.h
Structured4DGrid.h)
# HEADERS
set(HEADERS
ContainerBox.h
Dense.h
Geometry.h
Transform.h
StructuredData.h
StructuredGrid.h
VoxImage.h
VoxRaytracer.h
Utils.h
VoxImageFilter.h
VoxImageFilter.hpp
VoxImageFilterLinear.hpp
VoxImageFilterMedian.hpp
VoxImageFilterABTrim.hpp
VoxImageFilterBilateral.hpp
VoxImageFilterThreshold.hpp
VoxImageFilter2ndStat.hpp
VoxImageFilterCustom.hpp
Accumulator.h
TriangleMesh.h
BitCode.h
Structured2DGrid.h
Structured4DGrid.h
)
set(SOURCES VoxRaytracer.cpp
StructuredData.cpp
StructuredGrid.cpp
VoxImage.cpp
TriangleMesh.cpp
Dense.cpp
Structured2DGrid.cpp
Structured4DGrid.cpp)
set(LIBRARIES ${Eigen_LIBRARY}
${ROOT_LIBRARIES})
# SOURCES
set(SOURCES
VoxRaytracer.cpp
StructuredData.cpp
StructuredGrid.cpp
VoxImage.cpp
TriangleMesh.cpp
Dense.cpp
Structured2DGrid.cpp
Structured4DGrid.cpp
)
set(libname ${PACKAGE_LIBPREFIX}Math)
set(ULIB_SHARED_LIBRARIES ${ULIB_SHARED_LIBRARIES} ${libname} PARENT_SCOPE)
set(ULIB_SELECTED_MODULES ${ULIB_SELECTED_MODULES} Math PARENT_SCOPE)
set(LIBRARIES
${Boost_SERIALIZATION_LIBRARY}
${Boost_SIGNALS_LIBRARY}
${Boost_PROGRAM_OPTIONS_LIBRARY}
${Eigen_LIBRARY}
${ROOT_LIBRARIES}
${PACKAGE_LIBPREFIX}Core
)
add_library(${libname} SHARED ${SOURCES})
set_target_properties(${libname} PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_SOVERSION})
target_link_libraries(${libname} ${LIBRARIES})
install(TARGETS ${libname}
EXPORT "${PROJECT_NAME}Targets"
RUNTIME DESTINATION ${PACKAGE_INSTALL_BIN_DIR} COMPONENT bin
LIBRARY DESTINATION ${PACKAGE_INSTALL_LIB_DIR} COMPONENT lib)
install(FILES ${HEADERS} DESTINATION ${PACKAGE_INSTALL_INC_DIR}/Math)
uLib_add_shared_library(${uLib-module})
add_subdirectory(testing)

View File

@@ -28,11 +28,12 @@
#ifndef VOXIMAGEFILTERCUSTOM_HPP
#define VOXIMAGEFILTERCUSTOM_HPP
#include "Core/Macros.h"
#include <Math/Dense.h>
#include "Math/VoxImage.h"
#include "VoxImageFilter.h"
#define likely(expr) __builtin_expect(!!(expr), 1)
////////////////////////////////////////////////////////////////////////////////
///// VOXIMAGE FILTER CUSTOM /////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////

View File

@@ -24,12 +24,12 @@
//////////////////////////////////////////////////////////////////////////////*/
#include <iostream>
#include "VoxRaytracer.h"
#include "Utils.h"
#include "Core/Macros.h"
#define unlikely(expr) __builtin_expect(!!(expr), 0)
inline float fast_sign(float f) { return 1 - 2 * (f < 0); }

View File

@@ -1,55 +1,64 @@
set(HEADERS
TestTObject.h
RootMathDense.h
RootMuonScatter.h
RootHitRaw.h
muBlastHit.h
muBlastMCTrack.h
muCastorMCTrack.h
muCastorHit.h
muCastorInfo.h
)
set(HEADERS TestTObject.h
RootMathDense.h
RootMuonScatter.h
RootHitRaw.h
muBlastHit.h
muBlastMCTrack.h
muCastorMCTrack.h
muCastorHit.h
muCastorInfo.h)
set(DICTIONARY_HEADERS
TestTObject.h
RootMathDense.h
RootMuonScatter.h
RootHitRaw.h
muBlastHit.h
muBlastMCTrack.h
muCastorMCTrack.h
muCastorHit.h
muCastorInfo.h
)
set(DICTIONARY_HEADERS TestTObject.h
RootMathDense.h
RootMuonScatter.h
RootHitRaw.h
muBlastHit.h
muBlastMCTrack.h
muCastorMCTrack.h
muCastorHit.h
muCastorInfo.h)
SET(SOURCES
TestTObject.cpp
RootMuonScatter.cpp
muBlastHit.cpp
muBlastMCTrack.cpp
muCastorMCTrack.cpp
muCastorHit.cpp
muCastorInfo.cpp
)
set(SOURCES TestTObject.cpp
RootMuonScatter.cpp
muBlastHit.cpp
muBlastMCTrack.cpp
muCastorMCTrack.cpp
muCastorHit.cpp
muCastorInfo.cpp)
set(LIBRARIES
# ${Boost_SERIALIZATION_LIBRARY}
# ${Boost_SIGNALS_LIBRARY}
# ${Boost_PROGRAM_OPTIONS_LIBRARY}
${ROOT_LIBRARIES}
${PACKAGE_LIBPREFIX}Core
${PACKAGE_LIBPREFIX}Math
)
set(LIBRARIES ${ROOT_LIBRARIES}
${PACKAGE_LIBPREFIX}Math)
include(FindROOTv6)
root_generate_dictionary(uLibRootDict ${DICTIONARY_HEADERS} LINKDEF Linkdef.h)
set_source_files_properties(uLibRootDict.cxx PROPERTIES GENERATED TRUE)
set_source_files_properties(uLibRootDict.h PROPERTIES GENERATED TRUE)
list(APPEND SOURCES uLibRootDict.cxx)
set(rDictName ${PACKAGE_LIBPREFIX}RootDict)
root_generate_dictionary(${rDictName} ${DICTIONARY_HEADERS}
LINKDEF Linkdef.h)
set_source_files_properties(${rDictName}.cxx
PROPERTIES GENERATED TRUE)
set_source_files_properties(${rDictName}.h
PROPERTIES GENERATED TRUE)
list(APPEND SOURCES ${rDictName}.cxx)
# TODO use a custom target linked to root_generate_dictionary
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/uLibRootDict_rdict.pcm
set(R_ARTIFACTS ${CMAKE_CURRENT_BINARY_DIR}/lib${rDictName}_rdict.pcm
${CMAKE_CURRENT_BINARY_DIR}/lib${rDictName}.rootmap)
install(FILES ${R_ARTIFACTS}
DESTINATION ${PACKAGE_INSTALL_LIB_DIR})
uLib_add_shared_library(${uLib-module})
add_subdirectory(testing)
set(libname ${PACKAGE_LIBPREFIX}Root)
set(ULIB_SHARED_LIBRARIES ${ULIB_SHARED_LIBRARIES} ${libname} PARENT_SCOPE)
set(ULIB_SELECTED_MODULES ${ULIB_SELECTED_MODULES} Root PARENT_SCOPE)
add_library(${libname} SHARED ${SOURCES})
set_target_properties(${libname} PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_SOVERSION})
target_link_libraries(${libname} ${LIBRARIES})
install(TARGETS ${libname}
EXPORT "${PROJECT_NAME}Targets"
RUNTIME DESTINATION ${PACKAGE_INSTALL_BIN_DIR} COMPONENT bin
LIBRARY DESTINATION ${PACKAGE_INSTALL_LIB_DIR} COMPONENT lib)
install(FILES ${HEADERS} DESTINATION ${PACKAGE_INSTALL_INC_DIR}/Root)

View File

@@ -9,6 +9,7 @@
// Martin Subieta martin.subieta@ing.unibs.it
//########################################
#include <iostream>
#include <vector>
#include "TObject.h"
#include "TParticle.h"

View File

@@ -9,6 +9,7 @@
// Martin Subieta martin.subieta@ing.unibs.it
//########################################
#include <iostream>
#include "vector"
#include "TObject.h"
#include "TParticle.h"

View File

@@ -1,37 +1,38 @@
set(HEADERS
uLibVtkInterface.h
uLibVtkViewer.h
vtkContainerBox.h
vtkMuonScatter.h
vtkStructuredGrid.h
vtkVoxRaytracerRepresentation.h
vtkVoxImage.h
# vtkHLineRepresentation.h
# vtkTriangleMesh.h
)
set(HEADERS uLibVtkInterface.h
uLibVtkViewer.h
vtkContainerBox.h
vtkMuonScatter.h
vtkStructuredGrid.h
vtkVoxRaytracerRepresentation.h
vtkVoxImage.h)
SET(SOURCES
uLibVtkInterface.cxx
uLibVtkViewer.cpp
vtkContainerBox.cpp
vtkMuonScatter.cxx
vtkStructuredGrid.cpp
vtkVoxRaytracerRepresentation.cpp
vtkVoxImage.cpp
)
set(SOURCES uLibVtkInterface.cxx
uLibVtkViewer.cpp
vtkContainerBox.cpp
vtkMuonScatter.cxx
vtkStructuredGrid.cpp
vtkVoxRaytracerRepresentation.cpp
vtkVoxImage.cpp)
set(LIBRARIES
${Boost_SERIALIZATION_LIBRARY}
${Boost_SIGNALS_LIBRARY}
${Boost_PROGRAM_OPTIONS_LIBRARY}
${Eigen_LIBRARY}
${ROOT_LIBRARIES}
${Geant4_LIBRARIES}
${VTK_LIBRARIES}
${PACKAGE_LIBPREFIX}Core
${PACKAGE_LIBPREFIX}Math
)
set(LIBRARIES ${Eigen_LIBRARY}
${ROOT_LIBRARIES}
${VTK_LIBRARIES}
${PACKAGE_LIBPREFIX}Math)
uLib_add_shared_library(${uLib-module})
set(libname ${PACKAGE_LIBPREFIX}Vtk)
set(ULIB_SHARED_LIBRARIES ${ULIB_SHARED_LIBRARIES} ${libname} PARENT_SCOPE)
set(ULIB_SELECTED_MODULES ${ULIB_SELECTED_MODULES} Vtk PARENT_SCOPE)
add_library(${libname} SHARED ${SOURCES})
set_target_properties(${libname} PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_SOVERSION})
target_link_libraries(${libname} ${LIBRARIES})
install(TARGETS ${libname}
EXPORT "${PROJECT_NAME}Targets"
RUNTIME DESTINATION ${PACKAGE_INSTALL_BIN_DIR} COMPONENT bin
LIBRARY DESTINATION ${PACKAGE_INSTALL_LIB_DIR} COMPONENT lib)
install(FILES ${HEADERS} DESTINATION ${PACKAGE_INSTALL_INC_DIR}/Vtk)
add_subdirectory(testing)