Skip to content

Commit 50187d6

Browse files
authored
Merge branch 'cmake-daemon' into dev/merlynop/jmc_only_msvc
2 parents c68260c + 0ff031d commit 50187d6

File tree

2,643 files changed

+81992
-32855
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,643 files changed

+81992
-32855
lines changed

.clang-tidy

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
Checks: "-*,\
3+
bugprone-*,\
4+
-bugprone-macro-parentheses,\
5+
-bugprone-misplaced-widening-cast,\
36
google-readability-casting,\
47
misc-*,\
58
-misc-incorrect-roundings,\
@@ -8,28 +11,28 @@ misc-*,\
811
-misc-static-assert,\
912
modernize-*,\
1013
-modernize-deprecated-headers,\
11-
-modernize-pass-by-value,\
1214
-modernize-raw-string-literal,\
1315
-modernize-return-braced-init-list,\
1416
-modernize-use-auto,\
15-
-modernize-use-default-member-init,\
16-
-modernize-use-emplace,\
17-
-modernize-use-equals-default,\
18-
-modernize-use-equals-delete,\
1917
-modernize-use-noexcept,\
2018
-modernize-use-transparent-functors,\
2119
-modernize-use-using,\
2220
performance-*,\
2321
-performance-inefficient-string-concatenation,\
22+
-performance-inefficient-vector-operation,\
2423
readability-*,\
2524
-readability-function-size,\
2625
-readability-identifier-naming,\
2726
-readability-implicit-bool-cast,\
27+
-readability-implicit-bool-conversion,\
2828
-readability-inconsistent-declaration-parameter-name,\
2929
-readability-named-parameter,\
3030
-readability-redundant-declaration,\
31-
-readability-redundant-member-init,\
32-
-readability-simplify-boolean-expr,\
3331
"
3432
HeaderFilterRegex: 'Source/cm[^/]*\.(h|hxx|cxx)$'
33+
CheckOptions:
34+
- key: modernize-use-default-member-init.UseAssignment
35+
value: '1'
36+
- key: modernize-use-equals-default.IgnoreMacros
37+
value: '0'
3538
...

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ configure eol=lf
2121

2222
*.pfx -text
2323
*.png -text
24+
*.png.in -text
2425

2526
*.c our-c-style
2627
*.cc our-c-style

Auxiliary/vim/syntax/cmake.vim

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ syn keyword cmakeVariable contained
733733
\ CTEST_CUSTOM_POST_TEST
734734
\ CTEST_CUSTOM_PRE_MEMCHECK
735735
\ CTEST_CUSTOM_PRE_TEST
736-
\ CTEST_CUSTOM_TEST_IGNORE
736+
\ CTEST_CUSTOM_TESTS_IGNORE
737737
\ CTEST_CUSTOM_WARNING_EXCEPTION
738738
\ CTEST_CUSTOM_WARNING_MATCH
739739
\ CTEST_CVS_CHECKOUT
@@ -873,8 +873,12 @@ syn keyword cmakeKWExternalProject contained
873873
\ LOG_
874874
\ LOG_BUILD
875875
\ LOG_CONFIGURE
876+
\ LOG_DIR
876877
\ LOG_DOWNLOAD
877878
\ LOG_INSTALL
879+
\ LOG_MERGED_STDOUTERR
880+
\ LOG_OUTPUT_ON_FAILURE
881+
\ LOG_PATCH
878882
\ LOG_TEST
879883
\ LOG_UPDATE
880884
\ MAKE_EXE
@@ -2208,6 +2212,8 @@ syn keyword cmakeGeneratorExpressions contained
22082212
\ DEBUG_MODE
22092213
\ EXPORT
22102214
\ FOO_EXTRA_THINGS
2215+
\ Fortran_COMPILER_ID
2216+
\ Fortran_COMPILER_VERSION
22112217
\ GENEX_EVAL
22122218
\ GNU
22132219
\ IF

