Skip to content
Snippets Groups Projects
Commit 45d9ab52 authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

added program stub to cmake build

parent c7accf2a
Branches
No related tags found
No related merge requests found
################################################################################
## CMAKE Settings
################################################################################
set (EXE "pythia6m")
set (TARGETS ${TARGETS} ${EXE} PARENT_SCOPE)
################################################################################
## Sources and install headers
################################################################################
set (SOURCES "pythia6m.cc")
################################################################################
## Include directories
################################################################################
include_directories("${PROJECT_SOURCE_DIR}")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
################################################################################
## External Libraries
################################################################################
## ROOT
find_package(ROOT REQUIRED)
include_directories(${ROOT_INCLUDE_DIR})
## boost
find_package(Boost COMPONENTS program_options filesystem system REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
## nanocernlib
find_package(nanocernlib REQUIRED)
################################################################################
## Compile and Link
################################################################################
add_executable(${EXE} ${SOURCES})
target_link_libraries(${EXE}
pythia6m_fmotion
pythia6m_gmc
pythia6m_pythia
pythia6m_radgen
pythia6m_util
pythia6m_fmotion
pythia6m_gmc
pythia6m_pythia
pythia6m_radgen
pythia6m_util
${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${NANOCERNLIB_LIBRARIES})
set_target_properties(${EXE} PROPERTIES VERSION ${PYTHIA6M_VERSION})
################################################################################
## Export and Install
################################################################################
install(TARGETS ${EXE}
EXPORT ${PROJECT_NAME}-targets
RUNTIME DESTINATION "${INSTALL_BIN_DIR}" COMPONENT bin)
"target": {
"nucleon": "p",
"polarization": {
"value": 0,
"direction"k
#include <pythia6m/util/configuration.hh>
#include <pythia6m/util/framework.hh>
using namespace pythia6m;
int run_pythia(const ptree& settings, const std::string& output) {}
int main(int argc, char* argv[]) {
try {
framework pythia6m{argc, argv, run_pythia};
pythia6m.run();
return 0;
} catch (...) {
return 1;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment