Commit Graph

374 Commits

Author SHA1 Message Date
Brad King
eb705b9531 Update links to gitlab.kitware.com repos to add -/
GitLab now uses a `/-/` component between the `group/project` part of
the URL and the `{issues,merge_requests,tree}` part so that it can
support `group/subgroup/project` with arbitrary depth.
2020-05-26 11:38:01 -04:00
Tushar Maheshwari
6728f0fa85 cmPropertyDefinitionMap: simplify and shorten 2020-05-15 18:58:02 +05:30
Marc Chevrier
75e87e3db4 bootstrap: update list of problematic files 2020-05-07 11:56:55 +02:00
Issam Maghni
3e874e8834 bootstrap: Prefer “test … && test …” over “test … -a …”
From https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html
2020-05-05 12:42:40 -04:00
Issam Maghni
1c06060288 bootstrap: Prefer “test …” over “[ … ]”
The former is more portable.
2020-05-05 12:42:28 -04:00
Brad King
54d9ffc6da Merge topic 'bootstrap-solaris-tr'
9febdd8205 bootstrap: Use 'tr' more portably

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4703
2020-05-05 09:02:49 -04:00
Brad King
9febdd8205 bootstrap: Use 'tr' more portably
Since commit 380bd70cc2 (bootstrap: implement cmake_toupper() using tr,
2017-06-07, v3.10.0-rc1~548^2~2) we use `tr` to convert from lower to
upper case.  However, the character classes `[:lower:]` and `[:upper:]`
result in a "Bad string" error message on Solaris.  Use `[a-z]` and
`[A-Z]` instead.
2020-05-04 09:41:52 -04:00
Raul Tambre
25439c7d62 Clang: Refactor CXX standard flags into __compiler_clang_cxx_standards()
These standard flags are the same for CXX, OBJCXX and CUDA.
Refactor them into a single macro to reduce duplication and so we can easily reuse them.

Updated bootstrap script to search in the general Clang module instead of the language-specific.
2020-04-07 09:33:09 -04:00
jjYBdx4IL
2ec6fbcb9b bootstrap: Tolerate trailing content in CMakeVersion.cmake components
On CYGWIN, tolerate DOS linefeeds in `Source/CMakeVersion.cmake`.
2020-03-17 07:20:09 -04:00
Marc Chevrier
2834f3355d Bootstrap: take care of C++ features configuration 2020-02-01 16:21:41 +01:00
Brad King
9969efa1ae bootstrap: Build with Release config by default to get optimizations
Fixes: #20197
2020-01-09 14:49:47 -05:00
Brad King
033a4b12a5 bootstrap: Extend C++17 check for our cast functions
In commit fc3b4caa2e (Memory management: cast functions for managed pointers,
2019-11-18) we added a check to `Source/Checks/cm_cxx17_check.cpp` to avoid
using C++17 mode on a compiler that does not support all our C++17 usage.
Add the check to our bootstrap script too.
2019-12-14 13:30:54 -05:00
Brad King
d806263578 Merge branch 'backport-3.16-toc_on_ppc' into toc_on_ppc 2019-12-09 11:41:15 -05:00
Alexander Grund
8c7b7df788 bootstrap: Add target_link_options command 2019-12-09 11:37:37 -05:00
Daniel Eiband
4e37508c85 cmLocalGenerator: Refactor to use cmMakeSingleCommandLine 2019-11-24 20:13:23 +01:00
Brad King
28a8561885 Merge topic 'bootstrap-break'
1dbf485934 bootstrap: Avoid redundant compiler selection checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3959
2019-10-30 09:25:48 -04:00
Brad King
1dbf485934 bootstrap: Avoid redundant compiler selection checks
In commit 6e613ff399 (bootstrap: Add infrastructure to detect threading
flags, 2017-11-28, v3.11.0-rc1~281^2~1) an extra level of nesting was
added to the selection loop, but the inner-most `break` command used to
exit the loop on success was not updated.  This caused the outer-most
loop to iterate unnecessarily and repeatedly try the same compilers
again.  In the case of compilers requiring a `-std=` flag, this may have
caused the oldest standard to be used instead of the newest.
2019-10-29 12:03:54 -04:00
Corentin Plouet
553658393c Graphviz: added test suite, fixes, enhancements
* Added a fairly comprehensive test suite
* Separated the graph traversal logic from the Graphviz generation
  code by introducing a new class, cmLinkItemsGraphVisitor{.h,cxx}
