Skip to content
Snippets Groups Projects
Commit 0bf41bfc authored by GIRARD ALCINDOR Valérian's avatar GIRARD ALCINDOR Valérian
Browse files

Updating the Root.cmake to fit the CMP0153 policy since the

"exec_program" command and has been deprecated since CMake 3.0
parent ed119078
No related branches found
No related tags found
1 merge request!27Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
Pipeline #285925 failed
...@@ -15,7 +15,7 @@ if(NPTOOL_ROOT_CONFIG MATCHES "NOTFOUND") ...@@ -15,7 +15,7 @@ if(NPTOOL_ROOT_CONFIG MATCHES "NOTFOUND")
message(FATAL_ERROR "ROOT is not found, check your installation") message(FATAL_ERROR "ROOT is not found, check your installation")
endif() endif()
exec_program(${NPTOOL_ROOT_CONFIG} ARGS "--version" OUTPUT_VARIABLE NPTOOL_ROOT_VERSION) execute_process(COMMAND "${NPTOOL_ROOT_CONFIG} ARGS \"--version\" OUTPUT_VARIABLE NPTOOL_ROOT_VERSION")
# now parse the parts of the user given version string into variables # now parse the parts of the user given version string into variables
string(REGEX REPLACE "^([0-9]+)\\.[0-9][0-9]+\\/[0-9][0-9]+" "\\1" req_root_major_vers "${ROOT_MIN_VERSION}") string(REGEX REPLACE "^([0-9]+)\\.[0-9][0-9]+\\/[0-9][0-9]+" "\\1" req_root_major_vers "${ROOT_MIN_VERSION}")
string(REGEX REPLACE "^[0-9]+\\.([0-9][0-9])+\\/[0-9][0-9]+.*" "\\1" req_root_minor_vers "${ROOT_MIN_VERSION}") string(REGEX REPLACE "^[0-9]+\\.([0-9][0-9])+\\/[0-9][0-9]+.*" "\\1" req_root_minor_vers "${ROOT_MIN_VERSION}")
...@@ -39,15 +39,15 @@ endif() ...@@ -39,15 +39,15 @@ endif()
set(ROOT_LIBRARIES dl Gui Core RIO Net Hist Gpad Tree Physics MathCore Thread ASImage) set(ROOT_LIBRARIES dl Gui Core RIO Net Hist Gpad Tree Physics MathCore Thread ASImage)
# Lib directories # Lib directories
exec_program(${NPTOOL_ROOT_CONFIG} ARGS "--libdir" OUTPUT_VARIABLE ROOT_LIBRARY_DIR) execute_process(COMMAND "${NPTOOL_ROOT_CONFIG} ARGS \"--libdir\" OUTPUT_VARIABLE ROOT_LIBRARY_DIR")
link_directories( ${ROOT_LIBRARY_DIR}) link_directories( ${ROOT_LIBRARY_DIR})
# Include directories # Include directories
exec_program(${NPTOOL_ROOT_CONFIG} ARGS "--incdir" OUTPUT_VARIABLE ROOT_INCLUDE_DIR) execute_process(COMMAND "${NPTOOL_ROOT_CONFIG} ARGS \"--incdir\" OUTPUT_VARIABLE ROOT_INCLUDE_DIR")
include_directories(SYSTEM ${ROOT_INCLUDE_DIR}) include_directories(SYSTEM ${ROOT_INCLUDE_DIR})
# Get the compilator flag from root to assure consistancy # Get the compilator flag from root to assure consistancy
exec_program(${NPTOOL_ROOT_CONFIG} ARGS "--cflags" OUTPUT_VARIABLE NPTOOL_ROOT_CFLAGS ) execute_process(COMMAND "${NPTOOL_ROOT_CONFIG} ARGS \"--cflags\" OUTPUT_VARIABLE NPTOOL_ROOT_CFLAGS")
if(CMAKE_CXX_FLAGS) if(CMAKE_CXX_FLAGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${NPTOOL_ROOT_CFLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${NPTOOL_ROOT_CFLAGS}")
else() 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