mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Merge pull request #2011 from kkiesling/faddeeva
build Faddeeva as a part of libopenmc
This commit is contained in:
commit
8432e37c24
6 changed files with 10 additions and 23 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -127,7 +127,7 @@ jobs:
|
|||
- name: after_success
|
||||
shell: bash
|
||||
run: |
|
||||
cpp-coveralls -i src -i include --exclude-pattern "/usr/*" --dump cpp_cov.json
|
||||
cpp-coveralls -i src -i include -e src/external --exclude-pattern "/usr/*" --dump cpp_cov.json
|
||||
coveralls --merge=cpp_cov.json --service=github
|
||||
|
||||
finish:
|
||||
|
|
|
|||
|
|
@ -258,18 +258,6 @@ if("${isSystemDir}" STREQUAL "-1")
|
|||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}")
|
||||
endif()
|
||||
|
||||
#===============================================================================
|
||||
# faddeeva library
|
||||
#===============================================================================
|
||||
|
||||
add_library(faddeeva STATIC vendor/faddeeva/Faddeeva.cc)
|
||||
target_include_directories(faddeeva
|
||||
PUBLIC
|
||||
$<INSTALL_INTERFACE:include/faddeeva>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/vendor/faddeeva>
|
||||
)
|
||||
target_compile_options(faddeeva PRIVATE ${cxxflags})
|
||||
|
||||
#===============================================================================
|
||||
# libopenmc
|
||||
#===============================================================================
|
||||
|
|
@ -372,7 +360,8 @@ list(APPEND libopenmc_SOURCES
|
|||
|
||||
# Add bundled external dependencies
|
||||
list(APPEND libopenmc_SOURCES
|
||||
src/external/quartic_solver.cpp)
|
||||
src/external/quartic_solver.cpp
|
||||
src/external/Faddeeva.cc)
|
||||
|
||||
# For Visual Studio compilers
|
||||
if(MSVC)
|
||||
|
|
@ -426,7 +415,7 @@ endif()
|
|||
# target_link_libraries treats any arguments starting with - but not -l as
|
||||
# linker flags. Thus, we can pass both linker flags and libraries together.
|
||||
target_link_libraries(libopenmc ${ldflags} ${HDF5_LIBRARIES} ${HDF5_HL_LIBRARIES}
|
||||
faddeeva xtensor gsl::gsl-lite-v1 fmt::fmt)
|
||||
xtensor gsl::gsl-lite-v1 fmt::fmt)
|
||||
|
||||
if(TARGET pugixml::pugixml)
|
||||
target_link_libraries(libopenmc pugixml::pugixml)
|
||||
|
|
@ -460,7 +449,7 @@ target_link_libraries(openmc libopenmc)
|
|||
# Ensure C++14 standard is used. Starting with CMake 3.8, another way this could
|
||||
# be done is using the cxx_std_14 compiler feature.
|
||||
set_target_properties(
|
||||
openmc libopenmc faddeeva
|
||||
openmc libopenmc
|
||||
PROPERTIES CXX_STANDARD 14 CXX_EXTENSIONS OFF)
|
||||
|
||||
#===============================================================================
|
||||
|
|
@ -481,7 +470,7 @@ configure_file(cmake/OpenMCConfig.cmake.in "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIR
|
|||
configure_file(cmake/OpenMCConfigVersion.cmake.in "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/OpenMCConfigVersion.cmake" @ONLY)
|
||||
|
||||
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/OpenMC)
|
||||
install(TARGETS openmc libopenmc faddeeva
|
||||
install(TARGETS openmc libopenmc
|
||||
EXPORT openmc-targets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
|
|
@ -501,7 +490,3 @@ install(FILES man/man1/openmc.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
|||
install(FILES LICENSE DESTINATION "${CMAKE_INSTALL_DOCDIR}" RENAME copyright)
|
||||
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
install(FILES "${CMAKE_BINARY_DIR}/include/openmc/version.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openmc)
|
||||
|
||||
# Copy headers for vendored dependencies (note that all except faddeeva are handled
|
||||
# separately since they are managed by CMake)
|
||||
install(DIRECTORY vendor/faddeeva DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
|
|
|
|||
|
|
@ -23,9 +23,11 @@ recursive-include examples *.cpp
|
|||
recursive-include examples *.py
|
||||
recursive-include examples *.xml
|
||||
recursive-include include *.h
|
||||
recursive-include include *.hh
|
||||
recursive-include man *.1
|
||||
recursive-include openmc *.pyx
|
||||
recursive-include openmc *.c
|
||||
recursive-include src *.cc
|
||||
recursive-include src *.cpp
|
||||
recursive-include src *.rnc
|
||||
recursive-include src *.rng
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
|
||||
# include "Faddeeva.hh"
|
||||
# include "openmc/external/Faddeeva.hh"
|
||||
|
||||
# include <cfloat>
|
||||
# include <cmath>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#include "openmc/math_functions.h"
|
||||
|
||||
#include "Faddeeva.hh"
|
||||
#include "openmc/external/Faddeeva.hh"
|
||||
|
||||
#include "openmc/constants.h"
|
||||
#include "openmc/random_lcg.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue