summaryrefslogtreecommitdiff
path: root/Source/cmGlobalGhsMultiGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'add_consistent_verbose_build_flag'Brad King2019-01-291-12/+9
|\ | | | | | | | | | | | | | | | | | | | | | | 66801f4d40 cmake: Add tests for verbose output to --build mode 439fe2e253 cmake: Add options for verbose output to --build mode 638667efa2 cmake: cmcmd.cxx fix "The arguments are" comments 3ca4402966 ctest: Fix --build-and-test without --build-target on Xcode cb6c233ecc cmake: Add -hideShellScriptEnvironment xcodebuild option 1a45266cb5 cmGlobalGenerator: Add a class that represent the build command Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2708
| * cmGlobalGenerator: Add a class that represent the build commandRobert Maynard2019-01-251-12/+9
| | | | | | | | | | | | This refactors a std::vector<std::string> into a class so that we can extend the features to represent things such as multiple chained commands in the future.
* | Merge topic 'cmoutputconverter-simplify'Brad King2019-01-291-1/+1
|\ \ | | | | | | | | | | | | | | | | | | 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-1/+1
| |/
* | cmSystemTools::Message: Add overload accepting std::stringVitaly Stakhovsky2019-01-281-1/+1
| |
* | cmSystemTools::Error(): new overload accepting std::stringVitaly Stakhovsky2019-01-231-3/+3
|/
* GHS: Add Compiler ID detectionFred Baksik2019-01-161-18/+0
| | | | | | | | | | | | -- Detect GHS compiler and version Detect ARCHITECTURE_ID for PPC / ARM / 86 targets Detect PLATFORM_ID for Integrity and Integrity178 platforms Using defines specified in the documents for the compilers: 201416 PPC / 201754 ARM / 201714 86 -- Fallback C/CXX compiler ID to GHS if not otherwise detected and using GHS MULTI generator Works around issue with some GHS compilers not setting __ghs__ compiler define -- Tweak Compiler ID checking so major id of 002017 is not replaced with 217 -- Prefer try_compile() library targets when testing for working GHS compilers -- Avoid CMake errors if reading past end of file for checking if file is PE executable
* GHS: try_compile() now uses GHS platform variablesFred Baksik2019-01-161-0/+2
| | | | | | | -- Forward GHS platform variables to try_compile() CMAKE_TRY_COMPILE_PLATFORM_VARIABLES only worked for source signature try_compile() -- Update tests to no longer add GHS platform variables to try_compile() -- Avoid linker error in GhsMulti/GhsMultiCompilerOptions/CMakeLists.txt by building library
* GHS: Fix toolset selectionFred Baksik2019-01-161-21/+31
| | | | | | -- Allow -T to accept full or partial paths -- Use "C:/ghs" if GHS_TOOLSET_ROOT is empty string -- Put more information in error messages
* GHS: Append ".gpj" to target name when generating build commandFred Baksik2019-01-161-1/+5
| | | | | | | | | | | -- Add test demonstrating issue -- In the case of executable targets the target name is usually the same as used in "-o filename" But for static libraries the target name is usually "-o libname.a" "gbuild.exe target" will build whatever target matches against even the output from the compiler or linker But the targets in "cmake --build . --target name" should be target names in CMakeLists.txt not the actual filenames So change the "name" to "name.gpj" so it matches the target name in CMakeLists.txt. Fixes #15975
* GHS: Integrity Application updatesFred Baksik2019-01-161-1/+19
| | | | | | | | | | | | | | | | | -- 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: EXCLUDE_FROM_ALL updatesFred Baksik2019-01-161-15/+4
| | | | | -- Excluded targets should be generated but not included in build ALL -- Use the correct source list for this configuration when writing sources
* GHS: Cleanup unused file handling functions and file output updatesFred Baksik2019-01-161-145/+11
| | | | | | -- File handling cleanup -- Rename some functions to clarify what they do -- Update to source file path conversion; only perform conversion when using windows
* GHS: Place build system outputs per target output directivesFred Baksik2019-01-161-0/+12
| | | | | | | | | | | | | | -- 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-66/+125
| | | | | | | | | | | | -- 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: Have the top-level project name follow the specified project nameFred Baksik2019-01-161-2/+5
|
* GHS: Only print bsp and os directives if specified by userFred Baksik2019-01-161-32/+44
| | | | | | | | | -- standalone platforms will not build if bsp/os is specified in project file -- integrity platforms will always print these directives because they are required -- cleanup -os_dir setting allow customization of the actual setting because it is determined by tool-set customization files remove variable that was set but never used -- add message when using default values
* Factor out enum MessageType into dedicated headerBruno Manganelli2019-01-161-0/+1
| | | | Reduce the number of files relying on `cmake.h`.
* GHS: Update default BSP nameFred Baksik2018-07-111-10/+13
| | | | | -- Use default value of sim<arch> if not user defined -- Also no reason to trim quotes or changes slashes; it is just a name not a path
* GHS: Set primary target using arch/platform values (or user specified value)Fred Baksik2018-07-111-2/+20
|
* GHS: Add platform selection supportFred Baksik2018-07-111-0/+10
|
* GHS: Add toolset selection supportFred Baksik2018-07-111-109/+103
| | | | | | | | | | | | | | | | -- Use the specified toolset located within GHS_TOOLSET_ROOT -- Update how the latest toolset is determined; scan the location GHS_TOOLSET_ROOT and sort it No longer use registry settings looking for installations The registry values are assigned in installation order for Green Hills tools not version order -- Update to use gbuild.exe from the proper toolset -- Clarify that CMAKE_MAKE_PROGRAM should not be set by user. -- Detect some toolset changes when regenerating project files This could occur if GHS_TOOLSET_ROOT was changed by user after the initial project generation This could occur if CMAKE_MAKE_PROGRAM was changed at the command line -- Use placeholder values for CMAKE_<LANG>_COMPILER The MULTI build system only uses gbuild to build a project gbuild uses the project file to determine which set of compilers to use based on target platform and architecture because compiler detection is skipped, placeholder values are used so that CMake does not complain
* GHS: Support ARM, PPC, 86 architecturesFred Baksik2018-07-071-1/+19
| | | | | | -- Update -A option to choose target architecture. -- Update commentary about which variables are used to control toolset and target settings -- Remove setting CMAKE_SYSTEM_PROCESSOR because the value is overwritten to be "" by subsequent CMAKE processing
* Update use of KWSys SystemTools::SplitString for new signatureBrad King2018-06-221-9/+7
|
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-4/+4
| | | | | | | | | | | | 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.
* cmake: Add options for parallel builds to --build modeFlorian Maushart2018-05-251-1/+8
| | | | | | | While we already support `cmake --build . -- -j`, the options after `--` are specific to the native build tool. Add new options `--parallel [<N>]` and `-j [<N>]` to abstract this and map to the proper option for the native build tool.
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-2/+2
| | | | | | | | | | * 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.
* Performance: Fix a few more unnecessary vector copies missed in af3fd6fAaron Orenstein2017-08-181-3/+3
|
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-1/+1
| | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* avoid including cmStandardIncludes.hDaniel Pfeifer2016-11-281-2/+4
|
* cmGlobalGenerator: Allow FindMakeProgram to failBrad King2016-10-201-1/+2
| | | | | Revise its signature to return `bool` so that it can fail and abort configuration early.
* Factor IDE folder name retrieval out into helper methodGregor Jasny2016-10-171-5/+1
| | | | | | Add a `cmGeneratorTarget::GetEffectiveFolderName` helper to abstract lookup of the `FOLDER` property in combination with checking for generator support of folders.
* 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
|
* Use std::replace for replacing chars in strings.Daniel Pfeifer2016-05-241-2/+2
| | | | | | | | | | | Find uses of `cmSystemTools::ReplaceString` where both `replace` and `with` are string literals with a size of one. Automate with: git grep -l ReplaceString | xargs sed -i "s|cmSystemTools::ReplaceString(\([^,]*\), \"\(.\)\", \"\(.\)\");|std::replace(\1.begin(), \1.end(), '\2', '\3');|g" git grep -l ReplaceString | xargs sed -i "s|cmSystemTools::ReplaceString(\([^,]*\), \"\(.\)\", \"\\\\\\\\\");|std::replace(\1.begin(), \1.end(), '\2', '\\\\\\\\');|g" git grep -l ReplaceString | xargs sed -i "s|cmSystemTools::ReplaceString(\([^,]*\), \"\\\\\\\\\", \"\(.\)\");|std::replace(\1.begin(), \1.end(), '\\\\\\\\', '\2');|g"
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-177/+128
| | | | | | | | | | | | | 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.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Port to cmGeneratorTarget.Stephen Kelly2015-10-241-6/+5
|
* cmLocalGenerator: Store a vector of generator targets.Stephen Kelly2015-10-211-10/+10
| | | | Not a map from cmTarget to cmGeneratorTarget.
* cmLocalGenerator: Store cmGeneratorTargets.Stephen Kelly2015-10-141-1/+1
| | | | Relieve cmMakefile of this responsibility.
* Access sources through cmGeneratorTarget.Stephen Kelly2015-10-071-1/+2
|
* GHS: Port API to cmGeneratorTarget.Stephen Kelly2015-10-071-1/+2
|
* cmLocalGenerator: Create from already-constructed cmMakefile.Stephen Kelly2015-08-281-2/+2
| | | | Don't manage the lifetime of the cmMakefile with cmLocalGenerator.
* cmLocalGenerator: Remove Parent pointer.Stephen Kelly2015-08-281-3/+2
|
* cmLocalGenerator: Require a valid cmState::Snapshot in the ctor.Stephen Kelly2015-05-271-2/+3
| | | | | | | | | | | Refactor the local generator creation API to accept a cmState::Snapshot. Adjust MakeLocalGenerator to use the 'current' snapshot in cases where there is no parent. Create the snapshot for subdirectories in cmMakefile::AddSubdirectory. This means that snapshots are now created at the point of extending the tree, as appropriate, and independently of the cmLocalGenerator and cmMakefile they represent the state for.
* cmGlobalGenerator: Require a cmake instance in ctor.Stephen Kelly2015-05-271-2/+2
| | | | It is required anyway, so this makes it explicit.
* GHS: Remove call to SetCurrentLocalGenerator.Stephen Kelly2015-05-241-3/+1
| | | | It is not needed as cmLocalGenerator::Configure does this.
* cmLocalGenerator: Require a global generator in the constructor.Stephen Kelly2015-05-141-2/+1
| | | | Port generator factory methods to pass it.
* cmLocalGenerator: Require a parent in the constructor.Stephen Kelly2015-04-281-2/+3
| | | | | | | Pass the parent though cmGlobalGenerator::CreateLocalGenerator. This will make it easy to initialize state scopes independent of cmMakefile.