Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
add_library (singularity-opac::flags INTERFACE IMPORTED GLOBAL)
target_include_directories(singularity-opac::flags
INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>)
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
${CMAKE_CURRENT_LIST_DIR}/utils)

include (SetupOptions)
include (SetupDeps)
Expand All @@ -65,7 +66,9 @@ else()
message(STATUS "HDF5 not enabled. Turning it off in spiner")
set(SPINER_USE_HDF OFF CACHE BOOL "")
endif()
add_subdirectory(utils/spiner)
if (NOT TARGET spiner::spiner)
add_subdirectory(utils/spiner)
endif()
target_link_libraries(singularity-opac::flags INTERFACE spiner)

include(GNUInstallDirs)
Expand Down
4 changes: 3 additions & 1 deletion cmake/SetupDeps.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file was generated in part with the assistance of generative AI.

include(FeatureSummary)
include(CMakeDependentOption)
#=======================================
Expand Down Expand Up @@ -97,5 +99,5 @@ cmake_dependent_option(SINGULARITY_USE_MPI
# - provides Catch2::Catch2
#=======================================
if (NOT TARGET Catch2::Catch2)
find_package(Catch2 QUIET)
find_package(Catch2 3 CONFIG QUIET)
endif()
5 changes: 2 additions & 3 deletions spack-repo/packages/singularity-opac_deps/package.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# dependency package for singulary-opac
# This file was generated in part with the assistance of generative AI.

import os
from spack import *
Expand All @@ -14,7 +15,7 @@ class SingularityOpacDeps(BundlePackage):
depends_on("cmake", type="build")
depends_on("hdf5~mpi+cxx+hl", type=("build", "run"))
depends_on("kokkos@3:~shared+cuda+wrapper+serial+cuda_lambda+cuda_relocatable_device_code cuda_arch=70", when="+cuda", type=("build", "run"))
depends_on("catch2", type=("build", "run"))
depends_on("catch2@3:", type="build")

phases=["install"]

Expand All @@ -31,5 +32,3 @@ def install(self, spec, prefix):
f.write("")
for dep in spec.dependencies(deptype="build"):
f.write(dep.format())


18 changes: 13 additions & 5 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,34 @@
# prepare derivative works, distribute copies to the public, perform
# publicly and display publicly, and to permit others to do so.

# This file was made in part with generative AI.
# This file was generated in part with the assistance of generative AI.

if(NOT Catch2_FOUND)
if(NOT TARGET Catch2::Catch2)
find_package(Catch2 3 CONFIG QUIET)
endif()

if(NOT TARGET Catch2::Catch2)
# Get catch2
message(STATUS "Fetching Catch2 as needed")
Include(FetchContent)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v2.13.10)
GIT_TAG v3.7.1)
FetchContent_MakeAvailable(Catch2)
list(APPEND CMAKE_MODULE_PATH ${Catch2_SOURCE_DIR}/contrib)
endif()
if(DEFINED catch2_SOURCE_DIR)
list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras)
elseif(DEFINED Catch2_SOURCE_DIR)
list(APPEND CMAKE_MODULE_PATH ${Catch2_SOURCE_DIR}/extras)
endif()

# Build tests
message(STATUS "Configuring unit tests")
#find_package(${PROJECT_NAME} CONFIG REQUIRED)

