summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Generic-ADSP-Common.cmake
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 17:47:32 (GMT)
committerBrad King <brad.king@kitware.com>2012-08-13 18:19:16 (GMT)
commit77543bde41b0e52c3959016698b529835945d62d (patch)
treeff63e5fbec326c4a5d821e7496c6d2cb52f75b92 /Modules/Platform/Generic-ADSP-Common.cmake
parent7bbaa4283de26864b2e55e819db0884771585467 (diff)
downloadCMake-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-ADSP-Common.cmake')
-rw-r--r--Modules/Platform/Generic-ADSP-Common.cmake130
1 files changed, 65 insertions, 65 deletions
diff --git a/Modules/Platform/Generic-ADSP-Common.cmake b/Modules/Platform/Generic-ADSP-Common.cmake
index 14b92e9..9120eed 100644
--- a/Modules/Platform/Generic-ADSP-Common.cmake
+++ b/Modules/Platform/Generic-ADSP-Common.cmake
@@ -6,115 +6,115 @@
# TS (TigerShark)
# 21k (Sharc 21xxx)
-IF(NOT ADSP)
+if(NOT ADSP)
- SET(ADSP TRUE)
+ set(ADSP TRUE)
- SET(CMAKE_STATIC_LIBRARY_SUFFIX ".dlb")
- SET(CMAKE_SHARED_LIBRARY_SUFFIX "")
- SET(CMAKE_EXECUTABLE_SUFFIX ".dxe")
+ set(CMAKE_STATIC_LIBRARY_SUFFIX ".dlb")
+ set(CMAKE_SHARED_LIBRARY_SUFFIX "")
+ set(CMAKE_EXECUTABLE_SUFFIX ".dxe")
# if ADSP_PROCESSOR has not been set, but CMAKE_SYSTEM_PROCESSOR has,
# assume that this is the processor name to use for the compiler
- IF(CMAKE_SYSTEM_PROCESSOR AND NOT ADSP_PROCESSOR)
- SET(ADSP_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR})
- ENDIF(CMAKE_SYSTEM_PROCESSOR AND NOT ADSP_PROCESSOR)
+ if(CMAKE_SYSTEM_PROCESSOR AND NOT ADSP_PROCESSOR)
+ set(ADSP_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR})
+ endif(CMAKE_SYSTEM_PROCESSOR AND NOT ADSP_PROCESSOR)
# if ADSP_PROCESSOR_SILICIUM_REVISION has not been set, use "none"
- IF(NOT ADSP_PROCESSOR_SILICIUM_REVISION)
- SET(ADSP_PROCESSOR_SILICIUM_REVISION "none")
- ENDIF(NOT ADSP_PROCESSOR_SILICIUM_REVISION)
+ if(NOT ADSP_PROCESSOR_SILICIUM_REVISION)
+ set(ADSP_PROCESSOR_SILICIUM_REVISION "none")
+ endif(NOT ADSP_PROCESSOR_SILICIUM_REVISION)
# this file is included from the C and CXX files, so handle both here
- GET_FILENAME_COMPONENT(_ADSP_DIR "${CMAKE_C_COMPILER}" PATH)
- IF(NOT _ADSP_DIR)
- GET_FILENAME_COMPONENT(_ADSP_DIR "${CMAKE_CXX_COMPILER}" PATH)
- ENDIF(NOT _ADSP_DIR)
- IF(NOT _ADSP_DIR)
- GET_FILENAME_COMPONENT(_ADSP_DIR "${CMAKE_ASM_COMPILER}" PATH)
- ENDIF(NOT _ADSP_DIR)
+ get_filename_component(_ADSP_DIR "${CMAKE_C_COMPILER}" PATH)
+ if(NOT _ADSP_DIR)
+ get_filename_component(_ADSP_DIR "${CMAKE_CXX_COMPILER}" PATH)
+ endif(NOT _ADSP_DIR)
+ if(NOT _ADSP_DIR)
+ get_filename_component(_ADSP_DIR "${CMAKE_ASM_COMPILER}" PATH)
+ endif(NOT _ADSP_DIR)
# detect architecture
- IF(CMAKE_C_COMPILER MATCHES ccblkfn OR CMAKE_CXX_COMPILER MATCHES ccblkfn OR CMAKE_ASM_COMPILER MATCHES easmBLKFN)
- IF(NOT ADSP_PROCESSOR)
- SET(ADSP_PROCESSOR "ADSP-BF561")
- ENDIF(NOT ADSP_PROCESSOR)
- SET(ADSP_BLACKFIN TRUE)
- SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/Blackfin")
- ENDIF(CMAKE_C_COMPILER MATCHES ccblkfn OR CMAKE_CXX_COMPILER MATCHES ccblkfn OR CMAKE_ASM_COMPILER MATCHES easmBLKFN)
+ if(CMAKE_C_COMPILER MATCHES ccblkfn OR CMAKE_CXX_COMPILER MATCHES ccblkfn OR CMAKE_ASM_COMPILER MATCHES easmBLKFN)
+ if(NOT ADSP_PROCESSOR)
+ set(ADSP_PROCESSOR "ADSP-BF561")
+ endif(NOT ADSP_PROCESSOR)
+ set(ADSP_BLACKFIN TRUE)
+ set(_ADSP_FAMILY_DIR "${_ADSP_DIR}/Blackfin")
+ endif(CMAKE_C_COMPILER MATCHES ccblkfn OR CMAKE_CXX_COMPILER MATCHES ccblkfn OR CMAKE_ASM_COMPILER MATCHES easmBLKFN)
- IF(CMAKE_C_COMPILER MATCHES ccts OR CMAKE_CXX_COMPILER MATCHES ccts OR CMAKE_ASM_COMPILER MATCHES easmTS)
- IF(NOT ADSP_PROCESSOR)
- SET(ADSP_PROCESSOR "ADSP-TS101")
- ENDIF(NOT ADSP_PROCESSOR)
- SET(ADSP_TS TRUE)
- SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/TS")
- ENDIF(CMAKE_C_COMPILER MATCHES ccts OR CMAKE_CXX_COMPILER MATCHES ccts OR CMAKE_ASM_COMPILER MATCHES easmTS)
+ if(CMAKE_C_COMPILER MATCHES ccts OR CMAKE_CXX_COMPILER MATCHES ccts OR CMAKE_ASM_COMPILER MATCHES easmTS)
+ if(NOT ADSP_PROCESSOR)
+ set(ADSP_PROCESSOR "ADSP-TS101")
+ endif(NOT ADSP_PROCESSOR)
+ set(ADSP_TS TRUE)
+ set(_ADSP_FAMILY_DIR "${_ADSP_DIR}/TS")
+ endif(CMAKE_C_COMPILER MATCHES ccts OR CMAKE_CXX_COMPILER MATCHES ccts OR CMAKE_ASM_COMPILER MATCHES easmTS)
- IF(CMAKE_C_COMPILER MATCHES cc21k OR CMAKE_CXX_COMPILER MATCHES cc21k OR CMAKE_ASM_COMPILER MATCHES easm21k)
- IF(NOT ADSP_PROCESSOR)
- SET(ADSP_PROCESSOR "ADSP-21060")
- ENDIF(NOT ADSP_PROCESSOR)
- SET(ADSP_21K TRUE)
+ if(CMAKE_C_COMPILER MATCHES cc21k OR CMAKE_CXX_COMPILER MATCHES cc21k OR CMAKE_ASM_COMPILER MATCHES easm21k)
+ if(NOT ADSP_PROCESSOR)
+ set(ADSP_PROCESSOR "ADSP-21060")
+ endif(NOT ADSP_PROCESSOR)
+ set(ADSP_21K TRUE)
- SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/21k") # default if nothing matches
- IF (ADSP_PROCESSOR MATCHES "210..$")
- SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/21k")
- ENDIF(ADSP_PROCESSOR MATCHES "210..$")
+ set(_ADSP_FAMILY_DIR "${_ADSP_DIR}/21k") # default if nothing matches
+ if (ADSP_PROCESSOR MATCHES "210..$")
+ set(_ADSP_FAMILY_DIR "${_ADSP_DIR}/21k")
+ endif(ADSP_PROCESSOR MATCHES "210..$")
- IF (ADSP_PROCESSOR MATCHES "211..$")
- SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/211k")
- ENDIF(ADSP_PROCESSOR MATCHES "211..$")
+ if (ADSP_PROCESSOR MATCHES "211..$")
+ set(_ADSP_FAMILY_DIR "${_ADSP_DIR}/211k")
+ endif(ADSP_PROCESSOR MATCHES "211..$")
- IF (ADSP_PROCESSOR MATCHES "212..$")
- SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/212k")
- ENDIF(ADSP_PROCESSOR MATCHES "212..$")
+ if (ADSP_PROCESSOR MATCHES "212..$")
+ set(_ADSP_FAMILY_DIR "${_ADSP_DIR}/212k")
+ endif(ADSP_PROCESSOR MATCHES "212..$")
- IF (ADSP_PROCESSOR MATCHES "213..$")
- SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/213k")
- ENDIF(ADSP_PROCESSOR MATCHES "213..$")
+ if (ADSP_PROCESSOR MATCHES "213..$")
+ set(_ADSP_FAMILY_DIR "${_ADSP_DIR}/213k")
+ endif(ADSP_PROCESSOR MATCHES "213..$")
- SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/21k")
- ENDIF(CMAKE_C_COMPILER MATCHES cc21k OR CMAKE_CXX_COMPILER MATCHES cc21k OR CMAKE_ASM_COMPILER MATCHES easm21k)
+ set(_ADSP_FAMILY_DIR "${_ADSP_DIR}/21k")
+ endif(CMAKE_C_COMPILER MATCHES cc21k OR CMAKE_CXX_COMPILER MATCHES cc21k OR CMAKE_ASM_COMPILER MATCHES easm21k)
- LINK_DIRECTORIES("${_ADSP_FAMILY_DIR}/lib")
+ link_directories("${_ADSP_FAMILY_DIR}/lib")
# vdk support
- FIND_PROGRAM( ADSP_VDKGEN_EXECUTABLE vdkgen "${_ADSP_FAMILY_DIR}/vdk" )
+ find_program( ADSP_VDKGEN_EXECUTABLE vdkgen "${_ADSP_FAMILY_DIR}/vdk" )
- MACRO(ADSP_GENERATE_VDK VDK_GENERATED_HEADER VDK_GENERATED_SOURCE VDK_KERNEL_SUPPORT_FILE)
- ADD_CUSTOM_COMMAND(
+ macro(ADSP_GENERATE_VDK VDK_GENERATED_HEADER VDK_GENERATED_SOURCE VDK_KERNEL_SUPPORT_FILE)
+ add_custom_command(
OUTPUT ${VDK_GENERATED_HEADER} ${VDK_GENERATED_SOURCE}
COMMAND ${ADSP_VDKGEN_EXECUTABLE} ${VDK_KERNEL_SUPPORT_FILE} -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -MM
DEPENDS ${VDK_KERNEL_SUPPORT_FILE}
)
- ENDMACRO(ADSP_GENERATE_VDK VDK_GENERATED_HEADER VDK_GENERATED_SOURCE VDK_KERNEL_SUPPORT_FILE)
+ endmacro(ADSP_GENERATE_VDK VDK_GENERATED_HEADER VDK_GENERATED_SOURCE VDK_KERNEL_SUPPORT_FILE)
# loader support
- FIND_PROGRAM( ADSP_ELFLOADER_EXECUTABLE elfloader "${_ADSP_FAMILY_DIR}" )
+ find_program( ADSP_ELFLOADER_EXECUTABLE elfloader "${_ADSP_FAMILY_DIR}" )
# BOOT_MODE: prom, flash, spi, spislave, UART, TWI, FIFO
# FORMAT: hex, ASCII, binary, include
# WIDTH: 8, 16
- MACRO(ADSP_CREATE_LOADER_FILE TARGET_NAME BOOT_MODE FORMAT WIDTH)
- ADD_CUSTOM_COMMAND(
+ macro(ADSP_CREATE_LOADER_FILE TARGET_NAME BOOT_MODE FORMAT WIDTH)
+ add_custom_command(
TARGET ${TARGET_NAME}
POST_BUILD
COMMAND ${ADSP_ELFLOADER_EXECUTABLE} ${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME}.dxe -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -b ${BOOT_MODE} -f ${FORMAT} -width ${WIDTH} -o ${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME}.ldr
COMMENT "Building the loader file"
)
- ENDMACRO(ADSP_CREATE_LOADER_FILE TARGET_NAME BOOT_MODE FORMAT WIDTH)
+ endmacro(ADSP_CREATE_LOADER_FILE TARGET_NAME BOOT_MODE FORMAT WIDTH)
- MACRO(ADSP_CREATE_LOADER_FILE_INIT TARGET_NAME BOOT_MODE FORMAT WIDTH INITIALIZATION_FILE)
- ADD_CUSTOM_COMMAND(
+ macro(ADSP_CREATE_LOADER_FILE_INIT TARGET_NAME BOOT_MODE FORMAT WIDTH INITIALIZATION_FILE)
+ add_custom_command(
TARGET ${TARGET_NAME}
POST_BUILD
COMMAND ${ADSP_ELFLOADER_EXECUTABLE} ${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME}.dxe -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -b ${BOOT_MODE} -f ${FORMAT} -width ${WIDTH} -o ${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME}.ldr -init ${INITIALIZATION_FILE}
COMMENT "Building the loader file"
)
- ENDMACRO(ADSP_CREATE_LOADER_FILE_INIT TARGET_NAME BOOT_MODE FORMAT WIDTH INITIALIZATION_FILE)
+ endmacro(ADSP_CREATE_LOADER_FILE_INIT TARGET_NAME BOOT_MODE FORMAT WIDTH INITIALIZATION_FILE)
-ENDIF(NOT ADSP)
+endif(NOT ADSP)