CMakeLists.txt

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
22
# file Copyright.txt or https://cmake.org/licensing for details.
33

4-
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
4+
cmake_minimum_required(VERSION 3.1...3.12 FATAL_ERROR)
55
set(CMAKE_USER_MAKE_RULES_OVERRIDE_C ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideC.cmake)
66
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideCXX.cmake)
77
project(CMake)
@@ -117,6 +117,18 @@ option(CMake_BUILD_DEVELOPER_REFERENCE
117117
"Build CMake Developer Reference" OFF)
118118
mark_as_advanced(CMake_BUILD_DEVELOPER_REFERENCE)
119119

120+
# option to build using interprocedural optimizations (IPO/LTO)
121+
if (NOT CMAKE_VERSION VERSION_LESS 3.12.2)
122+
option(CMake_BUILD_LTO "Compile CMake with link-time optimization if supported" OFF)
123+
if(CMake_BUILD_LTO)
124+
include(CheckIPOSupported)
125+
check_ipo_supported(RESULT HAVE_IPO)
126+
if(HAVE_IPO)
127+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
128+
endif()
129+
endif()
130+
endif()
131+
120132
#-----------------------------------------------------------------------
121133
# a macro to deal with system libraries, implemented as a macro
122134
# simply to improve readability of the main script
@@ -125,10 +137,6 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
125137
# Options have dependencies.
126138
include(CMakeDependentOption)
127139

128-
# Optionally use system xmlrpc. We no longer build or use it by default.
129-
option(CTEST_USE_XMLRPC "Enable xmlrpc submission method in CTest." OFF)
130-
mark_as_advanced(CTEST_USE_XMLRPC)
131-
132140
# Allow the user to enable/disable all system utility library options by
133141
# defining CMAKE_USE_SYSTEM_LIBRARIES or CMAKE_USE_SYSTEM_LIBRARY_${util}.
134142
set(UTILITIES BZIP2 CURL EXPAT FORM JSONCPP LIBARCHIVE LIBLZMA LIBRHASH LIBUV ZLIB)
@@ -159,10 +167,8 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
159167

160168
# Optionally use system utility libraries.
161169
option(CMAKE_USE_SYSTEM_LIBARCHIVE "Use system-installed libarchive" "${CMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE}")
162-
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_CURL "Use system-installed curl"
163-
"${CMAKE_USE_SYSTEM_LIBRARY_CURL}" "NOT CTEST_USE_XMLRPC" ON)
164-
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_EXPAT "Use system-installed expat"
165-
"${CMAKE_USE_SYSTEM_LIBRARY_EXPAT}" "NOT CTEST_USE_XMLRPC" ON)
170+
option(CMAKE_USE_SYSTEM_CURL "Use system-installed curl" "${CMAKE_USE_SYSTEM_LIBRARY_CURL}")
171+
option(CMAKE_USE_SYSTEM_EXPAT "Use system-installed expat" "${CMAKE_USE_SYSTEM_LIBRARY_EXPAT}")
166172
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_ZLIB "Use system-installed zlib"
167173
"${CMAKE_USE_SYSTEM_LIBRARY_ZLIB}" "NOT CMAKE_USE_SYSTEM_LIBARCHIVE;NOT CMAKE_USE_SYSTEM_CURL" ON)
168174
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_BZIP2 "Use system-installed bzip2"
@@ -200,7 +206,7 @@ endmacro()
200206
macro(CMAKE_SETUP_TESTING)
201207
if(BUILD_TESTING)
202208
set(CMAKE_TEST_SYSTEM_LIBRARIES 0)
203-
foreach(util CURL EXPAT XMLRPC ZLIB)
209+
foreach(util CURL EXPAT ZLIB)
204210
if(CMAKE_USE_SYSTEM_${util})
205211
set(CMAKE_TEST_SYSTEM_LIBRARIES 1)
206212
endif()
@@ -326,6 +332,9 @@ macro (CMAKE_BUILD_UTILITIES)
326332
set(KWSYS_USE_ConsoleBuf 1)
327333
set(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source)
328334
set(KWSYS_INSTALL_DOC_DIR "${CMAKE_DOC_DIR}")
335+
if(CMake_NO_CXX_STANDARD)
336+
set(KWSYS_CXX_STANDARD "")
337+
endif()
329338
add_subdirectory(Source/kwsys)
330339
set(kwsys_folder "Utilities/KWSys")
331340
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE} "${kwsys_folder}")
@@ -532,7 +541,7 @@ macro (CMAKE_BUILD_UTILITIES)
532541
#---------------------------------------------------------------------
533542
# Build jsoncpp library.
534543
if(CMAKE_USE_SYSTEM_JSONCPP)
535-
find_package(JsonCpp)
544+
find_package(JsonCpp 1.4.1)
536545
if(NOT JsonCpp_FOUND)
537546
message(FATAL_ERROR
538547
"CMAKE_USE_SYSTEM_JSONCPP is ON but a JsonCpp is not found!")
@@ -559,18 +568,6 @@ macro (CMAKE_BUILD_UTILITIES)
559568
CMAKE_SET_TARGET_FOLDER(cmlibuv "Utilities/3rdParty")
560569
endif()
561570

