File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030* .exe
3131* .out
3232* .app
33+
34+ # Build path
35+ build
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.3 FATAL_ERROR )
2+ project (parametric_plasma_source)
3+
4+ set (CMAKE_VERBOSE_MAKEFILE OFF )
5+
6+ set (SRC_DIR parametric_plasma_source)
7+
8+ set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR } /${SRC_DIR} )
9+
10+ if (NOT CMAKE_BUILD_TYPE )
11+ set (CMAKE_BUILD_TYPE Release)
12+ endif ()
13+
14+ set (CMAKE_CXX_FLAGS "-Wall" )
15+ set (CMAKE_CXX_FLAGS_DEBUG "-g" )
16+ set (CMAKE_CXX_FLAGS_RELEASE "-O3" )
17+
18+ # Use output paths from OpenMC install - change if needed
19+ set (OPENMC_DIR /opt/openmc)
20+ set (OPENMC_INC_DIR ${OPENMC_DIR} /include)
21+ set (OPENMC_LIB_DIR ${OPENMC_DIR} /lib)
22+
23+ # Build source_sampling
24+ list (APPEND source_sampling_SOURCES
25+ ${SRC_DIR} /source_sampling.cpp
26+ ${SRC_DIR} /plasma_source.cpp
27+ )
28+
29+ add_library (source_sampling SHARED ${source_sampling_SOURCES} )
30+
31+ find_library (OPENMC_LIB openmc HINTS ${OPENMC_LIB_DIR} )
32+
33+ set_target_properties (source_sampling PROPERTIES PREFIX "" )
34+ set_target_properties (source_sampling PROPERTIES POSITION_INDEPENDENT_CODE ON )
35+ target_include_directories (source_sampling PUBLIC ${OPENMC_INC_DIR} )
36+ target_include_directories (source_sampling PUBLIC ${OPENMC_DIR} /vendor/pugixml )
37+ target_link_libraries (source_sampling ${OPENMC_LIB} gfortran )
You can’t perform that action at this time.
0 commit comments