Hi,
adding ROOT as a dependency using the following lines:
list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS})
find_package(ROOT REQUIRED COMPONENTS RIO Net TMVA)
include(${ROOT_USE_FILE})
Adds -fPIC to all compilation targets
it comes from this line:
set(ROOT_CXX_FLAGS " -pipe -m64 -fsigned-char -fPIC -pthread -std=c++11")
in ROOTConfig.cmake
That means that targets that doesn’t require -fPIC are compiled with it