562-
#---------------------------------------------------------------------
563-
# Build XMLRPC library for CMake and CTest.
564-
if(CTEST_USE_XMLRPC)
565-
find_package(XMLRPC QUIET REQUIRED libwww-client)
566-
if(NOT XMLRPC_FOUND)
567-
message(FATAL_ERROR
568-
"CTEST_USE_XMLRPC is ON but xmlrpc is not found!")
569-
endif()
570-
set(CMAKE_XMLRPC_INCLUDES ${XMLRPC_INCLUDE_DIRS})
571-
set(CMAKE_XMLRPC_LIBRARIES ${XMLRPC_LIBRARIES})
572-
endif()
573-
574571
#---------------------------------------------------------------------
575572
# Use curses?
576573
if (UNIX)
@@ -724,7 +721,7 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
724721
# the build tree, which is both the build and the install RPATH.
725722
if (UNIX)
726723
if( CMAKE_USE_SYSTEM_CURL OR CMAKE_USE_SYSTEM_ZLIB
727-
OR CMAKE_USE_SYSTEM_EXPAT OR CTEST_USE_XMLRPC OR CURSES_NEED_RPATH OR QT_NEED_RPATH)
724+
OR CMAKE_USE_SYSTEM_EXPAT OR CURSES_NEED_RPATH OR QT_NEED_RPATH)
728725
set(CMAKE_SKIP_RPATH OFF CACHE INTERNAL "CMake built with RPATH.")
729726
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
730727
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)

CONTRIBUTING.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ CMake uses `Kitware's GitLab Instance`_ to manage development and code review.
2424
To contribute patches:
2525

2626
#. Fork the upstream `CMake Repository`_ into a personal account.
27-
#. Run `Utilities/SetupForDevelopment.sh`_ for local configuration.
27+
#. Run `Utilities/SetupForDevelopment.sh`_ for local git configuration.
28+
#. See `Building CMake`_ for building CMake locally.
2829
#. See the `CMake Source Code Guide`_ for coding guidelines.
2930
#. Base all new work on the upstream ``master`` branch.
3031
Base work on the upstream ``release`` branch only if it fixes a
@@ -45,6 +46,7 @@ The merge request will enter the `CMake Review Process`_ for consideration.
4546
.. _`Kitware's GitLab Instance`: https://gitlab.kitware.com
4647
.. _`CMake Repository`: https://gitlab.kitware.com/cmake/cmake
4748
.. _`Utilities/SetupForDevelopment.sh`: Utilities/SetupForDevelopment.sh
49+
.. _`Building CMake`: README.rst#building-cmake
4850
.. _`CMake Source Code Guide`: Help/dev/source.rst
4951
.. _`commit messages`: Help/dev/review.rst#commit-messages
5052
.. _`CMake Review Process`: Help/dev/review.rst

