Skip to content
Snippets Groups Projects
Commit e2ae69dd authored by Oliver Heidmann's avatar Oliver Heidmann
Browse files

added newlines to --config all output, CGRIBEX check now uses cdi function cdi_has_gribex

parent 249922f2
No related branches found
No related tags found
1 merge request!312CMake Improvements and fixes
......@@ -82,12 +82,6 @@ constexpr bool have_hdf5 = true;
constexpr bool have_hdf5 = false;
#endif
#ifdef HAVE_LIBCGRIBEX
constexpr bool have_cgribex = true;
#else
constexpr bool have_cgribex = false;
#endif
#ifdef HAVE_LIBCMOR
constexpr bool have_cmor = true;
#else
......@@ -144,7 +138,7 @@ static std::map<std::string, std::pair<std::string, bool>> configMap
{ "has-nc5", { "NetCDF 5", cdiHaveFiletype(CDI_FILETYPE_NC5) } },
{ "has-nczarr", { "NetCDF 4 zarr", cdiHaveFiletype(CDI_FILETYPE_NCZARR) } },
{ "has-hdf5", { "HDF5", have_hdf5 } },
{ "has-cgribex", { "CGRIBEX", have_cgribex } },
{ "has-cgribex", { "CGRIBEX", cdi_has_cgribex() } },
{ "has-cmor", { "CMOR", have_cmor } },
{ "has-magics", { "MAGICS", have_magics } },
{ "has-openmp", { "OPENMP", have_openmp } },
......@@ -379,14 +373,14 @@ print_config(std::string const &option)
if ("all-json" == option || "all" == option)
{
std::cout << "{";
std::cout << "{\n";
int i = 0;
for (auto const &entry : configMap)
{
if (i++) fprintf(stdout, ",");
if (i++) fprintf(stdout, ",\n");
std::cout << "\"" << entry.first << "\":\"" << (entry.second.second ? "yes" : "no") << "\"";
}
std::cout << "}\n";
std::cout << "\n}\n";
}
else
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment