Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

don't directly call create_symlink - use ${LINK_COPY} to choose copy_…

…if_different on windows
  • Loading branch information...
commit 25bb2d2fa4288fe73f338ffed0e570cc933a24b9 1 parent 5a5f715
@rpavlik authored
View
6 CMakeLists.txt
@@ -17,6 +17,12 @@ ENDIF()
# Search for various include files and functions
include(${Path64_SOURCE_DIR}/cmake/Modules/ConfigureChecks.cmake)
+if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
+ set(LINK_COPY copy_if_different)
+else()
+ set(LINK_COPY create_symlink)
+endif()
+
# Force the build_type=debug flags to sane values overriding users choices
SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -D_DEBUG -DIs_True_On=1" CACHE STRING "Flags used by the compiler during debug builds." FORCE)
SET(CMAKE_CXX_FLAGS_DEBUG "-Wno-deprecated -O0 -g -D_DEBUG -DIs_True_On=1" CACHE STRING "Flags used by the compiler during debug builds." FORCE)
View
2  src/be/whirl2c/CMakeLists.txt
@@ -34,7 +34,7 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
path64_add_multiarch_multiarch_dependencies(whirl2c-exec be-static)
path64_install_multiarch(whirl2c-exec)
foreach(arch ${PATH64_ENABLE_ARCHES})
- install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"be\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/${PSC_FULL_VERSION}/${arch}/whirl2c_be\")")
+ install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E ${LINK_COPY} \"be\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/${PSC_FULL_VERSION}/${arch}/whirl2c_be\")")
endforeach()
endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
View
2  src/be/whirl2f/CMakeLists.txt
@@ -39,7 +39,7 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
path64_add_multiarch_multiarch_dependencies(whirl2f-exec be-static)
path64_install_multiarch(whirl2f-exec)
foreach(arch ${PATH64_ENABLE_ARCHES})
- install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"be\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/${PSC_FULL_VERSION}/${arch}/whirl2f_be\")")
+ install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E ${LINK_COPY} \"be\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/${PSC_FULL_VERSION}/${arch}/whirl2f_be\")")
endforeach()
endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
View
2  src/crayf90/fe90/CMakeLists.txt
@@ -66,7 +66,7 @@ set_source_files_properties(cf95.cat PROPERTIES GENERATED 1)
file(COPY cf95.msgs DESTINATION ${Path64_BINARY_DIR}/lib)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cf95.cat DESTINATION ${PATH64_LIB_PATH})
install(FILES cf95.msgs DESTINATION ${PATH64_LIB_PATH})
-install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"cf95.msgs\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/${PSC_FULL_VERSION}/pathf95.msgs\")")
+install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E ${LINK_COPY} \"cf95.msgs\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/${PSC_FULL_VERSION}/pathf95.msgs\")")
add_custom_target(
generate_cf95_cat
View
4 src/crayf90/sgi/CMakeLists.txt
@@ -94,8 +94,8 @@ include_directories(
add_custom_command(
OUTPUT ${Path64_BINARY_DIR}/bin/pathf90
- COMMAND ${CMAKE_COMMAND} -E create_symlink pathcc ${Path64_BINARY_DIR}/bin/pathf90
- COMMAND ${CMAKE_COMMAND} -E create_symlink pathcc ${Path64_BINARY_DIR}/bin/pathf95
+ COMMAND ${CMAKE_COMMAND} -E ${LINK_COPY} pathcc ${Path64_BINARY_DIR}/bin/pathf90
+ COMMAND ${CMAKE_COMMAND} -E ${LINK_COPY} pathcc ${Path64_BINARY_DIR}/bin/pathf95
DEPENDS ${Path64_BINARY_DIR}/bin/pathcc
)
View
17 src/driver/CMakeLists.txt
@@ -450,7 +450,8 @@ if(PATH64_ENABLE_CXX)
OUTPUT ${Path64_BINARY_DIR}/bin/pathCC ${Path64_BINARY_DIR}/lib/${PSC_FULL_VERSION}
DEPENDS pathcc
# Paths in symbolic links should be relative. Otherwise bootstrap will not work
- COMMAND ${CMAKE_COMMAND} -E create_symlink pathcc ${Path64_BINARY_DIR}/bin/pathCC
+ # TODO does this work with LINK_COPY on windows?
+ COMMAND ${CMAKE_COMMAND} -E ${LINK_COPY} pathcc ${Path64_BINARY_DIR}/bin/pathCC
)
add_custom_target(
@@ -461,19 +462,19 @@ if(PATH64_ENABLE_CXX)
add_dependencies(compiler-stage stageit-driver)
- install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"pathcc${CMAKE_EXECUTABLE_SUFFIX}\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/pathCC${CMAKE_EXECUTABLE_SUFFIX}\")")
- install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"pathCC${CMAKE_EXECUTABLE_SUFFIX}\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/pathCC-${PSC_FULL_VERSION}${CMAKE_EXECUTABLE_SUFFIX}\")")
+ install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E ${LINK_COPY} \"pathcc${CMAKE_EXECUTABLE_SUFFIX}\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/pathCC${CMAKE_EXECUTABLE_SUFFIX}\")")
+ install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E ${LINK_COPY} \"pathCC${CMAKE_EXECUTABLE_SUFFIX}\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/pathCC-${PSC_FULL_VERSION}${CMAKE_EXECUTABLE_SUFFIX}\")")
endif()
endif()
if(PATH64_ENABLE_FORTRAN)
-install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"pathcc${CMAKE_EXECUTABLE_SUFFIX}\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/pathf95${CMAKE_EXECUTABLE_SUFFIX}\")")
-install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"pathcc${CMAKE_EXECUTABLE_SUFFIX}\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/pathf90${CMAKE_EXECUTABLE_SUFFIX}\")")
+install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E ${LINK_COPY} \"pathcc${CMAKE_EXECUTABLE_SUFFIX}\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/pathf95${CMAKE_EXECUTABLE_SUFFIX}\")")
+install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E ${LINK_COPY} \"pathcc${CMAKE_EXECUTABLE_SUFFIX}\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/pathf90${CMAKE_EXECUTABLE_SUFFIX}\")")
endif()
-install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"pathcc${CMAKE_EXECUTABLE_SUFFIX}\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/pathcc-${PSC_FULL_VERSION}${CMAKE_EXECUTABLE_SUFFIX}\")")
+install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E ${LINK_COPY} \"pathcc${CMAKE_EXECUTABLE_SUFFIX}\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/pathcc-${PSC_FULL_VERSION}${CMAKE_EXECUTABLE_SUFFIX}\")")
if(PATH64_ENABLE_FORTRAN)
-install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"pathf95${CMAKE_EXECUTABLE_SUFFIX}\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/pathf95-${PSC_FULL_VERSION}${CMAKE_EXECUTABLE_SUFFIX}\")")
-install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"pathf90${CMAKE_EXECUTABLE_SUFFIX}\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/pathf90-${PSC_FULL_VERSION}${CMAKE_EXECUTABLE_SUFFIX}\")")
+install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E ${LINK_COPY} \"pathf95${CMAKE_EXECUTABLE_SUFFIX}\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/pathf95-${PSC_FULL_VERSION}${CMAKE_EXECUTABLE_SUFFIX}\")")
+install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E ${LINK_COPY} \"pathf90${CMAKE_EXECUTABLE_SUFFIX}\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/pathf90-${PSC_FULL_VERSION}${CMAKE_EXECUTABLE_SUFFIX}\")")
endif()
View
2  src/includes.cmake
@@ -182,7 +182,7 @@ ENDFOREACH(H)
# fi; \
# done
FOREACH(H ${SYS_DIRS})
- EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink include/sys/${H}
+ EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E ${LINK_COPY} include/sys/${H}
${PATHSCALE_INCLUDE_DIR}/sys/${H}
)
ENDFOREACH(H)
View
8 src/ir_tools/CMakeLists.txt
@@ -84,10 +84,10 @@ endif()
foreach(arch ${PATH64_ENABLE_ARCHES})
- install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"${CMAKE_INSTALL_PREFIX}/${PATH64_LIB_PATH}/${arch}/ir_b2a\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/ir_b2a-${arch}\")")
- install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"${CMAKE_INSTALL_PREFIX}/${PATH64_LIB_PATH}/${arch}/ir_size\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/ir_size-${arch}\")")
- install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"${CMAKE_INSTALL_PREFIX}/bin/ir_b2a-${arch}\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/ir_sel-${arch}\")")
- install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"${CMAKE_INSTALL_PREFIX}/bin/ir_b2a-${arch}\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/ir_all-${arch}\")")
+ install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E ${LINK_COPY} \"${CMAKE_INSTALL_PREFIX}/${PATH64_LIB_PATH}/${arch}/ir_b2a\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/ir_b2a-${arch}\")")
+ install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E ${LINK_COPY} \"${CMAKE_INSTALL_PREFIX}/${PATH64_LIB_PATH}/${arch}/ir_size\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/ir_size-${arch}\")")
+ install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E ${LINK_COPY} \"${CMAKE_INSTALL_PREFIX}/bin/ir_b2a-${arch}\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/ir_sel-${arch}\")")
+ install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E ${LINK_COPY} \"${CMAKE_INSTALL_PREFIX}/bin/ir_b2a-${arch}\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/ir_all-${arch}\")")
endforeach()
View
2  src/wgen/CMakeLists.txt
@@ -128,4 +128,4 @@ path64_add_dependencies_from_multiarch(compiler-stage wgen42)
#install(TARGETS wgen42
# RUNTIME DESTINATION ${PATH64_LIB_PATH})
-#install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${PATH64_LIB_PATH}/wgen42${CMAKE_EXECUTABLE_SUFFIX}\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${PATH64_LIB_PATH}/wgen${CMAKE_EXECUTABLE_SUFFIX}\")")
+#install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E copy_if_different \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${PATH64_LIB_PATH}/wgen42${CMAKE_EXECUTABLE_SUFFIX}\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${PATH64_LIB_PATH}/wgen${CMAKE_EXECUTABLE_SUFFIX}\")")
Please sign in to comment.
Something went wrong with that request. Please try again.