Commit Graph

26 Commits

Author SHA1 Message Date
Geoff Viola 5e4287131b GHS: Shorten long object paths with duplicate source names
Detect when the resulting object path is too long and compute an
alternative name using a hash.
2016-05-06 08:21:05 -04:00
Brad King e1c7747253 Format include directive blocks and ordering with clang-format
Sort include directives within each block (separated by a blank line) in
lexicographic order (except to prioritize `sys/types.h` first).  First
run `clang-format` with the config file:

    ---
    SortIncludes: false
    ...

Commit the result temporarily.  Then run `clang-format` again with:

    ---
    SortIncludes: true
    IncludeCategories:
      - Regex:    'sys/types.h'
        Priority: -1
    ...

Commit the result temporarily.  Start a new branch and cherry-pick the
second commit.  Manually resolve conflicts to preserve indentation of
re-ordered includes.  This cleans up the include ordering without
changing any other style.

Use the following command to run `clang-format`:

    $ git ls-files -z -- \
        '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' |
      egrep -z -v '(Lexer|Parser|ParserHelper)\.' |
      egrep -z -v '^Source/cm_sha2' |
      egrep -z -v '^Source/(kwsys|CursesDialog/form)/' |
      egrep -z -v '^Utilities/(KW|cm).*/' |
      egrep -z -v '^Tests/Module/GenerateExportHeader' |
      egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' |
      xargs -0 clang-format -i

This selects source files that do not come from a third-party.

Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
2016-04-29 13:58:54 -04:00
Brad King 180538c706 Source: Stabilize include order
Each source file has a logical first include file.  Include it in an
isolated block so that tools that sort includes do not move them.
2016-04-29 13:58:31 -04:00
Geoff Viola 1703a6d2c4 GHS: Fix handling of duplicate source filenames (#16046)
Green Hills MULTI project files must specify explicitly distinct object
file names for source files with the same name.
2016-04-25 10:46:09 -04:00
Geoff Viola 36ad8dd440 GHS: Implement link flags and dirs for non-target groups (#16029) 2016-03-28 11:46:46 -04:00
Geoff Viola bf3e76d214 GHS: Fix try_compile (#15975) 2016-03-21 10:35:01 -04:00
Stephen Kelly 3f8aa62bfb cmGeneratorTarget: Add API for target-relative commands. 2015-10-26 22:02:13 +01:00
Stephen Kelly b74aa0e3d2 GHS: Port to cmGeneratorTarget. 2015-10-24 09:19:55 +02:00
Stephen Kelly 311018e5ad cmGeneratorTarget: Move GetExportMacro from cmTarget. 2015-10-21 00:52:22 +02:00
Stephen Kelly 3e8ef64273 cmLocalGenerator: Port some API to cmGeneratorTarget. 2015-10-17 17:30:38 +02:00
Brad King 893ce307f9 Merge topic 'ghs-drop-optgroup'
ce7ccafc GHS: Remove extra flag to GHS MULTI compiler (#15771)
2015-10-16 09:35:41 -04:00
Geoff Viola ce7ccafce2 GHS: Remove extra flag to GHS MULTI compiler (#15771)
Do not produce "{optgroup=GhsCommonOptions}" in the generated .gpj
files.  The flag was added originally to match an old project file, but
it does not seem necessary and is not compatible with all GHS versions.
2015-10-15 09:56:47 -04:00
Stephen Kelly eac15298a8 cmState: Move TargetType enum from cmTarget.
Mostly automated:

 values=( "EXECUTABLE" "STATIC_LIBRARY" "SHARED_LIBRARY" "MODULE_LIBRARY" "OBJECT_LIBRARY" "UTILITY" "GLOBAL_TARGET" "INTERFACE_LIBRARY" "UNKNOWN_LIBRARY" "TargetType")
 for i in "${values[@]}"; do     git grep -l cmTarget::$i | xargs sed -i "s|cmTarget::$i|cmState::$i|g"; done
2015-10-15 00:41:39 +02:00
Stephen Kelly 983c00f8f9 Generators: Use GetType from the cmGeneratorTarget. 2015-10-15 00:41:19 +02:00
Stephen Kelly 12cb3bdce4 cmLocalGenerator: Add Home directory accessors.
Reduce reasons for cmLocalGenerator to have a cmMakefile.
2015-10-09 00:00:19 +02:00
Stephen Kelly 5d3776a7eb Access sources through cmGeneratorTarget. 2015-10-07 08:37:56 +02:00
Stephen Kelly 7ce0991a7a GHS: Port API to cmGeneratorTarget. 2015-10-07 08:37:56 +02:00
Geoff Viola 04de900704 GHS: Fix generated file path slashes and quoting for 6.1.6 2015-09-09 10:15:37 -04:00
Geoff Viola fbe0de92f0 GHS: Tell MULTI to delete .elf.ael file 2015-09-09 10:14:54 -04:00
Stephen Kelly a7f5d70dde cmGeneratorTarget: Move compile defintions processing from cmTarget. 2015-08-26 19:46:30 +02:00
Stephen Kelly db4cb92bda cmGeneratorTarget: Move compile options processing from cmTarget. 2015-08-26 19:45:51 +02:00
Stephen Kelly e6ccbf6f30 cmGeneratorTarget: Move include directory processing from cmTarget. 2015-08-26 19:45:21 +02:00
Stephen Kelly 7c809fa2a6 cmGeneratorTarget: Move GetLinkerLanguage from cmTarget. 2015-08-05 18:20:48 +02:00
Stephen Kelly faec4e611d cmComputeTargetDepends: Change API to use cmGeneratorTarget. 2015-07-01 19:46:19 +02:00
Stephen Kelly dee197fe61 GHS: Use a cmGeneratorTarget in generator API. 2015-06-22 13:23:45 -04:00
Geoff Viola 48004d9dbe Add a 'Green Hills MULTI' generator on Windows
Green Hills MULTI is an IDE for embedded real-time systems.  The IDE's
product page can be found here:

 http://www.ghs.com/products/MULTI_IDE.html

It supports cross compiling on ARM, Intel x86, and other architectures
with various operating systems.  The IDE exists on Linux and Windows
host systems, but CMake will currently only generate the project files
on Windows host systems.
2015-04-20 13:55:40 -04:00