Commit 511a6748 authored by Lynn Garren's avatar Lynn Garren
Browse files

use newer execute_process instead of exec_program

parent 260efa48
......@@ -84,16 +84,24 @@ macro(clhep_build_libclhep )
if( ${CMAKE_SYSTEM_NAME} MATCHES "Windows" )
# copy
## file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/clhep_static_symlink
## "exec_program(${CMAKE_COMMAND} ARGS -E chdir ${CMAKE_INSTALL_PREFIX}/lib; ${CMAKE_COMMAND} ARGS -E copy ${CMAKE_STATIC_LIBRARY_PREFIX}CLHEP-${VERSION}${CMAKE_STATIC_LIBRARY_SUFFIX} ${CMAKE_STATIC_LIBRARY_PREFIX}CLHEP${CMAKE_STATIC_LIBRARY_SUFFIX} )" )
## file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/clhep_shared_symlink
## "exec_program(${CMAKE_COMMAND} ARGS -E chdir ${CMAKE_INSTALL_PREFIX}/bin; ${CMAKE_COMMAND} ARGS -E copy ${CMAKE_SHARED_LIBRARY_PREFIX}CLHEP-${VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_SHARED_LIBRARY_PREFIX}CLHEP${CMAKE_SHARED_LIBRARY_SUFFIX} )" )
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/clhep_static_symlink
"exec_program(${CMAKE_COMMAND} ARGS -E chdir ${CMAKE_INSTALL_PREFIX}/lib; ${CMAKE_COMMAND} ARGS -E copy ${CMAKE_STATIC_LIBRARY_PREFIX}CLHEP-${VERSION}${CMAKE_STATIC_LIBRARY_SUFFIX} ${CMAKE_STATIC_LIBRARY_PREFIX}CLHEP${CMAKE_STATIC_LIBRARY_SUFFIX} )" )
"execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_STATIC_LIBRARY_PREFIX}CLHEP-${VERSION}${CMAKE_STATIC_LIBRARY_SUFFIX} ${CMAKE_STATIC_LIBRARY_PREFIX}CLHEP${CMAKE_STATIC_LIBRARY_SUFFIX} WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib )" )
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/clhep_shared_symlink
"exec_program(${CMAKE_COMMAND} ARGS -E chdir ${CMAKE_INSTALL_PREFIX}/bin; ${CMAKE_COMMAND} ARGS -E copy ${CMAKE_SHARED_LIBRARY_PREFIX}CLHEP-${VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_SHARED_LIBRARY_PREFIX}CLHEP${CMAKE_SHARED_LIBRARY_SUFFIX} )" )
"execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SHARED_LIBRARY_PREFIX}CLHEP-${VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_SHARED_LIBRARY_PREFIX}CLHEP${CMAKE_SHARED_LIBRARY_SUFFIX} WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin )" )
else()
# create the symbolic links
## file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/clhep_static_symlink
## "exec_program(${CMAKE_COMMAND} ARGS -E chdir ${CMAKE_INSTALL_PREFIX}/lib; ${CMAKE_COMMAND} ARGS -E create_symlink ${CMAKE_STATIC_LIBRARY_PREFIX}CLHEP-${VERSION}${CMAKE_STATIC_LIBRARY_SUFFIX} ${CMAKE_STATIC_LIBRARY_PREFIX}CLHEP${CMAKE_STATIC_LIBRARY_SUFFIX} )" )
## file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/clhep_shared_symlink
## "exec_program(${CMAKE_COMMAND} ARGS -E chdir ${CMAKE_INSTALL_PREFIX}/lib; ${CMAKE_COMMAND} ARGS -E create_symlink ${CMAKE_SHARED_LIBRARY_PREFIX}CLHEP-${VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_SHARED_LIBRARY_PREFIX}CLHEP${CMAKE_SHARED_LIBRARY_SUFFIX} )" )
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/clhep_static_symlink
"exec_program(${CMAKE_COMMAND} ARGS -E chdir ${CMAKE_INSTALL_PREFIX}/lib; ${CMAKE_COMMAND} ARGS -E create_symlink ${CMAKE_STATIC_LIBRARY_PREFIX}CLHEP-${VERSION}${CMAKE_STATIC_LIBRARY_SUFFIX} ${CMAKE_STATIC_LIBRARY_PREFIX}CLHEP${CMAKE_STATIC_LIBRARY_SUFFIX} )" )
"execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_STATIC_LIBRARY_PREFIX}CLHEP-${VERSION}${CMAKE_STATIC_LIBRARY_SUFFIX} ${CMAKE_STATIC_LIBRARY_PREFIX}CLHEP${CMAKE_STATIC_LIBRARY_SUFFIX} WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib )" )
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/clhep_shared_symlink
"exec_program(${CMAKE_COMMAND} ARGS -E chdir ${CMAKE_INSTALL_PREFIX}/lib; ${CMAKE_COMMAND} ARGS -E create_symlink ${CMAKE_SHARED_LIBRARY_PREFIX}CLHEP-${VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_SHARED_LIBRARY_PREFIX}CLHEP${CMAKE_SHARED_LIBRARY_SUFFIX} )" )
"execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SHARED_LIBRARY_PREFIX}CLHEP-${VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_SHARED_LIBRARY_PREFIX}CLHEP${CMAKE_SHARED_LIBRARY_SUFFIX} WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib )" )
endif()
INSTALL(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/clhep_static_symlink )
......
......@@ -9,8 +9,12 @@
#
FUNCTION(_My_COMPILER_DUMPVERSION _OUTPUT_VERSION)
EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
##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
)
set( COMPILER_VERSION ${_my_COMPILER_VERSION} PARENT_SCOPE)
......
......@@ -67,7 +67,8 @@ 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)
##exec_program(${LSB_RELEASE_PROGRAM} ARGS -s -i OUTPUT_VARIABLE LSB_VENDOR)
execute_process(COMMAND ${LSB_RELEASE_PROGRAM} -s -i OUTPUT_VARIABLE LSB_VENDOR)
string(REGEX REPLACE " " "-" LSB_VENDOR ${LSB_VENDOR})
string(TOLOWER ${LSB_VENDOR} LSB_VENDOR)
if("${LSB_VENDOR}" MATCHES "scientificslf")
......@@ -83,7 +84,8 @@ if(NOT DEFINED CPACK_SYSTEM_NAME)
endif()
# - Distributor release
exec_program(${LSB_RELEASE_PROGRAM} ARGS -s -r OUTPUT_VARIABLE LSB_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)
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