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 /Modules/Platform/Generic-SDCC-C.cmake | |
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 'Modules/Platform/Generic-SDCC-C.cmake')
-rw-r--r-- | Modules/Platform/Generic-SDCC-C.cmake | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/Modules/Platform/Generic-SDCC-C.cmake b/Modules/Platform/Generic-SDCC-C.cmake index 6c36445..fc7eb42 100644 --- a/Modules/Platform/Generic-SDCC-C.cmake +++ b/Modules/Platform/Generic-SDCC-C.cmake @@ -4,51 +4,51 @@ # To use it either a toolchain file is required or cmake has to be run like this: # cmake -DCMAKE_C_COMPILER=sdcc -DCMAKE_SYSTEM_NAME=Generic <dir...> # Since sdcc doesn't support C++, C++ support should be disabled in the -# CMakeLists.txt using the PROJECT() command: -# PROJECT(my_project C) +# CMakeLists.txt using the project() command: +# project(my_project C) -SET(CMAKE_STATIC_LIBRARY_PREFIX "") -SET(CMAKE_STATIC_LIBRARY_SUFFIX ".lib") -SET(CMAKE_SHARED_LIBRARY_PREFIX "") # lib -SET(CMAKE_SHARED_LIBRARY_SUFFIX ".lib") # .so -SET(CMAKE_IMPORT_LIBRARY_PREFIX ) -SET(CMAKE_IMPORT_LIBRARY_SUFFIX ) -SET(CMAKE_EXECUTABLE_SUFFIX ".ihx") # intel hex file -SET(CMAKE_LINK_LIBRARY_SUFFIX ".lib") -SET(CMAKE_DL_LIBS "") +set(CMAKE_STATIC_LIBRARY_PREFIX "") +set(CMAKE_STATIC_LIBRARY_SUFFIX ".lib") +set(CMAKE_SHARED_LIBRARY_PREFIX "") # lib +set(CMAKE_SHARED_LIBRARY_SUFFIX ".lib") # .so +set(CMAKE_IMPORT_LIBRARY_PREFIX ) +set(CMAKE_IMPORT_LIBRARY_SUFFIX ) +set(CMAKE_EXECUTABLE_SUFFIX ".ihx") # intel hex file +set(CMAKE_LINK_LIBRARY_SUFFIX ".lib") +set(CMAKE_DL_LIBS "") -SET(CMAKE_C_OUTPUT_EXTENSION ".rel") +set(CMAKE_C_OUTPUT_EXTENSION ".rel") # find sdcclib as CMAKE_AR # since cmake may already have searched for "ar", sdcclib has to # be searched with a different variable name (SDCCLIB_EXECUTABLE) # and must then be forced into the cache -GET_FILENAME_COMPONENT(SDCC_LOCATION "${CMAKE_C_COMPILER}" PATH) -FIND_PROGRAM(SDCCLIB_EXECUTABLE sdcclib PATHS "${SDCC_LOCATION}" NO_DEFAULT_PATH) -FIND_PROGRAM(SDCCLIB_EXECUTABLE sdcclib) -SET(CMAKE_AR "${SDCCLIB_EXECUTABLE}" CACHE FILEPATH "The sdcc librarian" FORCE) +get_filename_component(SDCC_LOCATION "${CMAKE_C_COMPILER}" PATH) +find_program(SDCCLIB_EXECUTABLE sdcclib PATHS "${SDCC_LOCATION}" NO_DEFAULT_PATH) +find_program(SDCCLIB_EXECUTABLE sdcclib) +set(CMAKE_AR "${SDCCLIB_EXECUTABLE}" CACHE FILEPATH "The sdcc librarian" FORCE) # CMAKE_C_FLAGS_INIT and CMAKE_EXE_LINKER_FLAGS_INIT should be set in a CMAKE_SYSTEM_PROCESSOR file -IF(NOT DEFINED CMAKE_C_FLAGS_INIT) - SET(CMAKE_C_FLAGS_INIT "-mmcs51 --model-small") -ENDIF(NOT DEFINED CMAKE_C_FLAGS_INIT) +if(NOT DEFINED CMAKE_C_FLAGS_INIT) + set(CMAKE_C_FLAGS_INIT "-mmcs51 --model-small") +endif(NOT DEFINED CMAKE_C_FLAGS_INIT) -IF(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_INIT) - SET (CMAKE_EXE_LINKER_FLAGS_INIT --model-small) -ENDIF(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_INIT) +if(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_INIT) + set (CMAKE_EXE_LINKER_FLAGS_INIT --model-small) +endif(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_INIT) # compile a C file into an object file -SET(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>") +set(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>") # link object files to an executable -SET(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS> <OBJECTS> --out-fmt-ihx -o <TARGET> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>") +set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS> <OBJECTS> --out-fmt-ihx -o <TARGET> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>") # needs sdcc 2.7.0 + sddclib from cvs -SET(CMAKE_C_CREATE_STATIC_LIBRARY +set(CMAKE_C_CREATE_STATIC_LIBRARY "\"${CMAKE_COMMAND}\" -E remove <TARGET>" "<CMAKE_AR> -a <TARGET> <LINK_FLAGS> <OBJECTS> ") # not supported by sdcc -SET(CMAKE_C_CREATE_SHARED_LIBRARY "") -SET(CMAKE_C_CREATE_MODULE_LIBRARY "") +set(CMAKE_C_CREATE_SHARED_LIBRARY "") +set(CMAKE_C_CREATE_MODULE_LIBRARY "") |