summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/include_external_msproject
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 17:50:14 (GMT)
committerBrad King <brad.king@kitware.com>2012-08-13 18:19:16 (GMT)
commit9db3116226cb99fcf54e936c833953abcde9b729 (patch)
treebd755ed9e616bbf1482a894bc7946980d81b7703 /Tests/RunCMake/include_external_msproject
parent77543bde41b0e52c3959016698b529835945d62d (diff)
downloadCMake-9db3116226cb99fcf54e936c833953abcde9b729.zip
CMake-9db3116226cb99fcf54e936c833953abcde9b729.tar.gz
CMake-9db3116226cb99fcf54e936c833953abcde9b729.tar.bz2
Remove CMake-language block-end command arguments
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
Diffstat (limited to 'Tests/RunCMake/include_external_msproject')
-rw-r--r--Tests/RunCMake/include_external_msproject/check_utils.cmake20
1 files changed, 10 insertions, 10 deletions
diff --git a/Tests/RunCMake/include_external_msproject/check_utils.cmake b/Tests/RunCMake/include_external_msproject/check_utils.cmake
index 7d6b8f8..7f5ef53 100644
--- a/Tests/RunCMake/include_external_msproject/check_utils.cmake
+++ b/Tests/RunCMake/include_external_msproject/check_utils.cmake
@@ -8,8 +8,8 @@ macro(check_line_exists TARGET_FILE REG_EXP_REF)
if(_VAR_LEN GREATER 0)
set(IS_FOUND "TRUE")
- endif(_VAR_LEN GREATER 0)
-endmacro(check_line_exists TARGET_FILE REG_EXP_REF)
+ endif()
+endmacro()
# Search and parse project section line by project name.
# If search was successful stores found type and guid into FOUND_TYPE and FOUND_GUID variables respectively.
@@ -20,13 +20,13 @@ macro(parse_project_section TARGET_FILE PROJECT_NAME)
check_line_exists(${TARGET_FILE} REG_EXP)
if(NOT IS_FOUND)
return()
- endif(NOT IS_FOUND)
+ endif()
string(REGEX REPLACE "${REG_EXP}" "\\1;\\2" _GUIDS "${FOUND_LINE}")
list(GET _GUIDS 0 FOUND_TYPE)
list(GET _GUIDS 1 FOUND_GUID)
-endmacro(parse_project_section TARGET_FILE PROJECT_NAME)
+endmacro()
# Search project section line by project name and type.
# Returns TRUE if found and FALSE otherwise
@@ -36,8 +36,8 @@ function(check_project_type TARGET_FILE PROJECT_NAME PROJECT_TYPE RESULT)
parse_project_section(${TARGET_FILE} ${PROJECT_NAME})
if(IS_FOUND AND FOUND_TYPE STREQUAL PROJECT_TYPE)
set(${RESULT} "TRUE" PARENT_SCOPE)
- endif(IS_FOUND AND FOUND_TYPE STREQUAL PROJECT_TYPE)
-endfunction(check_project_type TARGET_FILE PROJECT_NAME PROJECT_TYPE RESULT)
+ endif()
+endfunction()
# Search project section line by project name and id.
@@ -48,8 +48,8 @@ function(check_project_guid TARGET_FILE PROJECT_NAME PROJECT_GUID RESULT)
parse_project_section(${TARGET_FILE} ${PROJECT_NAME})
if(IS_FOUND AND FOUND_GUID STREQUAL PROJECT_GUID)
set(${RESULT} "TRUE" PARENT_SCOPE)
- endif(IS_FOUND AND FOUND_GUID STREQUAL PROJECT_GUID)
-endfunction(check_project_guid TARGET_FILE PROJECT_NAME PROJECT_GUID RESULT)
+ endif()
+endfunction()
# Search project's build configuration line by project name and target platform name.
@@ -61,7 +61,7 @@ function(check_custom_platform TARGET_FILE PROJECT_NAME PLATFORM_NAME RESULT)
parse_project_section(${TARGET_FILE} ${PROJECT_NAME})
if(NOT IS_FOUND)
return()
- endif(NOT IS_FOUND)
+ endif()
# probably whould be better to use configuration name
# extracted from CMAKE_CONFIGURATION_TYPES than just hardcoded "Debug" instead
@@ -69,7 +69,7 @@ function(check_custom_platform TARGET_FILE PROJECT_NAME PLATFORM_NAME RESULT)
check_line_exists(${TARGET_FILE} REG_EXP)
set(${RESULT} ${IS_FOUND} PARENT_SCOPE)
-endfunction(check_custom_platform TARGET_FILE PLATFORM_NAME RESULT)
+endfunction()
# RunCMake test check helper
function(check_project test name guid type platform)