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/VSExternalInclude/CMakeLists.txt | |
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/VSExternalInclude/CMakeLists.txt')
-rw-r--r-- | Tests/VSExternalInclude/CMakeLists.txt | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/Tests/VSExternalInclude/CMakeLists.txt b/Tests/VSExternalInclude/CMakeLists.txt index 4a413d5..af0b18f 100644 --- a/Tests/VSExternalInclude/CMakeLists.txt +++ b/Tests/VSExternalInclude/CMakeLists.txt @@ -1,54 +1,54 @@ cmake_minimum_required (VERSION 2.6) -PROJECT(VSExternalInclude) +project(VSExternalInclude) -IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6") - SET(PROJECT_EXT dsp) -ELSE(${CMAKE_GENERATOR} MATCHES "Visual Studio 6") - SET(PROJECT_EXT vcproj) -ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6") -IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 1[01]") - SET(PROJECT_EXT vcxproj) -ENDIF() +if(${CMAKE_GENERATOR} MATCHES "Visual Studio 6") + set(PROJECT_EXT dsp) +else(${CMAKE_GENERATOR} MATCHES "Visual Studio 6") + set(PROJECT_EXT vcproj) +endif(${CMAKE_GENERATOR} MATCHES "Visual Studio 6") +if(${CMAKE_GENERATOR} MATCHES "Visual Studio 1[01]") + set(PROJECT_EXT vcxproj) +endif() # make sure directories exists -SET(LIB1_BINARY_DIR ${VSExternalInclude_BINARY_DIR}/Lib1) -MAKE_DIRECTORY("${LIB1_BINARY_DIR}") +set(LIB1_BINARY_DIR ${VSExternalInclude_BINARY_DIR}/Lib1) +make_directory("${LIB1_BINARY_DIR}") -SET(LIB2_BINARY_DIR ${VSExternalInclude_BINARY_DIR}/Lib2) -MAKE_DIRECTORY("${LIB2_BINARY_DIR}") +set(LIB2_BINARY_DIR ${VSExternalInclude_BINARY_DIR}/Lib2) +make_directory("${LIB2_BINARY_DIR}") # generate lib1 -EXEC_PROGRAM("${CMAKE_COMMAND}" "${LIB1_BINARY_DIR}" ARGS -G\"${CMAKE_GENERATOR}\" +exec_program("${CMAKE_COMMAND}" "${LIB1_BINARY_DIR}" ARGS -G\"${CMAKE_GENERATOR}\" \"${VSExternalInclude_SOURCE_DIR}/Lib1\" OUTPUT_VARIABLE OUT) -MESSAGE("CMAKE Ran with the following output:\n\"${OUT}\"") +message("CMAKE Ran with the following output:\n\"${OUT}\"") # generate lib2 -EXEC_PROGRAM("${CMAKE_COMMAND}" "${LIB2_BINARY_DIR}" ARGS -G\"${CMAKE_GENERATOR}\" +exec_program("${CMAKE_COMMAND}" "${LIB2_BINARY_DIR}" ARGS -G\"${CMAKE_GENERATOR}\" \"${VSExternalInclude_SOURCE_DIR}/Lib2\" OUTPUT_VARIABLE OUT) -MESSAGE("CMAKE Ran with the following output:\n\"${OUT}\"") +message("CMAKE Ran with the following output:\n\"${OUT}\"") -INCLUDE_EXTERNAL_MSPROJECT(lib1 ${VSExternalInclude_BINARY_DIR}/Lib1/LIB1.${PROJECT_EXT}) +include_external_msproject(lib1 ${VSExternalInclude_BINARY_DIR}/Lib1/LIB1.${PROJECT_EXT}) # lib2 depends on lib1 -INCLUDE_EXTERNAL_MSPROJECT(lib2 ${VSExternalInclude_BINARY_DIR}/Lib2/LIB2.${PROJECT_EXT} lib1) +include_external_msproject(lib2 ${VSExternalInclude_BINARY_DIR}/Lib2/LIB2.${PROJECT_EXT} lib1) -INCLUDE_DIRECTORIES(${VSExternalInclude_SOURCE_DIR}/Lib2 ${VSExternalInclude_SOURCE_DIR}/Lib1) +include_directories(${VSExternalInclude_SOURCE_DIR}/Lib2 ${VSExternalInclude_SOURCE_DIR}/Lib1) -SET(SOURCES main.cpp) +set(SOURCES main.cpp) -ADD_EXECUTABLE(VSExternalInclude ${SOURCES}) +add_executable(VSExternalInclude ${SOURCES}) # target depends on lib2 -ADD_DEPENDENCIES(VSExternalInclude lib2) +add_dependencies(VSExternalInclude lib2) # VS 10 vcxproj files have depends in them # Since lib1 and lib2 do not depend on each other # then the vcxproj files do not depend on each other # and the sln file can no longer be the only source # of that depend. So, for VS 10 make the executable # depend on lib1 and lib2 -IF(MSVC10 OR MSVC11) - ADD_DEPENDENCIES(VSExternalInclude lib1) -ENDIF() +if(MSVC10 OR MSVC11) + add_dependencies(VSExternalInclude lib1) +endif() # Interaction testing between the FOLDER target property and # INCLUDE_EXTERNAL_MSPROJECT targets: |