summaryrefslogtreecommitdiff
path: root/Tests/BundleTest
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 13:47:32 -0400
committerBrad King <brad.king@kitware.com>2012-08-13 14:19:16 -0400
commit77543bde41b0e52c3959016698b529835945d62d (patch)
treeff63e5fbec326c4a5d821e7496c6d2cb52f75b92 /Tests/BundleTest
parent7bbaa4283de26864b2e55e819db0884771585467 (diff)
downloadcmake-77543bde41b0e52c3959016698b529835945d62d.tar.gz
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/BundleTest')
-rw-r--r--Tests/BundleTest/BundleSubDir/CMakeLists.txt14
-rw-r--r--Tests/BundleTest/CMakeLists.txt100
2 files changed, 57 insertions, 57 deletions
diff --git a/Tests/BundleTest/BundleSubDir/CMakeLists.txt b/Tests/BundleTest/BundleSubDir/CMakeLists.txt
index 322b2a7d2f..1921ce0950 100644
--- a/Tests/BundleTest/BundleSubDir/CMakeLists.txt
+++ b/Tests/BundleTest/BundleSubDir/CMakeLists.txt
@@ -1,36 +1,36 @@
-ADD_CUSTOM_COMMAND(
+add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist"
COMMAND /bin/cp
ARGS "${BundleTest_SOURCE_DIR}/randomResourceFile.plist.in"
"${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist")
-SET_SOURCE_FILES_PROPERTIES(
+set_source_files_properties(
"${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist"
PROPERTIES
MACOSX_PACKAGE_LOCATION Resources
)
-SET_SOURCE_FILES_PROPERTIES(
+set_source_files_properties(
"${BundleTest_SOURCE_DIR}/SomeRandomFile.txt"
"${BundleTest_SOURCE_DIR}/../../ChangeLog.txt"
PROPERTIES
MACOSX_PACKAGE_LOCATION MacOS
)
-ADD_EXECUTABLE(SecondBundle
+add_executable(SecondBundle
MACOSX_BUNDLE
"${BundleTest_SOURCE_DIR}/BundleTest.cxx"
"${BundleTest_SOURCE_DIR}/SomeRandomFile.txt"
"${BundleTest_SOURCE_DIR}/../../ChangeLog.txt"
"${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist"
)
-TARGET_LINK_LIBRARIES(SecondBundle BundleTestLib)
+target_link_libraries(SecondBundle BundleTestLib)
# Test bundle installation.
-INSTALL(TARGETS SecondBundle DESTINATION Applications)
+install(TARGETS SecondBundle DESTINATION Applications)
# Test whether bundles respect the output name. Since the library is
# installed into a location that uses this output name this will fail if the
# bundle does not respect the name. Also the executable will not be found by
# the test driver if this does not work.
-SET_TARGET_PROPERTIES(SecondBundle PROPERTIES OUTPUT_NAME SecondBundleExe)
+set_target_properties(SecondBundle PROPERTIES OUTPUT_NAME SecondBundleExe)
diff --git a/Tests/BundleTest/CMakeLists.txt b/Tests/BundleTest/CMakeLists.txt
index 5342f49bd7..4fb65bfa6b 100644
--- a/Tests/BundleTest/CMakeLists.txt
+++ b/Tests/BundleTest/CMakeLists.txt
@@ -1,28 +1,28 @@
cmake_minimum_required (VERSION 2.6)
-PROJECT(BundleTest)
-SET(MACOSX_BUNDLE_INFO_STRING "bundle_info_string")
-SET(CMAKE_MacOSX_Content_COMPILE_OBJECT "\"${CMAKE_COMMAND}\" -E copy_if_different <SOURCE> <OBJECT>")
+project(BundleTest)
+set(MACOSX_BUNDLE_INFO_STRING "bundle_info_string")
+set(CMAKE_MacOSX_Content_COMPILE_OBJECT "\"${CMAKE_COMMAND}\" -E copy_if_different <SOURCE> <OBJECT>")
-ADD_CUSTOM_COMMAND(
+add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist"
COMMAND /bin/cp
ARGS "${CMAKE_CURRENT_SOURCE_DIR}/randomResourceFile.plist.in"
"${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist")
-SET_SOURCE_FILES_PROPERTIES(
+set_source_files_properties(
"${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist"
PROPERTIES
MACOSX_PACKAGE_LOCATION Resources
)
-SET_SOURCE_FILES_PROPERTIES(
+set_source_files_properties(
SomeRandomFile.txt
"${BundleTest_SOURCE_DIR}/../../ChangeLog.txt"
PROPERTIES
MACOSX_PACKAGE_LOCATION MacOS
)
-SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}/foobar")
+set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}/foobar")
# Test building a bundle linking to a shared library where the
# shared library links to CoreFoundation, but the executable does not
@@ -31,74 +31,74 @@ SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}/foobar")
# if CMake's dependency chaining for libraries with "-framework
# blah" style dependencies gets broken...
#
-ADD_LIBRARY(BundleTestLib SHARED BundleLib.cxx)
-TARGET_LINK_LIBRARIES(BundleTestLib "-framework CoreFoundation")
+add_library(BundleTestLib SHARED BundleLib.cxx)
+target_link_libraries(BundleTestLib "-framework CoreFoundation")
-ADD_EXECUTABLE(BundleTest
+add_executable(BundleTest
MACOSX_BUNDLE
BundleTest.cxx
SomeRandomFile.txt
"${BundleTest_SOURCE_DIR}/../../ChangeLog.txt"
"${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist"
)
-TARGET_LINK_LIBRARIES(BundleTest BundleTestLib)
+target_link_libraries(BundleTest BundleTestLib)
#
-# DO NOT: TARGET_LINK_LIBRARIES(BundleTest "-framework CoreFoundation")
+# DO NOT: target_link_libraries(BundleTest "-framework CoreFoundation")
# (see above comments about CoreFoundation)
#
# Test bundle installation.
-#INSTALL(TARGETS BundleTestLib DESTINATION Applications/BundleTestExe.app/Contents/Plugins)
-INSTALL(TARGETS BundleTestLib DESTINATION Applications/SecondBundleExe.app/Contents/Plugins)
-INSTALL(TARGETS BundleTest DESTINATION Applications)
+#install(TARGETS BundleTestLib DESTINATION Applications/BundleTestExe.app/Contents/Plugins)
+install(TARGETS BundleTestLib DESTINATION Applications/SecondBundleExe.app/Contents/Plugins)
+install(TARGETS BundleTest DESTINATION Applications)
# Test whether bundles respect the output name. Since the library is
# installed into a location that uses this output name this will fail if the
# bundle does not respect the name. Also the executable will not be found by
# the test driver if this does not work.
-SET_TARGET_PROPERTIES(BundleTest PROPERTIES OUTPUT_NAME BundleTestExe)
+set_target_properties(BundleTest PROPERTIES OUTPUT_NAME BundleTestExe)
# Test executable versioning if it is supported.
-IF(NOT XCODE)
- SET_TARGET_PROPERTIES(BundleTest PROPERTIES VERSION 1)
-ENDIF(NOT XCODE)
+if(NOT XCODE)
+ set_target_properties(BundleTest PROPERTIES VERSION 1)
+endif(NOT XCODE)
# Make sure the executable can find its installed library.
-SET_TARGET_PROPERTIES(BundleTestLib PROPERTIES
+set_target_properties(BundleTestLib PROPERTIES
INSTALL_NAME_DIR "@executable_path/../Plugins")
-INCLUDE(CPack)
+include(CPack)
# test the framework find stuff
-IF(EXISTS /usr/lib/libtcl.dylib
+if(EXISTS /usr/lib/libtcl.dylib
AND EXISTS /System/Library/Frameworks/Tcl.framework)
- SET(TCL NOTFOUND)
- FIND_LIBRARY(TCL tcl)
- MESSAGE("frame: ${TCL}")
- IF(NOT "${TCL}" MATCHES .framework)
- MESSAGE(FATAL_ERROR "Could not find tcl framework, found ${TCL}")
- ENDIF(NOT "${TCL}" MATCHES .framework)
- SET(TCL NOTFOUND)
- SET(CMAKE_FIND_FRAMEWORK LAST)
- FIND_LIBRARY(TCL tcl)
- IF("${TCL}" MATCHES .framework)
- MESSAGE(FATAL_ERROR "Found framework and should have found dylib ${TCL}")
- ENDIF("${TCL}" MATCHES .framework)
- SET(TCL NOTFOUND)
- SET(CMAKE_FIND_FRAMEWORK NEVER)
- FIND_LIBRARY(TCL tcl)
- IF("${TCL}" MATCHES .framework)
- MESSAGE(FATAL_ERROR "Found framework and should have found dylib ${TCL}")
- ENDIF("${TCL}" MATCHES .framework)
- MESSAGE("not frame: ${TCL}")
- SET(TCL NOTFOUND)
- SET(CMAKE_FIND_FRAMEWORK FIRST)
- FIND_LIBRARY(TCL tcl)
- IF(NOT "${TCL}" MATCHES .framework)
- MESSAGE(FATAL_ERROR "Could not find tcl framework, found ${TCL}")
- ENDIF(NOT "${TCL}" MATCHES .framework)
- MESSAGE("frame: ${TCL}")
-ENDIF(EXISTS /usr/lib/libtcl.dylib
+ set(TCL NOTFOUND)
+ find_library(TCL tcl)
+ message("frame: ${TCL}")
+ if(NOT "${TCL}" MATCHES .framework)
+ message(FATAL_ERROR "Could not find tcl framework, found ${TCL}")
+ endif(NOT "${TCL}" MATCHES .framework)
+ set(TCL NOTFOUND)
+ set(CMAKE_FIND_FRAMEWORK LAST)
+ find_library(TCL tcl)
+ if("${TCL}" MATCHES .framework)
+ message(FATAL_ERROR "Found framework and should have found dylib ${TCL}")
+ endif("${TCL}" MATCHES .framework)
+ set(TCL NOTFOUND)
+ set(CMAKE_FIND_FRAMEWORK NEVER)
+ find_library(TCL tcl)
+ if("${TCL}" MATCHES .framework)
+ message(FATAL_ERROR "Found framework and should have found dylib ${TCL}")
+ endif("${TCL}" MATCHES .framework)
+ message("not frame: ${TCL}")
+ set(TCL NOTFOUND)
+ set(CMAKE_FIND_FRAMEWORK FIRST)
+ find_library(TCL tcl)
+ if(NOT "${TCL}" MATCHES .framework)
+ message(FATAL_ERROR "Could not find tcl framework, found ${TCL}")
+ endif(NOT "${TCL}" MATCHES .framework)
+ message("frame: ${TCL}")
+endif(EXISTS /usr/lib/libtcl.dylib
AND EXISTS /System/Library/Frameworks/Tcl.framework)
-SUBDIRS(BundleSubDir)
+subdirs(BundleSubDir)