Commit b027d0c2 authored by Lynn Garren's avatar Lynn Garren

use OUTPUT_STRIP_TRAILING_WHITESPACE with execute_process commands

parent cf03cb32
2012-08-14 Lynn Garren <garren@fnal.gov>
* cmake/Modules: use OUTPUT_STRIP_TRAILING_WHITESPACE with execute_process commands
2012-08-07 Lynn Garren <garren@fnal.gov>
* Vector/LorentzVector.h: make the HepLorentzVector(double t) constructor explicit
......
......@@ -9,13 +9,10 @@
#
FUNCTION(_My_COMPILER_DUMPVERSION _OUTPUT_VERSION)
##EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
## ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
## OUTPUT_VARIABLE _my_COMPILER_VERSION
##)
execute_process(COMMAND ${CMAKE_CXX_COMPILER}
${CMAKE_CXX_COMPILER_ARG1} -dumpversion
OUTPUT_VARIABLE _my_COMPILER_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set( COMPILER_VERSION ${_my_COMPILER_VERSION} PARENT_SCOPE)
STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2"
......
......@@ -67,8 +67,7 @@ if(NOT DEFINED CPACK_SYSTEM_NAME)
if(LSB_RELEASE_PROGRAM)
# We have linux, so incorporate Vendor info into package name
# - Distributor ID
##exec_program(${LSB_RELEASE_PROGRAM} ARGS -s -i OUTPUT_VARIABLE LSB_VENDOR)
execute_process(COMMAND ${LSB_RELEASE_PROGRAM} -s -i OUTPUT_VARIABLE LSB_VENDOR)
execute_process(COMMAND ${LSB_RELEASE_PROGRAM} -s -i OUTPUT_VARIABLE LSB_VENDOR OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REGEX REPLACE " " "-" LSB_VENDOR ${LSB_VENDOR})
string(TOLOWER ${LSB_VENDOR} LSB_VENDOR)
if("${LSB_VENDOR}" MATCHES "scientificslf")
......@@ -84,8 +83,7 @@ if(NOT DEFINED CPACK_SYSTEM_NAME)
endif()
# - Distributor release
##exec_program(${LSB_RELEASE_PROGRAM} ARGS -s -r OUTPUT_VARIABLE LSB_RELEASE)
execute_process(COMMAND ${LSB_RELEASE_PROGRAM} -s -r OUTPUT_VARIABLE LSB_RELEASE)
execute_process(COMMAND ${LSB_RELEASE_PROGRAM} -s -r OUTPUT_VARIABLE LSB_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE)
string(TOLOWER ${LSB_RELEASE} LSB_RELEASE)
string(REGEX REPLACE "([0-9])\\.([0-9])?" "\\1" LSB_RELEASE ${LSB_RELEASE})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment