Commit Graph

25675 Commits

Author SHA1 Message Date
Vitaly Stakhovsky
2c50a72576 cmDepends: all members accept std::string arguments
Most `const char*` arguments converted to `const std::string&`
in `cmDepends` and derived classes.
In addition performed minor code cleanup.
2019-01-18 20:30:13 -05:00
Brad King
65a3abf999 Merge topic 'GHS_updates'
21ab58d3f8 GHS: Update test suite
72e0c115b7 GHS: Add Compiler ID detection
436cc5e991 GHS: try_compile() now uses GHS platform variables
4a1ec0de3d GHS: Fix toolset selection
1a66acdef2 GHS: Append ".gpj" to target name when generating build command
0c9e47d7cd GHS: Integrity Application updates
8044318431 GHS: Add support for some of the source file properties
73092b2213 GHS: Add support for object libraries
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2231
2019-01-18 06:58:35 -05:00
Kitware Robot
92d132100a CMake Nightly Date Stamp 2019-01-18 00:01:05 -05:00
Brad King
68e20f674a Merge topic 'cmake_role-global-property'
4568d046c4 Properties: Add CMAKE_ROLE global property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2805
2019-01-17 11:43:09 -05:00
Brad King
bd3685b6cf Merge topic 'vs-debug-utility-targets'
22b43b0009 VS: Add support for VS_DEBUGGER_* properties on custom targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2794
2019-01-17 11:07:11 -05:00
Brad King
9e3e93fc6f Merge topic 'fix_csharp_defines'
a541d113e6 VS: Honor target_compile_definitions for C# projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2809
2019-01-17 11:06:04 -05:00
Kyle Edwards
4568d046c4 Properties: Add CMAKE_ROLE global property
This property allows scripts to determine whether they're in project
mode, script mode, find-package mode, CTest, or CPack.
2019-01-17 09:44:29 -05:00
Kitware Robot
c144db1b8c CMake Nightly Date Stamp 2019-01-17 00:01:06 -05:00
Fred Baksik
21ab58d3f8 GHS: Update test suite
-- 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
2019-01-16 10:42:08 -05:00
Fred Baksik
72e0c115b7 GHS: Add Compiler ID detection
-- 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
2019-01-16 10:42:04 -05:00
Fred Baksik
436cc5e991 GHS: try_compile() now uses GHS platform variables
-- 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
2019-01-16 10:42:00 -05:00
Fred Baksik
4a1ec0de3d GHS: Fix toolset selection
-- Allow -T to accept full or partial paths
-- Use "C:/ghs" if GHS_TOOLSET_ROOT is empty string
-- Put more information in error messages
2019-01-16 10:41:56 -05:00
Fred Baksik
1a66acdef2 GHS: Append ".gpj" to target name when generating build command
-- 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
2019-01-16 10:41:53 -05:00
Fred Baksik
0c9e47d7cd GHS: Integrity Application updates
-- 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.
2019-01-16 10:41:49 -05:00
Fred Baksik
8044318431 GHS: Add support for some of the source file properties
-- INCLUDE_DIRECTORIES, COMPILE_DEFINITIONS, and COMPILE_OPTIONS
2019-01-16 10:41:45 -05:00
Fred Baksik
73092b2213 GHS: Add support for object libraries 2019-01-16 10:41:42 -05:00
Fred Baksik
14f3ba2059 GHS: EXCLUDE_FROM_ALL updates
-- Excluded targets should be generated but not included in build ALL
-- Use the correct source list for this configuration when writing sources
2019-01-16 10:41:38 -05:00
Fred Baksik
702121c5f3 GHS: Use the correct compiler flags for CMAKE_BUILD_TYPE
-- 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
2019-01-16 10:41:35 -05:00
Fred Baksik
b2a72ec72d GHS: Cleanup unused file handling functions and file output updates
-- File handling cleanup
-- Rename some functions to clarify what they do
-- Update to source file path conversion; only perform conversion when using windows
2019-01-16 10:41:31 -05:00
Fred Baksik
595932c4f0 GHS: Update the link line processing
-- 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
2019-01-16 10:41:27 -05:00
Fred Baksik
2ed2d6b46f GHS: Place build system outputs per target output directives
-- 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
2019-01-16 10:41:24 -05:00
Fred Baksik
ead7117afd GHS: Update the top-level project generation
-- 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
2019-01-16 10:41:20 -05:00
Fred Baksik
e7825386e2 GHS: Cleanup how source files are listed
-- 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
2019-01-16 10:41:15 -05:00
Fred Baksik
447b57a267 GHS: Update binary structure so that install scripts work
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
2019-01-16 10:41:11 -05:00
Fred Baksik
6436080996 GHS: Have the top-level project name follow the specified project name 2019-01-16 10:41:07 -05:00
Fred Baksik
a42e40e78d GHS: Only print bsp and os directives if specified by user
-- 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
2019-01-16 10:40:59 -05:00
Nils Gladitz
22b43b0009 VS: Add support for VS_DEBUGGER_* properties on custom targets
Visual studio itself supports the corresponding `LocalDebugger*`
properties on utility targets; support generating them from CMake as
well.
2019-01-16 10:21:01 -05:00
Brad King
bd54cc774a Merge topic 'semi-warnings'
b056bc3425 Fix most clang -Wextra-semi-stmt warnings in C++ files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2795
2019-01-16 09:52:45 -05:00
Brad King
e2c39e0573 Merge topic 'swift'
b90e6134a7 Ninja: add new placeholder `SWIFT_AUXILIARY_SOURCES`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Cristian Hancila <chancila@gmail.com>
Acked-by: Aaron Dierking <aarondierking7@gmail.com>
Merge-request: !2797
2019-01-16 09:52:10 -05:00
Brad King
e44cc45530 Merge topic 'autogen_adaptive_warning'
5fe18eee13 Autogen: Adaptive missing Qt warning
f2f1661334 Autogen: Add and use QtAutoGen::Tools method
b2343ff086 Autogen: Fix rcc validity check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2806
2019-01-16 09:51:33 -05:00
Brad King
a8b447d72e Merge topic 'support_per_toolset_json_flags'
c8ba777f6d GlobalVisualStudio10Generator: Support non-standard toolset json flag files.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2772
2019-01-16 09:50:00 -05:00
Brad King
68a30b50a5 Merge topic 'messenger-no-cmake'
cc2a5261f8 Factor out enum MessageType into dedicated header

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2654
2019-01-16 09:47:14 -05:00
Bruno Manganelli
cc2a5261f8 Factor out enum MessageType into dedicated header
Reduce the number of files relying on `cmake.h`.
2019-01-16 08:16:31 -05:00
Wil Stark
a541d113e6 VS: Honor target_compile_definitions for C# projects
Fixes: #18698
2019-01-15 21:29:59 -08:00
Kitware Robot
7721b70e23 CMake Nightly Date Stamp 2019-01-16 00:01:07 -05:00
Sean McBride
b056bc3425 Fix most clang -Wextra-semi-stmt warnings in C++ files
Suppress one in code generated by flex.
2019-01-15 14:09:46 -05:00
Brad King
41b0c0dc73 Merge topic 'vs2019'
57e48f16f2 VS: Add Visual Studio 16 2019 generator
bdef729646 VS: Parameterize VS 2017 generator to support future versions
68d316e0cf VS: Rename VS 2017 generator sources to be version-independent
d8ed309d05 VS: Parameterize cmVSSetupAPIHelper instances with VS version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2789
2019-01-15 13:23:38 -05:00
Brad King
67422bf579 Merge topic 'simplify-boolean-expr'
414aa6c81e clang-tidy: Simplify boolean expressions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2740
2019-01-15 13:21:21 -05:00
Brad King
d7835e4d0e Merge topic 'fix-source-group-CMakeLists.txt'
77303314dc Restore support for a custom source group for CMakeLists.txt

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2803
2019-01-15 13:20:01 -05:00
Brad King
1d328d8119 Merge topic 'extendwhitelist'
59c408d053 cmTargetPropertyComputer: whitelist 'MANUALLY_ADDED_DEPENDENCIES'.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2808
2019-01-15 13:18:54 -05:00
Brad King
4cf301ca77 Merge topic 'vs10_cs_cf_support'
5b1364a2e3 cmVisualStudio10TargetGenerator: Fix .NET Compact Framework projects.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2715
2019-01-15 13:16:46 -05:00
Brad King
11e43a19a4 Merge topic 'refactor-cmDocumentation'
57862079d8 cmDocumentation: Get rid of raw pointers in AllSections map
4308eb3d16 cmDocumentationSection: Remove unused parameter in constructor

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2692
2019-01-15 13:14:25 -05:00
Brad King
b2084a330d Merge topic 'deprecate-policy-old'
6845e2559d Add deprecation warnings for policies CMP0065 and below

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2793
2019-01-15 13:12:08 -05:00
Brad King
5d3b8eed4b Merge topic 'update-kwsys'
0d88739736 Merge branch 'upstream-KWSys' into update-kwsys
a4841e12c0 KWSys 2019-01-14 (1541d849)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2801
2019-01-15 13:11:08 -05:00
Saleem Abdulrasool
b90e6134a7 Ninja: add new placeholder SWIFT_AUXILIARY_SOURCES
The swift compilation model requires all sources for the module to be
listed for the compiler to type check across them.  Provide a
placeholder to allow enumerating the remainder of the swift sources in a
target for the language compile rule.

