-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
major refurbishment of podio; new interfaces in doc/doc.md
- Loading branch information
Showing
85 changed files
with
1,337 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,50 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
|
||
project(podio) | ||
set( podio_VERSION_MAJOR 0 ) | ||
set( podio_VERSION_MINOR 1 ) | ||
set( podio_VERSION_PATCH 0 ) | ||
set( podio_VERSION "${podio_VERSION_MAJOR}.${podio_VERSION_MINOR}" ) | ||
|
||
set(CMAKE_BUILD_TYPE Release) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | ||
|
||
# Declare ROOT dependency | ||
|
||
#--- Declare ROOT dependency --------------------------------------------------- | ||
list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS}) | ||
find_package(ROOT REQUIRED COMPONENTS RIO Tree) | ||
include(${ROOT_USE_FILE}) | ||
|
||
add_definitions(-Wno-unused-variable -Wno-unused-parameter) | ||
add_definitions(-Wno-unused-variable -Wno-unused-parameter -pthread) | ||
#add_definitions(-Wpadded) | ||
|
||
#--temporary fix of inconsistency in ROOT CMake macros | ||
set(ROOT_genreflex_cmd ${ROOT_genreflex_CMD}) | ||
|
||
add_definitions(-Wno-unused-variable -Wno-unused-parameter) | ||
|
||
#--- enable unit testing capabilities ------------------------------------------ | ||
include(CTest) | ||
|
||
#--- enable CPack -------------------------------------------------------------- | ||
include(cmake/podioCPack.cmake) | ||
|
||
#--- target for Doxygen documentation ------------------------------------------ | ||
include(cmake/podioDoxygen.cmake) | ||
|
||
#--- add version files --------------------------------------------------------- | ||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/podioVersion.h | ||
${CMAKE_CURRENT_BINARY_DIR}/podioVersion.h ) | ||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/podioVersion.h | ||
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/podio ) | ||
|
||
#--- add CMake infrastructure -------------------------------------------------- | ||
include(cmake/podioCreateConfig.cmake) | ||
|
||
#--- add license files --------------------------------------------------------- | ||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE | ||
${CMAKE_CURRENT_SOURCE_DIR}/NOTICE | ||
DESTINATION ${CMAKE_INSTALL_PREFIX}) | ||
|
||
#--- project specific subdirectories ------------------------------------------- | ||
add_subdirectory(src) | ||
add_subdirectory(examples) | ||
|
||
#--- target for Doxygen documentation------------------- | ||
|
||
find_package(Doxygen) | ||
if(DOXYGEN_FOUND) | ||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/documentation/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) | ||
add_custom_target(doc | ||
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | ||
COMMENT "Generating API documentation with Doxygen" VERBATIM | ||
) | ||
endif(DOXYGEN_FOUND) | ||
add_subdirectory(tests) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(c) Copyright 2015 Benedikt Hegner | ||
|
||
This software is distributed under the terms of the GNU General Public | ||
Licence version 3 (GPL Version 3), copied verbatim in the file "LICENCE". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# - Config file for the FooBar package | ||
# It defines the following variables | ||
# FOOBAR_INCLUDE_DIRS - include directories for FooBar | ||
# FOOBAR_LIBRARIES - libraries to link against | ||
# FOOBAR_EXECUTABLE - the bar executable | ||
|
||
# Compute paths | ||
get_filename_component(FOOBAR_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) | ||
set(FOOBAR_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@") | ||
|
||
# Our library dependencies (contains definitions for IMPORTED targets) | ||
if(NOT TARGET foo AND NOT FooBar_BINARY_DIR) | ||
include("${FOOBAR_CMAKE_DIR}/FooBarTargets.cmake") | ||
endif() | ||
|
||
# These are IMPORTED targets created by FooBarTargets.cmake | ||
set(FOOBAR_LIBRARIES foo) | ||
set(FOOBAR_EXECUTABLE bar) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
set(PACKAGE_VERSION "@FOOBAR_VERSION@") | ||
|
||
# Check whether the requested PACKAGE_FIND_VERSION is compatible | ||
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") | ||
set(PACKAGE_VERSION_COMPATIBLE FALSE) | ||
else() | ||
set(PACKAGE_VERSION_COMPATIBLE TRUE) | ||
if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") | ||
set(PACKAGE_VERSION_EXACT TRUE) | ||
endif() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
set(CPACK_PACKAGE_DESCRIPTION "podio Project") | ||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "podio Project") | ||
set(CPACK_PACKAGE_VENDOR "HEP Software Foundation") | ||
set(CPACK_PACKAGE_VERSION ${podio_VERSION}) | ||
set(CPACK_PACKAGE_VERSION_MAJOR ${podio_MAJOR_VERSION}) | ||
set(CPACK_PACKAGE_VERSION_MINOR ${podio_MINOR_VERSION}) | ||
set(CPACK_PACKAGE_VERSION_PATCH ${podio_PATCH_VERSION}) | ||
|
||
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md") | ||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE") | ||
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md") | ||
|
||
#--- source package settings --------------------------------------------------- | ||
set(CPACK_SOURCE_IGNORE_FILES | ||
${PROJECT_BINARY_DIR} | ||
"~$" | ||
"/.git/" | ||
"/\\\\\\\\.git/" | ||
"/#" | ||
) | ||
set(CPACK_SOURCE_STRIP_FILES "") | ||
|
||
#--- translate buildtype ------------------------------------------------------- | ||
string( TOLOWER "${CMAKE_BUILD_TYPE}" buildtype_lower ) | ||
if(buildtype_lower STREQUAL "release") | ||
set(HSF_BUILDTYPE "opt") | ||
elseif(buildtype_lower STREQUAL "debug") | ||
set(HSF_BUILDTYPE "dbg") | ||
elseif(buildtype_lower STREQUAL "relwithbebinfo") | ||
set(HSF_BUILDTYPE "owd") | ||
endif() | ||
|
||
|
||
#--- use HSF platform name ----------------------------------------------------- | ||
execute_process( | ||
COMMAND hsf_get_platform.py --buildtype ${HSF_BUILDTYPE} | ||
OUTPUT_VARIABLE HSF_PLATFORM OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
|
||
|
||
set(CPACK_PACKAGE_RELOCATABLE True) | ||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "podio_${podio_VERSION}") | ||
set(CPACK_PACKAGE_FILE_NAME "podio_${podio_VERSION}_${HSF_PLATFORM}") | ||
|
||
include(CPack) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# - Config file for the podio package | ||
# It defines the following variables | ||
# podio_INCLUDE_DIRS - include directories | ||
# podio_LIBRARIES - libraries to link against | ||
# podio_LIBRARY_DIR - podio library dir | ||
# podio_BINARY_DIR - binary directory | ||
|
||
# Compute paths | ||
get_filename_component(podio_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) | ||
|
||
get_filename_component(podio_INCLUDE_DIRS "${podio_CMAKE_DIR}/../include" ABSOLUTE) | ||
get_filename_component(podio_BINARY_DIR "${podio_CMAKE_DIR}/../bin" ABSOLUTE) | ||
get_filename_component(podio_LIBRARY_DIR "${podio_CMAKE_DIR}/../lib" ABSOLUTE) | ||
|
||
ADD_LIBRARY(examplelibrary SHARED IMPORTED) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
include(CMakePackageConfigHelpers) | ||
configure_file(cmake/podioConfig.cmake.in "${PROJECT_BINARY_DIR}/podioConfig.cmake" @ONLY) | ||
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/podioConfigVersion.cmake | ||
VERSION ${podio_VERSION} | ||
COMPATIBILITY SameMajorVersion ) | ||
|
||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/podioConfig.cmake | ||
${CMAKE_CURRENT_BINARY_DIR}/podioConfigVersion.cmake | ||
DESTINATION ${CMAKE_INSTALL_PREFIX}/cmake ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
find_package(Doxygen) | ||
if(DOXYGEN_FOUND) | ||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in | ||
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) | ||
add_custom_target(doc | ||
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | ||
COMMENT "Generating API documentation with Doxygen" VERBATIM) | ||
|
||
install( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen DESTINATION doxygen OPTIONAL) | ||
endif(DOXYGEN_FOUND) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export ALBERS=$PWD/install | ||
export DYLD_LIBRARY_PATH=$ALBERS/examples:$ALBERS/lib:$DYLD_LIBRARY_PATH | ||
export PYTHONPATH=$ALBERS/examples:$PYTHONPATH | ||
export PODIO=$PWD/install | ||
export DYLD_LIBRARY_PATH=$PODIO/examples:$PODIO/lib:$DYLD_LIBRARY_PATH | ||
export PYTHONPATH=$PODIO/examples:$PYTHONPATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#ifndef podioVersion_h | ||
#define podioVersion_h | ||
#define podio_VERSION @podio_VERSION@ | ||
#endif |
Oops, something went wrong.