Commit a1e0b673 authored by Lynn Garren's avatar Lynn Garren

protect against space in CMAKE_COMMAND path

parent b09b1d35
2012-07-09 L. Garren <garren@fnal.gov>
* cmake/Modules: enclose CMAKE_COMMAND in quotes when inside execute_process
2012-06-25 L. Garren <garren@fnal.gov>
* cmake/Modules: Use newer execute_process instead of exec_program
......
......@@ -84,24 +84,16 @@ 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
"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 )" )
"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
"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 )" )
"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
"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 )" )
"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
"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 )" )
"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 )
......
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