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/Wrapping | |
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/Wrapping')
-rw-r--r-- | Tests/Wrapping/CMakeLists.txt | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/Tests/Wrapping/CMakeLists.txt b/Tests/Wrapping/CMakeLists.txt index 5f441dd..344b11d 100644 --- a/Tests/Wrapping/CMakeLists.txt +++ b/Tests/Wrapping/CMakeLists.txt @@ -2,82 +2,82 @@ # Wrapping # cmake_minimum_required (VERSION 2.6) -PROJECT (Wrapping) +project (Wrapping) # Disable cleaning of custom command outputs to preserve the hacks # used to generate the files using CONFIGURE_FILE. -SET_DIRECTORY_PROPERTIES(PROPERTIES CLEAN_NO_CUSTOM 1) +set_directory_properties(PROPERTIES CLEAN_NO_CUSTOM 1) # # Lib and exe path # -SET (LIBRARY_OUTPUT_PATH +set (LIBRARY_OUTPUT_PATH ${Wrapping_BINARY_DIR}/bin/ CACHE INTERNAL "Single output directory for building all libraries.") -SET (EXECUTABLE_OUTPUT_PATH +set (EXECUTABLE_OUTPUT_PATH ${Wrapping_BINARY_DIR}/bin/ CACHE INTERNAL "Single output directory for building all executables.") # # Where will executable tests be written ? # -IF (EXECUTABLE_OUTPUT_PATH) - SET (CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH}) -ELSE (EXECUTABLE_OUTPUT_PATH) - SET (CXX_TEST_PATH .) -ENDIF (EXECUTABLE_OUTPUT_PATH) +if (EXECUTABLE_OUTPUT_PATH) + set (CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH}) +else (EXECUTABLE_OUTPUT_PATH) + set (CXX_TEST_PATH .) +endif (EXECUTABLE_OUTPUT_PATH) # # Add exe # -ADD_EXECUTABLE (wrapping wrapping.cxx) +add_executable (wrapping wrapping.cxx) -ADD_EXECUTABLE (Wrap Wrap.c) -IF(WIN32) - SET(EXE_EXT ".exe") -ENDIF(WIN32) -SET(WRAP ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/Wrap${EXE_EXT}) +add_executable (Wrap Wrap.c) +if(WIN32) + set(EXE_EXT ".exe") +endif(WIN32) +set(WRAP ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/Wrap${EXE_EXT}) # # QT Wrappers # -SET (QT_WRAP_CPP "On") -SET (QT_MOC_EXE "echo") -INCLUDE( FindQt3 ) +set (QT_WRAP_CPP "On") +set (QT_MOC_EXE "echo") +include( FindQt3 ) -IF (QT_FOUND AND QT_WRAP_UI) +if (QT_FOUND AND QT_WRAP_UI) message("found qt 3 test it...") - INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR} ) - INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ) + include_directories( ${QT_INCLUDE_DIR} ) + include_directories( ${CMAKE_CURRENT_BINARY_DIR} ) - CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/foo.ui.in + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/foo.ui.in ${CMAKE_CURRENT_BINARY_DIR}/foo.ui IMMEDIATE) - SET (QT_WRAP_UI "On") - SET (QT_UIC_EXE "${QT_UIC_EXECUTABLE}") + set (QT_WRAP_UI "On") + set (QT_UIC_EXE "${QT_UIC_EXECUTABLE}") - SET (QTUI_SRCS + set (QTUI_SRCS qtwrapping.ui ${CMAKE_CURRENT_BINARY_DIR}/foo.ui ) - QT_WRAP_UI (myqtlib QTUI_H_SRCS QTUI_S_SRCS ${QTUI_SRCS}) - QT_WRAP_CPP (myqtlib QT_MOC_SRCS ${SRCS} vtkTestMoc.h) + qt_wrap_ui (myqtlib QTUI_H_SRCS QTUI_S_SRCS ${QTUI_SRCS}) + qt_wrap_cpp (myqtlib QT_MOC_SRCS ${SRCS} vtkTestMoc.h) - MESSAGE("QT files are ${QTUI_S_SRCS}") - MESSAGE("QT other files are ${QTUI_H_SRCS}") - ADD_DEFINITIONS(${QT_DEFINITIONS}) - ADD_LIBRARY(myqtlib ${QTUI_S_SRCS} ${QT_MOC_SRCS}) - ADD_EXECUTABLE (qtwrapping qtwrappingmain.cxx) - TARGET_LINK_LIBRARIES(qtwrapping myqtlib) + message("QT files are ${QTUI_S_SRCS}") + message("QT other files are ${QTUI_H_SRCS}") + add_definitions(${QT_DEFINITIONS}) + add_library(myqtlib ${QTUI_S_SRCS} ${QT_MOC_SRCS}) + add_executable (qtwrapping qtwrappingmain.cxx) + target_link_libraries(qtwrapping myqtlib) - TARGET_LINK_LIBRARIES( qtwrapping ${QT_LIBRARIES} ) -ELSE (QT_FOUND AND QT_WRAP_UI) - ADD_EXECUTABLE (qtwrapping qtnoqtmain.cxx) -ENDIF (QT_FOUND AND QT_WRAP_UI) + target_link_libraries( qtwrapping ${QT_LIBRARIES} ) +else (QT_FOUND AND QT_WRAP_UI) + add_executable (qtwrapping qtnoqtmain.cxx) +endif (QT_FOUND AND QT_WRAP_UI) # # FLTK Wrappers @@ -85,23 +85,23 @@ ENDIF (QT_FOUND AND QT_WRAP_UI) # Since FLTK_FLUID_EXE is supposed to create a .cxx/.h from a .fl/.fld, # create an empty one so that the dependencies can be met. # -SET (FLTK_SRCS +set (FLTK_SRCS fltk1.fl ) -ADD_EXECUTABLE(fakefluid fakefluid.cxx) -GET_TARGET_PROPERTY(FLUID_LOC fakefluid LOCATION) -SET (FLTK_WRAP_UI "On") -SET (FLTK_FLUID_EXECUTABLE "${FLUID_LOC}") -FLTK_WRAP_UI (wraplibFLTK ${FLTK_SRCS}) -ADD_LIBRARY(wraplibFLTK ${wraplibFLTK_FLTK_UI_SRCS}) -ADD_DEPENDENCIES(wraplibFLTK fakefluid) -ADD_DEPENDENCIES(fakefluid Wrap) +add_executable(fakefluid fakefluid.cxx) +get_target_property(FLUID_LOC fakefluid LOCATION) +set (FLTK_WRAP_UI "On") +set (FLTK_FLUID_EXECUTABLE "${FLUID_LOC}") +fltk_wrap_ui (wraplibFLTK ${FLTK_SRCS}) +add_library(wraplibFLTK ${wraplibFLTK_FLTK_UI_SRCS}) +add_dependencies(wraplibFLTK fakefluid) +add_dependencies(fakefluid Wrap) # # Mangled Mesa # -CONFIGURE_FILE( +configure_file( ${Wrapping_SOURCE_DIR}/dummy ${Wrapping_BINARY_DIR}/gl.h COPYONLY IMMEDIATE) -USE_MANGLED_MESA (${Wrapping_BINARY_DIR} ${Wrapping_BINARY_DIR}/mangled_mesa) +use_mangled_mesa (${Wrapping_BINARY_DIR} ${Wrapping_BINARY_DIR}/mangled_mesa) |