MantisBT - CMake
View Issue Details
0014879CMakeCMakepublic2014-04-15 10:312014-10-06 10:33
raspy 
 
normalfeaturealways
closedduplicate 
x86_64RedHat Enterprise Linux6.4
CMake 2.8.12.2 
 
0014879: Use short switches for TI toolchain
Currently TI support uses long options when compiling, but most of these options have shorter versions. Longer versions can be problematic, since command line length is limited (especially short on Windows) and, for example, having multiple include directories prepended with '--include_path=' versus '-I' may decide whether the build compiles or not.

I suggest to change at least the following (all suggestions using TI-C.cmake, but suggestions are also appropriate for TI-CXX.cmake and TI-ASM.cmake):

Replace:
set(CMAKE_LIBRARY_PATH_FLAG "--search_path=")
set(CMAKE_LINK_LIBRARY_FLAG "--library=")
set(CMAKE_INCLUDE_FLAG_C "--include_path=")

With:
set(CMAKE_LIBRARY_PATH_FLAG "-I")
set(CMAKE_LINK_LIBRARY_FLAG "-l")
set(CMAKE_INCLUDE_FLAG_C "-I")

It would also be good to change other rules as well:

Replace:
set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> --compile_only --skip_assembler --c_file=<SOURCE> <DEFINES> <FLAGS> --output_file=<ASSEMBLY_SOURCE>")
set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> --preproc_only --c_file=<SOURCE> <DEFINES> <FLAGS> --output_file=<PREPROCESSED_SOURCE>")

set(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> --compile_only --c_file=<SOURCE> <DEFINES> <FLAGS> --output_file=<OBJECT>")
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> -r <TARGET> <OBJECTS>")
set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> --run_linker --output_file=<TARGET> --map_file=<TARGET>.map <CMAKE_C_LINK_FLAGS> <LINK_LIBRARIES> <LINK_FLAGS> <OBJECTS>")

With:
set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> -c -n -fc <SOURCE> <DEFINES> <FLAGS> -fe <ASSEMBLY_SOURCE>")
set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> -ppo -fc <SOURCE> <DEFINES> <FLAGS> -fe <PREPROCESSED_SOURCE>")

set(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> -c -fc <SOURCE> <DEFINES> <FLAGS> -fe <OBJECT>")
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> r <TARGET> <OBJECTS>")
set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> -z -o <TARGET> -m <TARGET>.map <CMAKE_C_LINK_FLAGS> <LINK_LIBRARIES> <LINK_FLAGS> <OBJECTS>")
No tags attached.
related to 0014876closed Kitware Robot Improve support for TI compiler 
Issue History
2014-04-15 10:31raspyNew Issue
2014-04-15 10:35Brad KingRelationship addedrelated to 0014876
2014-04-15 10:35Brad KingNote Added: 0035714
2014-04-15 10:35Brad KingStatusnew => resolved
2014-04-15 10:35Brad KingResolutionopen => duplicate
2014-10-06 10:33Robert MaynardNote Added: 0036976
2014-10-06 10:33Robert MaynardStatusresolved => closed

Notes
(0035714)
Brad King   
2014-04-15 10:35   
Again, please keep discussion in 0014876. We do not need the overhead of a separate issue for every little detail of the TI toolchain.
(0036976)
Robert Maynard   
2014-10-06 10:33   
Closing resolved issues that have not been updated in more than 4 months.