* Made the graph traversal logic less ad-hoc by using existing
  methods in the GlobalGenerator; this fixed a few bugs
* Added support for new target types: custom targets, object
  and unknown libraries
* Improved support for ALIAS libraries by showing the alias(es)
  in the graph
* Introduced new flags to control those new libraries (consistent
  with existing flags)
* Updated the documentation
* Removed useless setting to set graph type in dot file
* Improved the node/edge shapes (nicer, more consistent)
* Added a legend to the graph
* Some refactoring and cleanup of the Graphviz generation code
* Added test and fix for issue 19746
2019-10-08 13:45:56 +11:00
Brad King
df982c4e18 Merge topic 'add-custom-target-byproduct-checks'
fd3a394614 add_custom_command: Format files in error message in a single line
a1cc6b4447 add_custom_target: Add output checks for custom target byproducts
cbb861ade8 add_custom_command: Add tests for custom command output checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3850
2019-09-26 09:47:51 -04:00
Daniel Eiband
a1cc6b4447 add_custom_target: Add output checks for custom target byproducts
Use the output checks for byproducts of add_custom_command also for byproducts
of add_custom_target.
2019-09-23 22:18:36 +02:00
Brad King
3d1fb997e5 Merge topic 'HP-UX_Port_GCC'
ba315f2035 bootstrap: Require GCC 4.9 or higher on HP-UX
5ffb2dbff6 libuv: Add partial port to HP-UX
1059f9a96d jsoncpp: Fix compilation on HP-UX 11.31 ia64 with GCC 4.9.3

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3508
2019-09-23 10:32:42 -04:00
Brad King
ebb9346490 Merge topic 'cmake-system-headers'
4a08690ccf cmstd: Extend header <cm/iterator>
c688b401d3 cmstd: Modernize CMake system headers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3776
2019-09-20 10:38:43 -04:00
Brad King
ba315f2035 bootstrap: Require GCC 4.9 or higher on HP-UX
Revise for future removal of the early rejection checks on HP-UX.
Our code may now work with GCC 4.9 on HP-UX when manually using
`env CXXFLAGS=-D_GLIBCXX_USE_C99` to make the C++11 `std::to_string`
available on this platform.  However, without nightly testing we
cannot officially enable support for the platform.

Issue: #17137
Co-Author: Earle Lowe <elowe@elowe.com>
2019-09-20 10:30:01 -04:00
Earle Lowe
5ffb2dbff6 libuv: Add partial port to HP-UX
Port enough of libuv to HP-UX 11.31 ia64 with GCC 4.9.3 to work for
CMake.
2019-09-20 10:30:01 -04:00
Marc Chevrier
c688b401d3 cmstd: Modernize CMake system headers
Provide a standardized way to handle the C++ "standard" headers
customized to be used with current CMake C++ standard constraints.
Offer under directory `cm` headers which can be used as direct
replacements of the standard ones.  For example:

    #include <cm/string_view>

can be used safely for CMake development in place of the `<string_view>`
standard header.

