Compiler flag errors

Your source code may be “sensitive” to the “ROOT_CXX_FLAGS” and “ROOT_CXX_STANDARD” variables (which come from ROOT).

The problem is that you may have (note “undefined”):

ROOT_CXX_FLAGS     -std=c++17 -pipe -fsigned-char -pthread
ROOT_CXX_STANDARD undefined

or (note the missing “-std=c++17”):

ROOT_CXX_FLAGS     -pipe -fsigned-char -pthread
ROOT_CXX_STANDARD 17

Try the simple “CMakeLists.txt” file from (just execute “cmake .”):