Compiling a CMake project using ROOT not compiled with CMake

Hi Mato,

thanks a lot for the quick reply. Sorry I posted shortly after my first comment but as you see I think I found the issue with my previous setup and now I am using what you mention. The only difference is that I didn’t include ROOT_USE_FILE, what is it that it does? If I don’t include it I get the error messages I attached in my previous comment but if I use it I get this error

-- Build files have been written to: /home/jaraque/npatest/build
Scanning dependencies of target NPATools
[  5%] Building CXX object tools/CMakeFiles/NPATools.dir/NPALog.cxx.o
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-std=c++11"
make[2]: *** [tools/CMakeFiles/NPATools.dir/NPALog.cxx.o] Error 1
make[1]: *** [tools/CMakeFiles/NPATools.dir/all] Error 2
make: *** [all] Error 2

which is odd since it seems to me that it points to the compiler not supporting C++11 but it does:

14:55 $ g++ --version
g++ (GCC) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Do you know what I might be missing?

Thanks again,
Juanpe.