mirror of
https://github.com/reactos/CMake.git
synced 2024-12-28 14:38:56 +00:00
9db3116226
Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
41 lines
1017 B
CMake
41 lines
1017 B
CMake
set(CTEST_RUN_CURRENT_SCRIPT 0)
|
|
if(NOT DEFINED PROJECT_PREFIX)
|
|
set(PROJECT_PREFIX cmake-)
|
|
endif()
|
|
if(NOT VERSION)
|
|
set(VERSION 2.8)
|
|
endif()
|
|
set(dir "v${VERSION}")
|
|
if("${VERSION}" MATCHES "master")
|
|
set(dir "dev")
|
|
endif()
|
|
file(GLOB FILES ${CMAKE_CURRENT_SOURCE_DIR} "${PROJECT_PREFIX}*")
|
|
list(SORT FILES)
|
|
list(REVERSE FILES)
|
|
message("${FILES}")
|
|
set(UPLOAD_LOC
|
|
"kitware@www.cmake.org:/projects/FTP/pub/cmake/${dir}")
|
|
set(count 0)
|
|
foreach(file ${FILES})
|
|
if(NOT IS_DIRECTORY ${file})
|
|
message("upload ${file} ${UPLOAD_LOC}")
|
|
execute_process(COMMAND
|
|
scp ${file} ${UPLOAD_LOC}
|
|
RESULT_VARIABLE result)
|
|
if("${result}" GREATER 0)
|
|
message(FATAL_ERROR "failed to upload file to ${UPLOAD_LOC}")
|
|
endif()
|
|
|
|
# Pause to give each upload a distinct (to the nearest second)
|
|
# time stamp
|
|
if(COMMAND ctest_sleep)
|
|
ctest_sleep(2)
|
|
endif()
|
|
|
|
math(EXPR count "${count} + 1")
|
|
endif()
|
|
endforeach()
|
|
if(${count} EQUAL 0)
|
|
message(FATAL_ERROR "Error no files uploaded.")
|
|
endif()
|