Fixes: #19491
2019-09-20 10:01:37 -04:00
Tushar Maheshwari
71f088f53a cmExportSet: subsume cmExportSetMap source files 2019-09-19 19:20:30 +05:30
Brad King
fa36e2151d Merge topic 'precompile-headers'
8da78d4efe Precompile headers: Update documentation
5772930164 Precompile headers: Add unit tests
519606704e Precompile headers: Add support for Visual Studio generators
28be170fbc Precompile headers: Add support for Xcode generator
b8626261e9 Precompile headers: Add methods to generate PCH sources
375d01c680 PCH: add example/test
9b6797e71d PCH: add target_precompile_headers command
0467a2f91b PCH: add PRECOMPILE_HEADERS to special properties

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
Acked-by: Ivan171 <heavenandhell171@gmail.com>
Acked-by: Stanislav Ershov <digital.stream.of.mind@gmail.com>
Acked-by: Steve Mokris <smokris@softpixel.com>
Acked-by: Evgeniy Dushistov <dushistov@mail.ru>
Acked-by: Danila Malyutin <flashmozzg@gmail.com>
Acked-by: Viktor Kirilov <vik.kirilov@gmail.com>
Acked-by: Lucas Zhao <zhaopf6@163.com>
Merge-request: !3553
2019-08-29 09:38:21 -04:00
Brad King
ae861c196a Merge topic 'cmCommand_refactor_disallowed'
54872b73b9 cmCommand refactor: remove cmDisallowedCommand class
11f35d340e cmCommand refactor: remove unused AddDisallowedCommand overload
ae51aa32f0 cmCommand refactor: cmVariableRequiresCommand
185fa2c4f3 cmCommand refactor: cmUtilitySourceCommand
c8deeac68f cmCommand refactor: cmSubdirDependsCommand
c2c222eba1 cmCommand refactor: cmOutputRequiredFilesCommand
7533e47ccc cmCommand refactor: cmLoadCommandCommand
9d6fc3f5ed cmCommand refactor: cmExportLibraryDependenciesCommand
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3736
2019-08-28 11:49:32 -04:00
Daniel Pfeifer
9b6797e71d PCH: add target_precompile_headers command 2019-08-27 12:49:53 +02:00
Gabor Bencze
54872b73b9 cmCommand refactor: remove cmDisallowedCommand class 2019-08-26 11:48:47 -04:00
Brad King
f5a7ae0c4b Merge topic 'optional'
197c5e12ad Source: Add cm::optional
170fcd715f Extend C++17 feature checks to require std::optional

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sebastian Holtermann <sebholt@web.de>
Merge-request: !3644
2019-08-26 10:31:15 -04:00
Brad King
170fcd715f Extend C++17 feature checks to require std::optional 2019-08-23 08:43:35 -04:00
Brad King
e07e2bc8bb bootstrap: Compile cm::String 2019-08-20 09:36:45 -04:00
Brad King
141e307484 cmConfigure.h: Tell windows.h not to define min/max macros 2019-08-20 09:36:45 -04:00
Kyle Edwards
d4d5053c30 Refactor: Finish replacing CMAKE_BUILD_WITH_CMAKE with CMAKE_BOOTSTRAP
Remove -DCMAKE_BUILD_WITH_CMAKE from Source/CMakeLists.txt. Remove
CMAKE_BOOTSTRAP from bootstrap's cmConfigure.h. Add -DCMAKE_BOOTSTRAP
to all bootstrap sources, and remove the Unix specialization of
CMAKE_BOOTSTRAP in libuv (a review of the libuv code suggests that
this will not have an effect on the Windows build.)
2019-08-09 10:42:02 -04:00
Regina Pfeifer
b66b7464ab Introduce cmSubcommandTable 2019-08-06 17:21:52 +02:00
Brad King
2327cc0e05 Merge topic 'control-block3'
41364824ad cmFunctionBlocker: Recycle functions
6491270e0d cmFunctionBlocker: Move check for matching args
af24e4ef6e cmFunctionBlocker: Move common logic to base
ef38ff22f7 cm*FunctionBlocker: Extract function Replay
b51fba6298 cmMakefile: Add OnExecuteCommand callback
c76500949d cm*FunctionBlocker: Move to source file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3632
2019-08-05 10:42:50 -04:00
Sebastian Holtermann
e5d3ea22d4 cmStringAlgorithms: Add cmCatViews and cmStrCat functions 2019-08-01 11:45:04 +02:00
Regina Pfeifer
af24e4ef6e cmFunctionBlocker: Move common logic to base 2019-07-31 00:03:17 +02:00
Brad King
6f476a4169 Merge topic 'command-refactoring3'
dfaa87f1b3 cmState: Support BuiltinCommands as free functions
28f2d12a05 cmCommand: De-virtualize function InvokeInitialPass
de77d355ac cmState: Add scripted commands by value
0101ace131 cmUnexpectedCommand: Replace with lambda expression
015001aaf1 cmState: Hold commands by value
1eebc29563 cmCommand: deprecate functions GetMakefile and SetError

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3574
2019-07-23 07:29:11 -04:00
Regina Pfeifer
0101ace131 cmUnexpectedCommand: Replace with lambda expression 2019-07-21 09:25:32 +02:00
Brad King
9dfb66372e bootstrap: Verify C++14 capabilities before using them
In commit a605bf438e (Extend C++17/C++14 feature checks to cover more
standard library APIs, 2019-02-27, cpp-modules-20190312.1~52^2~1) we
added checks to the main build of CMake to verify C++14 capabilities
before using C++14 flags to build.  Add these to the bootstrap check
too.
2019-07-18 11:10:12 -04:00
Brad King
c1580ecc13 Merge topic 'cmPropertyMap_unordered_map'
00d265e3c8 cmPropertyMap: Use std::unordered_map as container instead of std::map
1b945f95ba cmPropertyMap: Add RemoveProperty method
e0a8ff3148 cmPropertyMap: Use std::string as value container class
8d934d861b cmPropertyMap: Make std::map container private
026f65d284 cmPropertyMap: Add GetList method
9e64e617eb cmPropertyMap: Rename GetPropertyList method to GetKeys

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3435
2019-06-12 12:46:18 -04:00
Kyle Edwards
1f9ef25130 file: Add GET_RUNTIME_DEPENDENCIES mode
Co-Authored-by: Bryon Bean <bryon.bean@kitware.com>
2019-06-10 14:35:28 -04:00
Sebastian Holtermann
e0a8ff3148 cmPropertyMap: Use std::string as value container class 2019-06-08 12:25:35 +02:00
Brad King
d1a570f18c Merge topic 'cmFileTimes'
5b53cfda24 cmSystemTools: Remove cmSystemToolsFileTime interface
9c576a88d9 Use cmFileTimes instead of cmSystemToolsFileTime interface
4b45a5d5c7 cmFileTimes: New RAII based cmFileTimes class

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3358
2019-05-23 08:53:17 -04:00
Sebastian Holtermann
4b45a5d5c7 cmFileTimes: New RAII based cmFileTimes class
This adds a new RAII based cmFileTimes class.
It is supposed to replace the C style cmSystemToolsFileTime interface.
2019-05-22 10:57:10 +02:00
Robert Maynard
81b4d10d8f CUDA: More exhaustive checks to determine when to do device linking
Previously CMake used fairly naive logic to determine when to do
device linking which caused unnecessary device linking to occur
frequently. We now use a more exhaustive algorithm to determine
when we have a need for device linking.

Fixes: #19238
2019-05-21 11:40:07 -04:00
Kyle Edwards
26025d6e10 cmUVProcessChain: Add cmUVProcessChain
This class is ultimately intended as a replacement for cmsys::Process.
It spawns a series of processes using libuv, piping the output of each
command into the next.

Note: input support has not yet been implemented because write
support has not yet been implemented on cmUVStreambuf.
2019-05-07 13:40:06 -04:00
Brad King
0e47391400 bootstrap: Update for new KWSys configuration option 2019-04-17 10:13:19 -04:00