add_library(catch2_define)
target_sources(catch2_define PUBLIC catch2_define.cpp)
target_sources(catch2_define PRIVATE catch2_define.cpp)
target_link_libraries(catch2_define PUBLIC
${PROJECT_NAME}
singularity-opac::flags
Expand Down
5 changes: 3 additions & 2 deletions test/catch2_define.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
// publicly, and to permit others to do so.
// ======================================================================

// This file was generated in part with the assistance of generative AI.

#include <ports-of-call/portability.hpp>

#define CATCH_CONFIG_RUNNER
#include <catch2/catch.hpp>
#include <catch2/catch_session.hpp>

int main(int argc, char *argv[]) {

Expand Down
4 changes: 3 additions & 1 deletion test/test_brt_opacities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
// publicly, and to permit others to do so.
// ======================================================================

// This file was generated in part with the assistance of generative AI.

#include <cmath>
#include <iostream>

#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

#include <ports-of-call/portability.hpp>
#include <ports-of-call/portable_arrays.hpp>
Expand Down
4 changes: 3 additions & 1 deletion test/test_chebyshev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
// publicly, and to permit others to do so.
// ======================================================================

// This file was generated in part with the assistance of generative AI.

#include <iostream>

#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

#include <spiner/databox.hpp>
#include <ports-of-call/portability.hpp>
Expand Down
4 changes: 3 additions & 1 deletion test/test_epbremsstrahlung_opacities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
// publicly, and to permit others to do so.
// ======================================================================

// This file was generated in part with the assistance of generative AI.

#include <cmath>
#include <iostream>

#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

#include <ports-of-call/portability.hpp>
#include <ports-of-call/portable_arrays.hpp>
Expand Down
4 changes: 3 additions & 1 deletion test/test_gray_opacities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
// publicly, and to permit others to do so.
// ======================================================================

// This file was generated in part with the assistance of generative AI.

#include <cmath>
#include <iostream>

#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

#include <ports-of-call/portability.hpp>
#include <ports-of-call/portable_arrays.hpp>
Expand Down
4 changes: 3 additions & 1 deletion test/test_gray_s_opacities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
// publicly, and to permit others to do so.
// ======================================================================

// This file was generated in part with the assistance of generative AI.

#include <cmath>
#include <iostream>

#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

#include <ports-of-call/portability.hpp>
#include <ports-of-call/portable_arrays.hpp>
Expand Down
4 changes: 2 additions & 2 deletions test/test_mean_opacities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
// publicly, and to permit others to do so.
// ======================================================================

// This file was made in part with generative AI.
// This file was generated in part with the assistance of generative AI.

#include <cmath>
#include <iostream>

#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

#include <ports-of-call/portability.hpp>
#include <ports-of-call/portable_arrays.hpp>
Expand Down
4 changes: 2 additions & 2 deletions test/test_powerlaw_opacities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
// publicly, and to permit others to do so.
// ======================================================================

// This file was made in part with generative AI.
// This file was generated in part with the assistance of generative AI.

#include <cmath>
#include <iostream>

#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

#include <ports-of-call/portability.hpp>
#include <ports-of-call/portable_arrays.hpp>
Expand Down
4 changes: 3 additions & 1 deletion test/test_scalefree_opacities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
// publicly, and to permit others to do so.
// ======================================================================

// This file was generated in part with the assistance of generative AI.

#include <cmath>
#include <iostream>

#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

#include <ports-of-call/portability.hpp>
#include <ports-of-call/portable_arrays.hpp>
Expand Down
4 changes: 3 additions & 1 deletion test/test_spiner_opac_neutrinos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
// publicly, and to permit others to do so.
// ======================================================================

// This file was generated in part with the assistance of generative AI.

#include <cmath>
#include <iostream>

#include <string>

#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

#include <ports-of-call/portability.hpp>
#include <ports-of-call/portable_arrays.hpp>
Expand Down
4 changes: 2 additions & 2 deletions test/test_thermal_dist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
// publicly, and to permit others to do so.
// ======================================================================

// This file was made in part with generative AI.
// This file was generated in part with the assistance of generative AI.

#include <array>
#include <cmath>
#include <iostream>

#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

#include <ports-of-call/portability.hpp>
#include <ports-of-call/portable_arrays.hpp>
Expand Down
4 changes: 3 additions & 1 deletion test/test_thomson_s_opacities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
// publicly, and to permit others to do so.
// ======================================================================

// This file was generated in part with the assistance of generative AI.

#include <cmath>
#include <iostream>

#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

#include <ports-of-call/portability.hpp>
#include <ports-of-call/portable_arrays.hpp>
Expand Down
4 changes: 3 additions & 1 deletion test/test_variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@
// publicly, and to permit others to do so.
// ======================================================================

// This file was generated in part with the assistance of generative AI.

/*
* Variants are finicky things. If a method is missing in any class
* the variant contains, that method will be deleted from the entire
* variant. This test checks that default constructors and assignment
* operators are available for the photon and neutrino variants.
*/

#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

#include <ports-of-call/portability.hpp>

Expand Down
Loading