CTestCustom.cmake.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
5252
"(Lexer|Parser).*warning.*conversion.*may (alter its value|change the sign)"
5353
"(Lexer|Parser).*warning.*(statement is unreachable|will never be executed)"
5454
"(Lexer|Parser).*warning.*variable.*was set but never used"
55+
"LexerParser.*warning.*empty expression statement has no effect; remove unnecessary"
5556
"PGC-W-0095-Type cast required for this conversion.*ProcessUNIX.c"
5657
"[Qq]t([Cc]ore|[Gg]ui|[Ww]idgets).*warning.*conversion.*may alter its value"
5758
"warning:.*is.*very unsafe.*consider using.*"

CompileFlags.cmake

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,6 @@ if(CMAKE_SYSTEM_NAME MATCHES "AIX")
2828
endif()
2929
endif()
3030

31-
if(CMAKE_SYSTEM_NAME MATCHES "IRIX")
32-
if(NOT CMAKE_COMPILER_IS_GNUCXX)
33-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-woff84 -no_auto_include")
34-
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-woff15")
35-
endif()
36-
endif()
37-
3831
if(CMAKE_SYSTEM MATCHES "OSF1-V")
3932
if(NOT CMAKE_COMPILER_IS_GNUCXX)
4033
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ")

Copyright.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CMake - Cross Platform Makefile Generator
2-
Copyright 2000-2018 Kitware, Inc. and Contributors
2+
Copyright 2000-2019 Kitware, Inc. and Contributors
33
All rights reserved.
44

55
Redistribution and use in source and binary forms, with or without
@@ -39,6 +39,7 @@ The following individuals and institutions are among the Contributors:
3939
* Alexander Neundorf <[email protected]>
4040
* Alexander Smorkalov <[email protected]>
4141
* Alexey Sokolov <[email protected]>
42+
* Alex Merry <[email protected]>
4243
* Alex Turbov <[email protected]>
4344
* Andreas Pakulat <[email protected]>
4445
* Andreas Schneider <[email protected]>
@@ -62,13 +63,17 @@ The following individuals and institutions are among the Contributors:
6263
* Ilya Lavrenov <[email protected]>
6364
* Insight Software Consortium <insightsoftwareconsortium.org>
6465
* Jan Woetzel
66+
* Julien Schueller
6567
* Kelly Thompson <[email protected]>
68+
* Laurent Montel <[email protected]>
6669
* Konstantin Podsvirov <[email protected]>
6770
* Mario Bensi <[email protected]>
71+
* Martin Gräßlin <[email protected]>
6872
* Mathieu Malaterre <[email protected]>
6973
* Matthaeus G. Chajdas
7074
* Matthias Kretz <[email protected]>
7175
* Matthias Maennich <[email protected]>
76+
* Michael Hirsch, Ph.D. <www.scivision.co>
7277
* Michael Stürmer
7378
* Miguel A. Figueroa-Villanueva
7479
* Mike Jackson

Help/command/FIND_XXX.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ If ``NO_DEFAULT_PATH`` is not specified, the search process is as follows:
9696

9797
2. Search paths specified in cmake-specific cache variables.
9898
These are intended to be used on the command line with a ``-DVAR=value``.
99-
The values are interpreted as :ref:`;-lists <CMake Language Lists>`.
99+
The values are interpreted as :ref:`semicolon-separated lists <CMake Language Lists>`.
100100
This can be skipped if ``NO_CMAKE_PATH`` is passed.
101101

102102
* |CMAKE_PREFIX_PATH_XXX|

Help/command/add_compile_definitions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
add_compile_definitions
22
-----------------------
33

4-
Adds preprocessor definitions to the compilation of source files.
4+
Add preprocessor definitions to the compilation of source files.
55

6-
::
6+
.. code-block:: cmake
77
88
add_compile_definitions(<definition> ...)
99

0 commit comments

Comments
 (0)