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/SwigTest | |
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/SwigTest')
-rw-r--r-- | Tests/SwigTest/CMakeLists.txt | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/Tests/SwigTest/CMakeLists.txt b/Tests/SwigTest/CMakeLists.txt index 7e21644..b3017f1 100644 --- a/Tests/SwigTest/CMakeLists.txt +++ b/Tests/SwigTest/CMakeLists.txt @@ -1,50 +1,50 @@ -SET(language "python") +set(language "python") cmake_minimum_required (VERSION 2.6) -PROJECT(example_${language}_class) +project(example_${language}_class) -FIND_PACKAGE(SWIG REQUIRED) -INCLUDE(${SWIG_USE_FILE}) +find_package(SWIG REQUIRED) +include(${SWIG_USE_FILE}) -IF(${language} MATCHES python) - FIND_PACKAGE(PythonLibs) - INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) - SET(SWIG_LANG_LIBRARIES ${PYTHON_LIBRARIES}) -ENDIF(${language} MATCHES python) -IF(${language} MATCHES perl) - FIND_PACKAGE(PerlLibs) - INCLUDE_DIRECTORIES(${PERL_INCLUDE_PATH}) - ADD_DEFINITIONS(${PERL_EXTRA_C_FLAGS}) - SET(SWIG_LANG_LIBRARIES ${PERL_LIBRARY}) -ENDIF(${language} MATCHES perl) -IF(${language} MATCHES tcl) - FIND_PACKAGE(TCL) - INCLUDE_DIRECTORIES(${TCL_INCLUDE_PATH}) - SET(SWIG_LANG_LIBRARIES ${TCL_LIBRARY}) -ENDIF(${language} MATCHES tcl) -IF(${language} MATCHES ruby) - FIND_PACKAGE(Ruby) - INCLUDE_DIRECTORIES(${RUBY_INCLUDE_PATH}) - SET(SWIG_LANG_LIBRARIES ${RUBY_LIBRARY}) -ENDIF(${language} MATCHES ruby) -IF(${language} MATCHES php4) - FIND_PACKAGE(PHP4) - INCLUDE_DIRECTORIES(${PHP4_INCLUDE_PATH}) - SET(SWIG_LANG_LIBRARIES ${PHP4_LIBRARY}) -ENDIF(${language} MATCHES php4) -IF(${language} MATCHES pike) - FIND_PACKAGE(Pike) - INCLUDE_DIRECTORIES(${PIKE_INCLUDE_PATH}) - SET(SWIG_LANG_LIBRARIES ${PIKE_LIBRARY}) -ENDIF(${language} MATCHES pike) +if(${language} MATCHES python) + find_package(PythonLibs) + include_directories(${PYTHON_INCLUDE_PATH}) + set(SWIG_LANG_LIBRARIES ${PYTHON_LIBRARIES}) +endif(${language} MATCHES python) +if(${language} MATCHES perl) + find_package(PerlLibs) + include_directories(${PERL_INCLUDE_PATH}) + add_definitions(${PERL_EXTRA_C_FLAGS}) + set(SWIG_LANG_LIBRARIES ${PERL_LIBRARY}) +endif(${language} MATCHES perl) +if(${language} MATCHES tcl) + find_package(TCL) + include_directories(${TCL_INCLUDE_PATH}) + set(SWIG_LANG_LIBRARIES ${TCL_LIBRARY}) +endif(${language} MATCHES tcl) +if(${language} MATCHES ruby) + find_package(Ruby) + include_directories(${RUBY_INCLUDE_PATH}) + set(SWIG_LANG_LIBRARIES ${RUBY_LIBRARY}) +endif(${language} MATCHES ruby) +if(${language} MATCHES php4) + find_package(PHP4) + include_directories(${PHP4_INCLUDE_PATH}) + set(SWIG_LANG_LIBRARIES ${PHP4_LIBRARY}) +endif(${language} MATCHES php4) +if(${language} MATCHES pike) + find_package(Pike) + include_directories(${PIKE_INCLUDE_PATH}) + set(SWIG_LANG_LIBRARIES ${PIKE_LIBRARY}) +endif(${language} MATCHES pike) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -SET(CMAKE_SWIG_FLAGS "") +set(CMAKE_SWIG_FLAGS "") -SET_SOURCE_FILES_PROPERTIES(example.i PROPERTIES CPLUSPLUS ON) -SET_SOURCE_FILES_PROPERTIES(example.i PROPERTIES SWIG_FLAGS "-includeall") +set_source_files_properties(example.i PROPERTIES CPLUSPLUS ON) +set_source_files_properties(example.i PROPERTIES SWIG_FLAGS "-includeall") SWIG_ADD_MODULE(example "${language}" example.i example.cxx) SWIG_LINK_LIBRARIES(example ${SWIG_LANG_LIBRARIES}) |