IAP GITLAB

Skip to content
Snippets Groups Projects
Commit c77a0fdb authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

Merge gitlab.ikp.kit.edu:AirShowerPhysics/corsika

parents a77d5fce 0d0ad008
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ set (CMAKE_INSTALL_MESSAGE LAZY)
# --std=c++14
set (CMAKE_CXX_STANDARD 14)
enable_testing ()
#add_custom_target (corsika_pre_build)
#add_custom_command (TARGET corsika_pre_build PRE_BUILD COMMAND "${PROJECT_SOURCE_DIR}/pre_compile.py")
......
......@@ -17,8 +17,15 @@ 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
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include/Geometry)
# code testing
add_executable (testGeometry testGeometry.cc)
target_link_libraries (testGeometry CORSIKAgeometry CORSIKAunits CORSIKAthirdparty) # for catch2
add_test (NAME testGeometry COMMAND testGeometry -o report.xml -r junit)
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include <ThirdParty/catch2/catch.hpp>
#include <Units/PhysicalUnits.h>
using namespace phys::units;
using namespace phys::units::io;
using namespace phys::units::literals;
TEST_CASE( "PhysicalUnits", "[Units]" )
{
SECTION( "sectionOne" )
{
REQUIRE( 1_m/1_m == 1 );
}
SECTION( "sectionTwo" )
{
REQUIRE_FALSE( 1_m/1_m == 2 );
}
SECTION( "sectionThree" )
{
REQUIRE( 1_s/1_s == 2 );
}
}
......@@ -11,3 +11,8 @@ target_include_directories (CORSIKAunits
install (FILES PhysicalUnits.h DESTINATION include/Units)
# code testing
add_executable (testUnits testUnits.cc)
target_link_libraries (testUnits CORSIKAunits CORSIKAthirdparty) # for catch2
add_test(NAME testUnits COMMAND testUnits)
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include <ThirdParty/catch2/catch.hpp>
#include <Units/PhysicalUnits.h>
using namespace phys::units;
using namespace phys::units::io;
using namespace phys::units::literals;
TEST_CASE( "PhysicalUnits", "[Units]" ) {
REQUIRE( 1_m/1_m == 1 );
}
......@@ -8,3 +8,4 @@ target_include_directories (CORSIKAthirdparty
)
install (DIRECTORY phys DESTINATION include/ThirdParty/)
install (DIRECTORY catch2 DESTINATION include/ThirdParty/)
This diff is collapsed.
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