From b3015862e547319bdc91fab5f28a366640ab50ea Mon Sep 17 00:00:00 2001 From: Alex Neundorf Date: Wed, 13 Mar 2013 23:11:29 +0100 Subject: rename TI_DSP toolchain to TI, since it works also for the ARM compiler Additionally, look for a special ar and strip Alex --- Modules/CMakeCCompilerId.c.in | 2 +- Modules/CMakeCXXCompilerId.cpp.in | 2 +- Modules/CMakeDetermineASMCompiler.cmake | 6 +++--- Modules/CMakeFindBinUtils.cmake | 5 +++++ Modules/Compiler/TI-ASM.cmake | 8 ++++++++ Modules/Compiler/TI-C.cmake | 10 ++++++++++ Modules/Compiler/TI-CXX.cmake | 10 ++++++++++ Modules/Compiler/TI_DSP-ASM.cmake | 8 -------- Modules/Compiler/TI_DSP-C.cmake | 10 ---------- Modules/Compiler/TI_DSP-CXX.cmake | 10 ---------- Source/cmDocumentVariables.cxx | 2 +- 11 files changed, 39 insertions(+), 34 deletions(-) create mode 100644 Modules/Compiler/TI-ASM.cmake create mode 100644 Modules/Compiler/TI-C.cmake create mode 100644 Modules/Compiler/TI-CXX.cmake delete mode 100644 Modules/Compiler/TI_DSP-ASM.cmake delete mode 100644 Modules/Compiler/TI_DSP-C.cmake delete mode 100644 Modules/Compiler/TI_DSP-CXX.cmake diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index 2d76c7a..c25df0c 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/Modules/CMakeCCompilerId.c.in @@ -109,7 +109,7 @@ # define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) #elif defined(__TI_COMPILER_VERSION__) -# define COMPILER_ID "TI_DSP" +# define COMPILER_ID "TI" /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ # define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) # define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index 5e70a41..e2119c2 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -114,7 +114,7 @@ # define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) #elif defined(__TI_COMPILER_VERSION__) -# define COMPILER_ID "TI_DSP" +# define COMPILER_ID "TI" /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ # define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) # define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake index 9f0b30a..9999f62 100644 --- a/Modules/CMakeDetermineASMCompiler.cmake +++ b/Modules/CMakeDetermineASMCompiler.cmake @@ -99,9 +99,9 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_MSVC "/?") set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_MSVC "Microsoft") - list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS TI_DSP ) - set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_TI_DSP "-h") - set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_TI_DSP "Texas Instruments") + list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS TI ) + set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_TI "-h") + set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_TI "Texas Instruments") include(CMakeDetermineCompilerId) CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT}) diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index e08c1c6..1b30801 100644 --- a/Modules/CMakeFindBinUtils.cmake +++ b/Modules/CMakeFindBinUtils.cmake @@ -41,6 +41,11 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" # in all other cases search for ar, ranlib, etc. else() + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "TI" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "TI") + find_program(CMAKE_AR NAMES ar6x HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) + find_program(CMAKE_STRIP NAMES strip6x HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) + endif() + find_program(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) find_program(CMAKE_RANLIB NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ranlib HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) diff --git a/Modules/Compiler/TI-ASM.cmake b/Modules/Compiler/TI-ASM.cmake new file mode 100644 index 0000000..e097626 --- /dev/null +++ b/Modules/Compiler/TI-ASM.cmake @@ -0,0 +1,8 @@ +set(CMAKE_LIBRARY_PATH_FLAG "--search_path=") +set(CMAKE_LINK_LIBRARY_FLAG "--library=") +set(CMAKE_INCLUDE_FLAG_ASM "--include_path=") + +set(CMAKE_ASM_COMPILE_OBJECT " --compile_only --asm_file= --output_file=") +set(CMAKE_ASM_LINK_EXECUTABLE " --run_linker --output_file= ") + +set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm;s;abs) diff --git a/Modules/Compiler/TI-C.cmake b/Modules/Compiler/TI-C.cmake new file mode 100644 index 0000000..b580994 --- /dev/null +++ b/Modules/Compiler/TI-C.cmake @@ -0,0 +1,10 @@ +set(CMAKE_LIBRARY_PATH_FLAG "--search_path=") +set(CMAKE_LINK_LIBRARY_FLAG "--library=") +set(CMAKE_INCLUDE_FLAG_C "--include_path=") + +set(CMAKE_C_CREATE_ASSEMBLY_SOURCE " --compile_only --skip_assembler --c_file= --output_file=") +set(CMAKE_C_CREATE_PREPROCESSED_SOURCE " --preproc_only --c_file= --output_file=") + +set(CMAKE_C_COMPILE_OBJECT " --compile_only --c_file= --output_file=") +set(CMAKE_C_ARCHIVE_CREATE " -r ") +set(CMAKE_C_LINK_EXECUTABLE " --run_linker --output_file= --map_file=.map ") diff --git a/Modules/Compiler/TI-CXX.cmake b/Modules/Compiler/TI-CXX.cmake new file mode 100644 index 0000000..8cf5ac3 --- /dev/null +++ b/Modules/Compiler/TI-CXX.cmake @@ -0,0 +1,10 @@ +set(CMAKE_LIBRARY_PATH_FLAG "--search_path=") +set(CMAKE_LINK_LIBRARY_FLAG "--library=") +set(CMAKE_INCLUDE_FLAG_CXX "--include_path=") + +set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE " --compile_only --skip_assembler --cpp_file= --output_file=") +set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE " --preproc_only --cpp_file= --output_file=") + +set(CMAKE_CXX_COMPILE_OBJECT " --compile_only --cpp_file= --output_file=") +set(CMAKE_CXX_ARCHIVE_CREATE " -r ") +set(CMAKE_CXX_LINK_EXECUTABLE " --run_linker --output_file= --map_file=.map ") diff --git a/Modules/Compiler/TI_DSP-ASM.cmake b/Modules/Compiler/TI_DSP-ASM.cmake deleted file mode 100644 index e097626..0000000 --- a/Modules/Compiler/TI_DSP-ASM.cmake +++ /dev/null @@ -1,8 +0,0 @@ -set(CMAKE_LIBRARY_PATH_FLAG "--search_path=") -set(CMAKE_LINK_LIBRARY_FLAG "--library=") -set(CMAKE_INCLUDE_FLAG_ASM "--include_path=") - -set(CMAKE_ASM_COMPILE_OBJECT " --compile_only --asm_file= --output_file=") -set(CMAKE_ASM_LINK_EXECUTABLE " --run_linker --output_file= ") - -set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm;s;abs) diff --git a/Modules/Compiler/TI_DSP-C.cmake b/Modules/Compiler/TI_DSP-C.cmake deleted file mode 100644 index b580994..0000000 --- a/Modules/Compiler/TI_DSP-C.cmake +++ /dev/null @@ -1,10 +0,0 @@ -set(CMAKE_LIBRARY_PATH_FLAG "--search_path=") -set(CMAKE_LINK_LIBRARY_FLAG "--library=") -set(CMAKE_INCLUDE_FLAG_C "--include_path=") - -set(CMAKE_C_CREATE_ASSEMBLY_SOURCE " --compile_only --skip_assembler --c_file= --output_file=") -set(CMAKE_C_CREATE_PREPROCESSED_SOURCE " --preproc_only --c_file= --output_file=") - -set(CMAKE_C_COMPILE_OBJECT " --compile_only --c_file= --output_file=") -set(CMAKE_C_ARCHIVE_CREATE " -r ") -set(CMAKE_C_LINK_EXECUTABLE " --run_linker --output_file= --map_file=.map ") diff --git a/Modules/Compiler/TI_DSP-CXX.cmake b/Modules/Compiler/TI_DSP-CXX.cmake deleted file mode 100644 index 8cf5ac3..0000000 --- a/Modules/Compiler/TI_DSP-CXX.cmake +++ /dev/null @@ -1,10 +0,0 @@ -set(CMAKE_LIBRARY_PATH_FLAG "--search_path=") -set(CMAKE_LINK_LIBRARY_FLAG "--library=") -set(CMAKE_INCLUDE_FLAG_CXX "--include_path=") - -set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE " --compile_only --skip_assembler --cpp_file= --output_file=") -set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE " --preproc_only --cpp_file= --output_file=") - -set(CMAKE_CXX_COMPILE_OBJECT " --compile_only --cpp_file= --output_file=") -set(CMAKE_CXX_ARCHIVE_CREATE " -r ") -set(CMAKE_CXX_LINK_EXECUTABLE " --run_linker --output_file= --map_file=.map ") diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx index 326a4ce..2f55098 100644 --- a/Source/cmDocumentVariables.cxx +++ b/Source/cmDocumentVariables.cxx @@ -1499,7 +1499,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) " PathScale = PathScale (pathscale.com)\n" " SDCC = Small Device C Compiler (sdcc.sourceforge.net)\n" " SunPro = Oracle Solaris Studio (oracle.com)\n" - " TI_DSP = Texas Instruments (ti.com)\n" + " TI = Texas Instruments (ti.com)\n" " TinyCC = Tiny C Compiler (tinycc.org)\n" " Watcom = Open Watcom (openwatcom.org)\n" " XL, VisualAge, zOS = IBM XL (ibm.com)\n" -- cgit v0.12