Issue: #18800
2019-01-15 09:13:33 -08:00
Regina Pfeifer
414aa6c81e clang-tidy: Simplify boolean expressions 2019-01-15 11:40:25 -05:00
Brad King
d4a42dd4a8 Merge topic 'iwyu-clang-6'
cd0881be61 IWYU: Update CMake code for IWYU built with Clang 6

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2810
2019-01-15 11:38:24 -05:00
Kyle Edwards
f3b7652efc Merge topic 'clang-scan-build-warnings'
9e4b6bcbe8 Source/LexerParser: Suppress "Use of zero-allocated memory" warning
613323a78b cmGlobalUnixMakefileGenerator3: Fix memory leak warning
bf2503089b liblzma: fix undefined shift result
ee555c2a33 libuv: fix clang scan-build warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2796
2019-01-15 10:07:02 -05:00
Brad King
cd0881be61 IWYU: Update CMake code for IWYU built with Clang 6
IWYU now correctly requires `<utility>` for `std::move`.  It also
requires a container header when used via a range-based for loop.
2019-01-15 10:00:50 -05:00
Sebastian Holtermann
5fe18eee13 Autogen: Adaptive missing Qt warning
This makes the warning message for a missing Qt use
the requested Qt version in the message text.
2019-01-15 10:15:03 +01:00