The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=14879 ====================================================================== Reported By: raspy Assigned To: ====================================================================== Project: CMake Issue ID: 14879 Category: CMake Reproducibility: always Severity: feature Priority: normal Status: new ====================================================================== Date Submitted: 2014-04-15 10:31 EDT Last Modified: 2014-04-15 10:31 EDT ====================================================================== Summary: Use short switches for TI toolchain Description: 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>") ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2014-04-15 10:31 raspy New Issue ====================================================================== -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
