Skip to content

Commit fb7b449

Browse files
committed
chore(examples): add simple example demonstrating how to build against eic-opticks
1 parent ea4e96b commit fb7b449

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

examples/CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
cmake_minimum_required(VERSION 3.20)
2+
3+
project(simphox LANGUAGES CXX)
4+
5+
set(CMAKE_CXX_STANDARD 17)
6+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
7+
set(CMAKE_CXX_EXTENSIONS OFF)
8+
9+
find_package(eic-opticks REQUIRED)
10+
11+
add_executable(simphox simphox.cpp)
12+
target_link_libraries(simphox eic-opticks::G4CX eic-opticks::SysRap)
13+
14+
install(TARGETS simphox)

examples/simphox.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#include <iostream>
2+
#include <string>
3+
#include <vector>
4+
5+
#include "G4CX/G4CXOpticks.hh"
6+
#include "SysRap/NP.h"
7+
#include "SysRap/sphoton.h"
8+
9+
using namespace std;
10+
11+
int main(int argc, char **argv)
12+
{
13+
return EXIT_SUCCESS;
14+
}

0 commit comments

Comments
 (0)