IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 6d05464f authored by ralfulrich's avatar ralfulrich
Browse files

added compilation of example

parent 159ca575
No related branches found
No related tags found
No related merge requests found
......@@ -7,10 +7,5 @@ project (CORSIKA VERSION 8.0.0.0 DESCRIPTION "CORSIKA C++ project")
find_package (Boost 1.40 COMPONENTS program_options REQUIRED)
find_package (Eigen3 3.3 REQUIRED)
# include_directories (${Boost_INCLUDE_DIR})
# include_directories(${CMAKE_CURRENT_SOURCE_DIR})
# ADD_EXECUTABLE( anyExecutable myMain.cpp )
# TARGET_LINK_LIBRARIES( anyExecutable LINK_PUBLIC ${Boost_LIBRARIES} )
add_subdirectory (Framework)
add_subdirectory (Main)
set (GEOMETRY_SOURCES CoordinateSystem.cc)
set (GEOMETRY_HEADERS Vector.h Point.h CoordinateSystem.h)
set (GEOMETRY_HEADERS Vector.h Point.h Sphere.h CoordinateSystem.h)
add_library (CORSIKAgeometry STATIC ${GEOMETRY_SOURCES})
......@@ -9,8 +9,13 @@ set_target_properties (CORSIKAgeometry PROPERTIES SOVERSION 1)
set_target_properties (CORSIKAgeometry PROPERTIES PUBLIC_HEADER "${GEOMETRY_HEADERS}")
target_include_directories (CORSIKAgeometry PRIVATE ${EIGEN3_INCLUDE_DIR})
target_include_directories (CORSIKAgeometry PRIVATE ${PROJECT_SOURCE_DIR}/Framework)
target_link_libraries (CORSIKAgeometry CORSIKAunits)
target_include_directories (CORSIKAgeometry PRIVATE ${EIGEN3_INCLUDE_DIR})
target_include_directories (CORSIKAgeometry INTERFACE ${EIGEN3_INCLUDE_DIR})
target_include_directories (CORSIKAgeometry INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/Framework>
$<INSTALL_INTERFACE:include/Framework>
)
install (TARGETS CORSIKAgeometry
LIBRARY DESTINATION lib
......
#ifndef SPHERE_H_
#define SPHERE_H_
#ifndef _include_SPHERE_H_
#define _include_SPHERE_H_
#include "Point.h"
#include <phys/units/quantity.hpp>
#include <Geometry/Point.h>
#include <Units/units/quantity.hpp>
class Sphere
{
......
add_library (CORSIKAunits INTERFACE)
target_include_directories (CORSIKAunits INTERFACE ${PROJECT_SOURCE_DIR}/Framework)
target_include_directories (CORSIKAunits INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/Framework>
$<INSTALL_INTERFACE:include/Framework>
)
install (FILES PhysicalUnits.h PhysicalConstants.h
DESTINATION include/Units)
......
add_executable (geometry_example geometry_example.cc)
target_link_libraries (geometry_example CORSIKAgeometry CORSIKAunits)
install (TARGETS geometry_example DESTINATION bin)
......@@ -4,12 +4,13 @@
-std=c++14 ../Main/geometry_example.cc \
../Framework/Geometry/CoordinateSystem.cc -o geometry_example
*/
#include <Framework/Geometry/Vector.h>
#include <Framework/Geometry/Sphere.h>
#include <Framework/Geometry/Point.h>
#include <Framework/Geometry/CoordinateSystem.h>
#include <phys/units/quantity.hpp>
#include <phys/units/io.hpp>
#include <Geometry/Vector.h>
#include <Geometry/Sphere.h>
#include <Geometry/Point.h>
#include <Geometry/CoordinateSystem.h>
#include <Units/PhysicalUnits.h>
#include <iostream>
#include <cstdlib>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment