summaryrefslogtreecommitdiffstats
path: root/Source/cmGhsMultiTargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'ghs-linux'Brad King2019-03-221-24/+33
|\ | | | | | | | | | | | | | | | | | | | | 2c43fb5be3 FindThreads: Fix pthread library check in GHS Multi Generator 0404efe786 GHS: Add support for GHS Multi Generator in Linux 2060a1445c Tests: Fix file name case in GHS object library test ddad70c8a4 Tests: Run GHS tests in a separate ctest process f7dca1fc97 GHS: Fix include-what-you-use and clang-tidy diagnostics Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3006
| * GHS: Fix include-what-you-use and clang-tidy diagnosticsBrad King2019-03-201-24/+33
| | | | | | | | We will soon build GHS sources on Linux where we run these lints.
* | Replace use of CollapseCombinedPath with CollapseFullPathBrad King2019-03-191-1/+1
|/ | | | | | | | | | | `CollapseCombinedPath` was introduced by commit 551d3343cd (cmDependsC: Collapse relative include paths, 2013-06-19, v2.8.12~237^2) where the existing `CollapseFullPath` should have been used instead. Then its use proliferated slightly. Since `CollapseCombinedPath` is less widely used and less robust (see issue #19049), use `CollapseFullPath` everywhere instead. Issue: #19050
* cmSystemTools: More functions accept `std::string` paramsVitaly Stakhovsky2019-02-201-6/+4
|
* Create and use `cmGeneratorTarget::Names`Saleem Abdulrasool2019-02-111-20/+6
| | | | | | Rather than taking a number of out parameters for the various names, create a structure that is reused for both `GetLibraryNames` and `GetExecutableNames`. Replace uses according to the new interface.
* Merge topic 'modernize-for-loops'Brad King2019-02-111-22/+15
|\ | | | | | | | | | | | | | | | | 01b2d6ab74 Modernize: Use ranged for-loops when possible 15bdbec017 cmAlgorithms: Make cmRange advance/retreat safe for rvalues Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de> Merge-request: !2901
| * Modernize: Use ranged for-loops when possibleArtur Ryt2019-02-071-22/+15
| | | | | | | | | | | | | | Replaced most manual `const_iterator`-based loops and some reverse-iterator loops with range loops. Fixes: #18858
* | GHS: Document usage of GHS_NO_SOURCE_GROUP_FILEFred Baksik2019-02-081-1/+1
|/ | | | -- Also change variable name to CMAKE_GHS_NO_SOURCE_GROUP_FILE
* Merge topic 'cmoutputconverter-simplify'Brad King2019-01-291-2/+3
|\ | | | | | | | | | | | | b6a957c969 cmOutputConverter: move ConvertToRelativePath to cmStateDirectory. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2831
| * cmOutputConverter: move ConvertToRelativePath to cmStateDirectory.Bruno Manganelli2019-01-271-2/+3
| |
* | cmSystemTools::Message: Add overload accepting std::stringVitaly Stakhovsky2019-01-281-3/+3
|/
* GHS: Update test suiteFred Baksik2019-01-161-0/+1
| | | | | | | | | | -- Allow for testing default toolset settings If CMake_TEST_GreenHillsMULTI_config is not defined then just run the GHS tests using defaults. -- Handle paths that contain spaces -- Update test suite to use "-non_shared" linker option Fixes linking issue if GHS is not shipped with shared libraries -- Other minor cleanup
* GHS: Integrity Application updatesFred Baksik2019-01-161-37/+41
| | | | | | | | | | | | | | | | | -- Check the property "ghs_integrity_app" on executables to set [INTEGRITY Application] If the property is not set then check if an integrate file is one of the source files (.int file). Dynamic Downloads that do not have an integrate file can use this property along with setting the compiler flag "-dynamic". -- Remove parsing for -dynamic flag; it is only used to print a comment The MULTI GUI will show if it is a Monolith or Dynamic Download application -- Use project references to specify which executables are part of the Integrity Application Usually Implicit Dependency Analysis will ensure that executable targets become part of the application. This does not work for Dynamic Download without integrate files. Use `add_dependencies(dd vas)` to mark that the vas target is part of dd target. -- Update file locations in the Integrate files.
* GHS: Add support for some of the source file propertiesFred Baksik2019-01-161-0/+20
| | | | -- INCLUDE_DIRECTORIES, COMPILE_DEFINITIONS, and COMPILE_OPTIONS
* GHS: Add support for object librariesFred Baksik2019-01-161-88/+23
|
* GHS: EXCLUDE_FROM_ALL updatesFred Baksik2019-01-161-50/+29
| | | | | -- Excluded targets should be generated but not included in build ALL -- Use the correct source list for this configuration when writing sources
* GHS: Use the correct compiler flags for CMAKE_BUILD_TYPEFred Baksik2019-01-161-41/+20
| | | | | | | | | | | | | | | -- Do not use CMAKE_C_FLAGS_RELEASE flags when CMAKE_BUILD_TYPE is empty if CMAKE_BUILD_TYPE was not set the generator would use Release settings this does not match the documented behavior of CMAKE_BUILD_TYPE -- CMAKE_C_FLAGS_<CONFIG> not used when -kernel is present Fixes issue where CMAKE_C_FLAGS_<CONFIG> is ignored when -kernel option is present as a compiler option When the -kernel option is added to an executable it uses a different set of language flags This does not occur -kernel=<type> is used or if it is added as part of a link flag The variables CMAKE_<LANG>_GHS_KERNEL_FLAGS_<CONFIG> are removed NOTE: By default this only added the flag -ldebug which links in the debugger library. -- Separate compiler options by newlines
* GHS: Cleanup unused file handling functions and file output updatesFred Baksik2019-01-161-139/+14
| | | | | | -- File handling cleanup -- Rename some functions to clarify what they do -- Update to source file path conversion; only perform conversion when using windows
* GHS: Update the link line processingFred Baksik2019-01-161-52/+46
| | | | | | | | | -- add missing executable linker libs from: CMAKE_C_STANDARD_LIBRARIES -- add missed transitive link libraries -- add skipped library linker options -- The linker expects -l../relative/path/to/lib.a to be relative to the top-level project Because there can be multiple top-level projects convert the path to an absolute path to target
* GHS: Place build system outputs per target output directivesFred Baksik2019-01-161-42/+41
| | | | | | | | | | | | | | -- Set output and object file locations -- Suffixes are no longer being forced but will now follow the target properties By default GHS tools have no suffix for executable files so CMAKE_EXECUTABLE_SUFFIX was changed to meet this behavior -- Remove #if 0 blocked out code; it has been replaced. Forcing the -relprog option has been removed from non-kernel executable targets. The default value of this option (if it is even available) is determined by the tool-chain for the specified target and platform (Some tool-chains default to -locatedprogram). The use of -relprog can have unexpected results as it cannot always produce a fully relocated executable. -- Clarify use of CMAKE_BUILD_TYPE to control build configuration
* GHS: Update the top-level project generationFred Baksik2019-01-161-20/+50
| | | | | | | | | | | | -- Sort targets by name -- Generate a top-level project for each project command named as project.top.gpj Use the target set for the current project instead of assuming all targets -- Add support for building projects not in binary root -- Directly create files and pass ostream -- Do no generate project files for UTILITY targets; this was never supported -- Do no generate project files for OBJECT, SHARED, or MODULE libraries; this was never supported -- Update GHS tags to support project types NOTE: The default tag is changed to "" because "[ ]" is an invalid token in project file
* GHS: Cleanup how source files are listedFred Baksik2019-01-161-42/+145
| | | | | | | | | | | | -- Sort the items of the project files, previously they were unsorted The layout is similar to Visual Studio projects -- Do not make a make a tree of directories and projects files The main project file is in the binary folder The sub-project files are located in the project object directory This is similar to the Makefile generator -- Allow the creation of a single project file If the variable or target property GHS_NO_SOURCE_GROUP_FILE is set then all sources will be listed in the main project file
* GHS: Update binary structure so that install scripts workFred Baksik2019-01-161-59/+66
| | | | | | | | | | GHS doesn't follow the binary structure that VS or Makefiles use Also setting binary location outputs do not work -- Update to act like Visual Studio Generator and use its project layout -- Fix open/close issues where open() was used instead of Open() Now passes the file handle to all function that require it -- Avoid triggering MULTI reloads; use SetCopyIfDifferent mode
* Source: Modernize for loops, add const modifiersVitaly Stakhovsky2018-12-311-12/+11
|
* cmLocalGenerator: Remove AddCompileDefinitions methodBrad King2018-10-101-7/+2
| | | | | | | This method offers the same definitions as `GetTargetDefines` except that it excludes the "export" macro on shared libraries. Update call sites to use `GetTargetDefines` instead. Some of them were incorrectly excluding the export macro.
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-19/+19
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-1/+1
| | | | | | | | | | * Change some functions to take `std::string` instead of `const char*` in the following classes: `cmMakeFile`, `cmake`, `cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator` and a few others. * Greatly reduce using of `const char*` overloads for `cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`. * Remove many redundant `c_str()` conversions throughout the code.
* cmMakefile: use std::string in more methods; cleanup c_str()sVitaly Stakhovsky2018-01-231-2/+2
| | | | | Follow up commit 969c1f94ae (cmSourceGroup: code improvements; use std::string and C++11 loops, 2017-01-10).
* cmSourceGroup: Return strings from GetName and GetFullNameBrad King2017-11-151-2/+2
|
* Retire std::auto_ptr and its macro CM_AUTO_PTRMatthias Maennich2017-09-251-1/+1
| | | | Signed-off-by: Matthias Maennich <matthias@maennich.net>
* clang-format: format all code as Cpp11Daniel Pfeifer2017-08-301-2/+2
|
* Add IPO compiler flags more consistently in generatorsBrad King2017-04-271-3/+5
| | | | | | Move addition of IPO flags into `cmLocalGenerator::AddLanguageFlags` because all call sites of that need the IPO flags, but not all were following the call with `AppendFeatureOptions`.
* cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-4/+4
|
* Factor IDE folder name retrieval out into helper methodGregor Jasny2016-10-171-3/+1
| | | | | | Add a `cmGeneratorTarget::GetEffectiveFolderName` helper to abstract lookup of the `FOLDER` property in combination with checking for generator support of folders.
* cmLinkLineComputer: Move FrameworkPath computation from cmLocalGeneratorStephen Kelly2016-10-101-1/+2
| | | | Add UseWatcomQuote state, and remove corresponding method parameters.
* cmLinkLineComputer: Move ComputeLinkLibs from cmLocalGeneratorStephen Kelly2016-10-101-0/+1
| | | | | | | | | | | | | | | Add a cmOutputConverter to the cmLinkLineComputer and factory methods to facilitate shell escapes. Add state to the cmLinkLineComputer to record whether outputting for response files or for watcom, to satisfy the cmOutputConverter API. These are constant for the lifetime of the cmLinkLineComputer, even when its functionality is extended in the future. This also keeps the signatures of cmLinkLineComputer relatively simple. Pass the cmComputeLinkInformation as a method parameter so that cmLinkLineComputer is free from target-specific state. An instance should be usable for all targets in a directory.
* cmLinkLineComputer: Extract from cmLocalGeneratorStephen Kelly2016-10-101-2/+7
| | | | | | | | | | | CMake has several classes which have too many responsibilities. cmLocalGenerator is one of them. Start to extract the link line computation. Create generator-specific implementations of the interface to account for generator-specific behavior. Unfortunately MSVC60 has different behavior to everything else and CMake still generates makefiles for it. Isolate it with MSVC60-specific names.
* cmMakefile: Return a string from GetDefineFlagsStephen Kelly2016-10-101-1/+1
| | | | Flip condition in GHS for readability.
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* fix a load of include-what-you-use violationsDaniel Pfeifer2016-09-031-0/+1
|
* cmLocalGenerator: Pass configuration to GetTargetFlagsTobias Hunger2016-06-081-1/+1
| | | | | Move the configuration lookup to call sites. This will allow multi-configuration callers to use the method.
* GHS: Compute include directories consistently with other generatorsBrad King2016-05-241-2/+4
| | | | | All generators use cmLocalGenerator::GetIncludeDirectories to construct the final list of include directories for a target.
* GHS: Use shorter object file names on collisionGeoff Viola2016-05-181-14/+6
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-315/+239
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* GHS: Shorten long object paths with duplicate source namesGeoff Viola2016-05-061-21/+70
| | | | | Detect when the resulting object path is too long and compute an alternative name using a hash.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Source: Stabilize include orderBrad King2016-04-291-0/+1
| | | | | 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.
* GHS: Fix handling of duplicate source filenames (#16046)Geoff Viola2016-04-251-0/+42
| | | | | Green Hills MULTI project files must specify explicitly distinct object file names for source files with the same name.
* GHS: Implement link flags and dirs for non-target groups (#16029)Geoff Viola2016-03-281-2/+32
|
* GHS: Fix try_compile (#15975)Geoff Viola2016-03-211-2/+8
|