diff options
author | Kitware Robot <kwrobot@kitware.com> | 2012-08-13 17:47:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-08-13 18:19:16 (GMT) |
commit | 77543bde41b0e52c3959016698b529835945d62d (patch) | |
tree | ff63e5fbec326c4a5d821e7496c6d2cb52f75b92 /Tests/OutOfSource/OutOfSourceSubdir | |
parent | 7bbaa4283de26864b2e55e819db0884771585467 (diff) | |
download | CMake-77543bde41b0e52c3959016698b529835945d62d.zip CMake-77543bde41b0e52c3959016698b529835945d62d.tar.gz CMake-77543bde41b0e52c3959016698b529835945d62d.tar.bz2 |
Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands. Later command
names became case-insensitive. Now the preferred style is lower-case.
Run the following shell code:
cmake --help-command-list |
grep -v "cmake version" |
while read c; do
echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
Diffstat (limited to 'Tests/OutOfSource/OutOfSourceSubdir')
-rw-r--r-- | Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt b/Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt index c362e79..d418809 100644 --- a/Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt +++ b/Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt @@ -1,62 +1,62 @@ -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) +include_directories(${CMAKE_CURRENT_BINARY_DIR}) -IF ("${PROJECT_SOURCE_DIR}" STREQUAL "${ANOTHER_PROJ_SOURCE_DIR}") - SET(BUILD_SHARED_LIBS 1) +if ("${PROJECT_SOURCE_DIR}" STREQUAL "${ANOTHER_PROJ_SOURCE_DIR}") + set(BUILD_SHARED_LIBS 1) # Construct a source file outside the tree whose full path is close to # the path length limit. This will cause the full path to the object # file in the build tree to exceed the maximum path length which will # test cmLocalGenerator::CreateSafeUniqueObjectFileName. - GET_FILENAME_COMPONENT(DEEPDIR + get_filename_component(DEEPDIR ${OutOfSource_BINARY_DIR}/../OutOfSourceDeep/deeper ABSOLUTE) # Test giving the generator a custom limit. - SET(CMAKE_OBJECT_PATH_MAX 220) + set(CMAKE_OBJECT_PATH_MAX 220) # Use a separate variable for computation. - SET(MAXPATH "${CMAKE_OBJECT_PATH_MAX}") + set(MAXPATH "${CMAKE_OBJECT_PATH_MAX}") # VS8 adds "OutOfSource/SubDir/OutOfSourceSubdir/../../../" to the # path of the source file for no good reason. Reduce the length # limit by 46 characters to account for it. It should still be long # enough to require special object file name conversion. - IF(${CMAKE_GENERATOR} MATCHES "Visual Studio (8|10)") - MATH(EXPR MAXPATH "${MAXPATH} - 46") - ENDIF() + if(${CMAKE_GENERATOR} MATCHES "Visual Studio (8|10)") + math(EXPR MAXPATH "${MAXPATH} - 46") + endif() # Ninja imposes a maximum path component count of 30. Permit more # path components in the source path. - IF(${CMAKE_GENERATOR} MATCHES "Ninja") - MATH(EXPR MAXPATH "${MAXPATH} - 44") - ENDIF() + if(${CMAKE_GENERATOR} MATCHES "Ninja") + math(EXPR MAXPATH "${MAXPATH} - 44") + endif() # MAXPATH less 25 for last /and/deeper/simple.cxx part and small safety - MATH(EXPR MAXPATH "${MAXPATH} - 25") - STRING(LENGTH "${DEEPDIR}" DEEPDIR_LEN) - WHILE("${DEEPDIR_LEN}" LESS "${MAXPATH}") - SET(DEEPDIR ${DEEPDIR}/and/deeper) - STRING(LENGTH "${DEEPDIR}" DEEPDIR_LEN) - ENDWHILE("${DEEPDIR_LEN}" LESS "${MAXPATH}") - SET(DEEPSRC ${DEEPDIR}/simple.cxx) - STRING(LENGTH "${DEEPSRC}" DEEPSRC_LEN) - CONFIGURE_FILE(simple.cxx.in ${DEEPSRC} COPYONLY) + math(EXPR MAXPATH "${MAXPATH} - 25") + string(LENGTH "${DEEPDIR}" DEEPDIR_LEN) + while("${DEEPDIR_LEN}" LESS "${MAXPATH}") + set(DEEPDIR ${DEEPDIR}/and/deeper) + string(LENGTH "${DEEPDIR}" DEEPDIR_LEN) + endwhile("${DEEPDIR_LEN}" LESS "${MAXPATH}") + set(DEEPSRC ${DEEPDIR}/simple.cxx) + string(LENGTH "${DEEPSRC}" DEEPSRC_LEN) + configure_file(simple.cxx.in ${DEEPSRC} COPYONLY) # Watcom WMake seems to have problems with long command lines. Just # disable this part of the test until it is resolved. - IF(${CMAKE_GENERATOR} MATCHES "Watcom WMake") - SET(DEEPSRC "") - ADD_DEFINITIONS(-DNO_DEEPSRC) - ENDIF(${CMAKE_GENERATOR} MATCHES "Watcom WMake") + if(${CMAKE_GENERATOR} MATCHES "Watcom WMake") + set(DEEPSRC "") + add_definitions(-DNO_DEEPSRC) + endif(${CMAKE_GENERATOR} MATCHES "Watcom WMake") - ADD_LIBRARY(testlib testlib.cxx) - ADD_EXECUTABLE (simple simple.cxx ../simple.cxx ${DEEPSRC}) - TARGET_LINK_LIBRARIES(simple testlib outlib) -ENDIF ("${PROJECT_SOURCE_DIR}" STREQUAL "${ANOTHER_PROJ_SOURCE_DIR}") + add_library(testlib testlib.cxx) + add_executable (simple simple.cxx ../simple.cxx ${DEEPSRC}) + target_link_libraries(simple testlib outlib) +endif ("${PROJECT_SOURCE_DIR}" STREQUAL "${ANOTHER_PROJ_SOURCE_DIR}") # test getting a definition from a subdir -SET (WEASELS SIZZLING) +set (WEASELS SIZZLING) -GET_DIRECTORY_PROPERTY(incDirs INCLUDE_DIRECTORIES) -IF(NOT incDirs) - MESSAGE(FATAL_ERROR "GET_DIRECTORY_PROPERTY(INCLUDE_DIRECTORIES) returned empty list") -ENDIF(NOT incDirs) +get_directory_property(incDirs INCLUDE_DIRECTORIES) +if(NOT incDirs) + message(FATAL_ERROR "get_directory_property(INCLUDE_DIRECTORIES) returned empty list") +endif(NOT incDirs) |