Skip to content

Commit

Permalink
Hide/deactivate/warn Toml backend on nvcc compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Aug 4, 2023
1 parent bfac95c commit fe4e835
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,28 @@
// @todo add TOML here
std::map<std::string, bool> openPMD::getVariants()
{
// clang-format off
return std::map<std::string, bool>{
{"mpi", bool(openPMD_HAVE_MPI)},
{"json", true},
// https://github.com/ToruNiina/toml11/issues/205
#if !defined(__NVCOMPILER_MAJOR__) || __NVCOMPILER_MAJOR__ >= 23
{"toml", true},
#endif
{"hdf5", bool(openPMD_HAVE_HDF5)},
{"adios1", false},
{"adios2", bool(openPMD_HAVE_ADIOS2)}};
// clang-format on
}

std::vector<std::string> openPMD::getFileExtensions()
{
std::vector<std::string> fext;
fext.emplace_back("json");
// https://github.com/ToruNiina/toml11/issues/205
#if !defined(__NVCOMPILER_MAJOR__) || __NVCOMPILER_MAJOR__ >= 23
fext.emplace_back("toml");
#endif
#if openPMD_HAVE_ADIOS2
fext.emplace_back("bp");
#endif
Expand Down

0 comments on commit fe4e835

Please sign in to comment.