Skip to content
Snippets Groups Projects
Commit 7a39ae0a authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

CMakeLists.txt: set_diagnostic_flags (-Werror)

parent b8213add
No related branches found
No related tags found
2 merge requests!329Master into deathvalley,!321CMakeLists.txt: set_diagnostic_flags (-Werror)
...@@ -10,13 +10,11 @@ PROJECT(athena ...@@ -10,13 +10,11 @@ PROJECT(athena
) )
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
find_package( DD4hep REQUIRED COMPONENTS DDCore DDG4) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
find_package(DD4hep REQUIRED COMPONENTS DDCore DDG4)
find_package(Acts REQUIRED COMPONENTS Core PluginIdentification PluginTGeo PluginDD4hep ) find_package(Acts REQUIRED COMPONENTS Core PluginIdentification PluginTGeo PluginDD4hep )
find_package(fmt REQUIRED)
find_package(fmt)
#find_library(FMT_LIBRARY fmt)
#----------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------
set(a_lib_name athena) set(a_lib_name athena)
......
...@@ -68,9 +68,9 @@ long load_file( ...@@ -68,9 +68,9 @@ long load_file(
"_", "_",
pos + 1); pos + 1);
if (after == std::string::npos) after = cache.size(); // cache ends on env var if (after == std::string::npos) after = cache.size(); // cache ends on env var
auto env_name = cache.substr(pos + 1, after - pos - 1); const std::string env_name(cache.substr(pos + 1, after - pos - 1));
auto env_value = std::getenv(env_name.c_str()); auto env_ptr = std::getenv(env_name.c_str());
if (env_value == nullptr) env_value = ""; const std::string env_value(env_ptr != nullptr ? env_ptr : "");
cache.erase(pos, after - pos); cache.erase(pos, after - pos);
cache.insert(pos, env_value); cache.insert(pos, env_value);
printout(INFO, "FileLoader", "$" + env_name + " -> " + env_value); printout(INFO, "FileLoader", "$" + env_name + " -> " + env_value);
......
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