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/X11 | |
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/X11')
-rw-r--r-- | Tests/X11/CMakeLists.txt | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/Tests/X11/CMakeLists.txt b/Tests/X11/CMakeLists.txt index 3859ba2..33ee277 100644 --- a/Tests/X11/CMakeLists.txt +++ b/Tests/X11/CMakeLists.txt @@ -1,40 +1,40 @@ # a simple C only test case cmake_minimum_required (VERSION 2.6) -PROJECT (UseX11 CXX C) +project (UseX11 CXX C) -INCLUDE (${CMAKE_ROOT}/Modules/FindX11.cmake) -MESSAGE("X11_FOUND: ${X11_FOUND}") +include (${CMAKE_ROOT}/Modules/FindX11.cmake) +message("X11_FOUND: ${X11_FOUND}") -ADD_EXECUTABLE (UseX11 X11.c) +add_executable (UseX11 X11.c) install(TARGETS UseX11 DESTINATION bin) # so for universal binaries this test will fail if # -IF(APPLE) - LIST(LENGTH CMAKE_OSX_ARCHITECTURES NUMARCH) - IF(NUMARCH GREATER 1) - IF(NOT EXISTS /usr/X11R6/lib//libSM.6.dylib) - SET(X11_FOUND FALSE) - MESSAGE("disable X11, because of universal binary and sysroot") - ENDIF(NOT EXISTS /usr/X11R6/lib//libSM.6.dylib) - ENDIF(NUMARCH GREATER 1) -ENDIF(APPLE) +if(APPLE) + list(LENGTH CMAKE_OSX_ARCHITECTURES NUMARCH) + if(NUMARCH GREATER 1) + if(NOT EXISTS /usr/X11R6/lib//libSM.6.dylib) + set(X11_FOUND FALSE) + message("disable X11, because of universal binary and sysroot") + endif(NOT EXISTS /usr/X11R6/lib//libSM.6.dylib) + endif(NUMARCH GREATER 1) +endif(APPLE) -IF(X11_FOUND) - ADD_DEFINITIONS(-DCMAKE_HAS_X) - INCLUDE_DIRECTORIES(${X11_INCLUDE_DIR}) - TARGET_LINK_LIBRARIES(UseX11 ${X11_LIBRARIES}) - IF(APPLE) - ADD_EXECUTABLE(HelloWorldX11 HelloWorldX11.cxx) - TARGET_LINK_LIBRARIES(HelloWorldX11 ${X11_LIBRARIES}) +if(X11_FOUND) + add_definitions(-DCMAKE_HAS_X) + include_directories(${X11_INCLUDE_DIR}) + target_link_libraries(UseX11 ${X11_LIBRARIES}) + if(APPLE) + add_executable(HelloWorldX11 HelloWorldX11.cxx) + target_link_libraries(HelloWorldX11 ${X11_LIBRARIES}) install(TARGETS HelloWorldX11 DESTINATION bin) set(CPACK_BINARY_OSXX11 ON CACHE BOOL "" FORCE) set(CPACK_BINARY_PACKAGEMAKER OFF CACHE BOOL "" FORCE ) set(CPACK_PACKAGE_NAME HelloWorldX11Package) set(CPACK_PACKAGE_EXECUTABLES HelloWorldX11 HelloWorldX11) - ENDIF(APPLE) -ENDIF(X11_FOUND) + endif(APPLE) +endif(X11_FOUND) # build a CPack driven installer package include(CPack) |