Commit Graph

37439 Commits

Author SHA1 Message Date
Brad King
714ce72882 bootstrap: Make libuv available during bootstrap
On UNIX, build only the parts of libuv we need for the filesystem,
process, and poll abstractions using the POSIX poll() backend.  This
avoids many platform-specific conditions.  On Windows, build all of
libuv; there are no conditional alternatives anyway.
2017-09-17 11:10:18 -04:00
Brad King
6a2d967de0 bootstrap: Require compiler mode aware of C99 on Solaris
On Solaris some system headers included in C with `-D_XOPEN_SOURCE=600`
require C99 support by the compiler.
2017-09-17 11:10:18 -04:00
Kitware Robot
214d0ce170 CMake Nightly Date Stamp 2017-09-17 00:01:03 -04:00
Kitware Robot
db86cf4e7e CMake Nightly Date Stamp 2017-09-16 00:01:03 -04:00
Pavel Solodovnikov
5db3aac111 Meta: replace empty-string assignments with clear(). 2017-09-16 02:26:49 +03:00
Tin Huynh
485a6f0ef2 PGI-Fortran: Add -Mipa=fast,inline as IPO option.
Remove -Mipa=fast as a default flag and add it as an option instead.
-Mipa=fast is a flag that speeds up runtime but at the cost of significant
compile time increase and therefore, shouldn't be a default flag.
In addition, -Mipa isn't supported on PGI OpenPOWER or x86/llvm compilers.
2017-09-15 15:27:21 -07:00
Rolf Eike Beer
67529aab81 Doc: document that CoverageExtraFlags will come first 2017-09-15 17:50:56 +02:00
Rolf Eike Beer
69fac3c3d5 pass arguments as vector to cmCTest::RunCommand()
The only 2 callers took care to construct a properly escaped string, but not
using the documented way, and that string was passed only to be immediately
split into tokens again. Start with a vector and join it only for logging,
avoiding needless quotes during that.
2017-09-15 17:50:56 +02:00
Brad King
98530d3c14 cm_codecvt: Tell IWYU to keep cmConfigure.h
We no longer need it explicitly for `CM_OVERRIDE`, but we still need to
include it first everywhere.
2017-09-15 11:41:49 -04:00
Luis Caro
6fb36572dc cmake-gui: Enable High DPI scaling
This Qt flag enables UI scaling based on scale factor provided by the
operating system.  Only supported on versions of Qt >= 5.6.

The flag has no effect on macOS, where high DPI support is already
enabled as a setting in the bundle's info.plist.

Fixes: #17026
2017-09-15 10:54:36 -04:00
Brad King
7200ab491b Tests: Fix CMake syntax warning in VSGNUFortran test 2017-09-15 10:49:42 -04:00
Brad King
9da13bc3f7 Tests: Fix some references to 'cmake' executable
Use `${CMAKE_CMAKE_COMMAND}` rather than `cmake` or `${CMAKE_COMMAND}`
in order to ensure we always refer to the `cmake` command being tested.
2017-09-15 10:49:12 -04:00
Brad King
3080a0a611 FindBoost: Improve behavior when thread dependency is missing
The `find_dependency` macro is not meant for use in find modules and
`return()`s from the caller when the package is not found.  Avoid using
it in FindBoost.  Instead use plain `find_package` for the Threads
package and manually forward the `QUIET` argument.  When the Threads
package is missing then treat the Boost `thread` component as missing.

Issue: #17257
2017-09-15 10:42:14 -04:00
Brad King
4e14498f4f Drop now-unused definition of CM_OVERRIDE 2017-09-15 10:06:41 -04:00
Brad King
0b33aee48b Use C++11 override instead of CM_OVERRIDE
We now require C++11 support including `override`.  Drop use of
the old compatibility macro.  Convert references as follows:

    git grep -l CM_OVERRIDE -- '*.h' '*.hxx' '*.cxx' |
      xargs sed -i 's/CM_OVERRIDE/override/g'
2017-09-15 10:06:41 -04:00
Brad King
f1f109e971 Tests: Drop tests that have not run for over 10 years 2017-09-15 08:58:02 -04:00
Christian Pfeiffer
bf1e606f60 FindMPI: Add support for FreeBSD and SLES
Fixes: #17117
2017-09-15 14:55:08 +02:00
Christian Pfeiffer
2f673da69f FindMPI: Support components for various languages 2017-09-15 14:55:08 +02:00
Christian Pfeiffer
9a58e69cc8 FindMPI: Modernization from ground up
This is a near-total rewrite of FindMPI implementing the following
features:

Environmental improvements:

- C++ settings can now be picked from C settings if no dedicated C++
  settings are found (some installs of IBM Platform MPI)
- Fortran settings can now be found on MPICH-1, MVAPICH-1, Microsoft
  MPI and MPICH-2 on Windows.

- Improved flag procession logic: Flags related to security enhancements
  of MPI itself, and unrelated to MPI usage (-fstack-protector-strong on
  e.g. RHEL 7 for MPICH and MVAPICH) will be filtered out properly now.
  -pthread is now being handled. -fno-strict-aliasing, which may be needed
  while compiling MVAPICH (e.g. RHEL 7's MVAPICH package) is also
  filtered.

Features added:

- MPI version can be determined for each language and is exposed as the
  package version
- MPI functionality is being tested to ensure the correctness of
  settings
- MPI-2 C++ bindings can be suppressed if desired by the project or
  user. For older MPIs, this often resolves issues and eliminated the
  infamous SEEK_SET trouble.
- MPI-2 C++ bindings are now being searched for and exposed by a
  variable if detected.
- Fortran support now does not make assumptions over the MPI present and
  works with ILP64 MPI implementations.
- Fortran now exposes which bindings (mpif.h, mpi/mpi_f08 modules) are
  available
- MPI detection can now work hybridly, which for example permits using the
  Fortran modules shipped with some compiler suites together with MPI
  (e.g. PGI on Windows shipping MSMPI modules)
- Ability to determine MPI library version (*requires* try_run, caution)
  upon request
- Ability to determine Fortran capabilities from MPI-3 for each of the
  bindings (subarrays, asynchronous attribute protecting entities) (also
  requires try_run)

Fine grained control over the search process:

- Possibility to selectively enable and disable steps like compiler
  wrapper search and guessing. Permits picking Microsoft MPI over Intel
  MPI if both are loaded (previously not possible without removing the
  IMPI compiler wrappers from the environment)
- Ability to pick MPICH2 over MSMPI (previously the first one located
  was taken)
- A user may now pass compiler flags to the compiler wrapper script,
  enabling much more flexibility. This permits for example linking the
  Intel MPI debug runtime, static linking, ILP64 with Fortran,
  linking tracing, ...
- A user may define a suffix for all MPI binaries that are being looked
  for (useful on Debian/Ubuntu where the alternative MPI installs are each
  appended with their name, e.g. mpicc.mpich and mpicc.lam)

Cache variable improvements

- Instead of the previous plural cache variables a list-of-variables
  approach is now in place. Permits correcting individual variables
  instead of having to wade through a list, also speeds up the search
  process and increases comfort by eliminating duplicate entries in
  LIBRARIES over languages
- MPIEXEC was corrected to MPIEXEC_EXECUTABLE in order to fix the
  grouping in the CMake GUI for the variable (previously ungrouped)
2017-09-15 14:55:08 +02:00
Brad King
c0c5f924fe Merge topic 'refactor-iwyu-code'
3bbe95f5 Clean up iwyu code to not be one big if statement.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1247
2017-09-15 08:54:32 -04:00
Brad King
3449c18c36 Merge topic 'findopenmp-components'
d25f30a6 FindOpenMP: Add support for components
23530151 FindOpenMP: Minor environmental improvements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1266
2017-09-15 08:54:03 -04:00
Brad King
188cdb98a7 Merge topic 'codeblocks-exclude-external'
fb19b778 CodeBlocks: add option to exclude external files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1159
2017-09-15 08:53:04 -04:00
Brad King
4644ab3995 Merge topic 'ranged-for'
63f6fd14 Meta: modernize old-fashioned loops to range-based `for` (CTest).

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1262
2017-09-15 08:51:03 -04:00
Brad King
f801ec0cf7 Merge topic 'update-kwsys'
f02eced5 Merge branch 'upstream-KWSys' into update-kwsys
38b8017f KWSys 2017-09-14 (d85b17e7)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1263
2017-09-15 08:49:33 -04:00
Brad King
ead879df20 Merge topic 'fphsa-fix-version-exact'
5dc215e0 FPHSA: fix typo in comment
a8f70b32 FPHSA: replace left-over VERSION by _FOUND_VERSION.
549366cb FPHSA: Add (failing) unit test when checking EXACT on full version number

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1259
2017-09-15 08:42:16 -04:00
Kitware Robot
6b76615c4e CMake Nightly Date Stamp 2017-09-15 00:01:03 -04:00
Brad King
90b931e115 Merge topic 'doc-RunCMake-result'
a7a6ae5e Tests: Update RunCMake/README.rst to clarify meaning of -result.txt

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1268
2017-09-14 14:51:05 -04:00
Matthew Woehlke
9fd9e448d0 FindGTest: Avoid using find_dependency in a find module
The `find_dependency` macro is not meant for use in find modules.
Instead use plain `find_package` for the Threads package.  Assume that
if it is not found then it isn't needed on the current platform.

Issue: #17257
2017-09-14 14:20:13 -04:00
Brad King
a7a6ae5edd Tests: Update RunCMake/README.rst to clarify meaning of -result.txt
The content of `-result.txt` files is a regex, but the documentation
didn't make this clear.

Suggested-by: Deniz Bahadir <dbahadir@benocs.com>
2017-09-14 14:15:26 -04:00
Christian Pfeiffer
d25f30a6f8 FindOpenMP: Add support for components
Language specific components are added to FindOpenMP to ease consumption
of the module's results.
2017-09-14 18:11:28 +02:00
Christian Pfeiffer
23530151b2 FindOpenMP: Minor environmental improvements
A backup flag for Cray compilers was added and the OpenMP 5.0 Preview 1
document was added to the specification map.
2017-09-14 18:02:50 +02:00
Pavel Solodovnikov
63f6fd144e Meta: modernize old-fashioned loops to range-based for (CTest).
Changes done via `clang-tidy` with some manual fine-tuning
for the variable naming and `auto` type deduction
where appropriate.
2017-09-14 16:11:58 +03:00
Brad King
f02eced51d Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2017-09-14 (d85b17e7)
2017-09-14 08:44:26 -04:00
KWSys Upstream
38b8017fa6 KWSys 2017-09-14 (d85b17e7)
Code extracted from:

    https://gitlab.kitware.com/utils/kwsys.git

at commit d85b17e7b4a9754dfb4c69906378c77626c16d24 (master).

Upstream Shortlog
-----------------

Brad King (1):
      c8cfe4e0 SystemTools: Drop SplitProgramFromArgs function
2017-09-14 08:44:25 -04:00
Yves Frederix
5dc215e03b FPHSA: fix typo in comment 2017-09-14 08:21:38 -04:00
Yves Frederix
a8f70b32fb FPHSA: replace left-over VERSION by _FOUND_VERSION.
This was accidentally left out of commit aec27c152e (FPHSA: use more
localized _FOUND_VERSION instead of VERSION, 2017-09-05).

Fixes: #17281
2017-09-14 08:21:38 -04:00
Yves Frederix
549366cbfc FPHSA: Add (failing) unit test when checking EXACT on full version number
This test detects a regression introduced by commit aec27c152e (FPHSA:
use more localized _FOUND_VERSION instead of VERSION, 2017-09-05).
2017-09-14 08:21:22 -04:00
Brad King
0865a24fc1 Merge branch 'release-3.9' 2017-09-14 07:41:02 -04:00
Brad King
01b9d039e7 Merge topic 'get_filename_component-fix-program-split'
31f73eb1 get_filename_component: Revise PROGRAM/PROGRAM_ARGS split semantics

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1251
2017-09-14 07:39:24 -04:00
Brad King
9c7bf6974f Merge topic 'remove-nmcl'
c2cc91a4 Platforms: Remove Windows-NMcl

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1255
2017-09-14 07:38:29 -04:00
Brad King
5202075c66 Merge topic 'bootstrap-twice-in-source'
a3deae71 bootstrap: Fix running multiple times in-source

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1258
2017-09-14 07:37:58 -04:00
Brad King
208ac57531 Merge topic 'vs-fix-config-map'
64e973e9 Merge branch 'backport-vs-fix-config-map' into vs-fix-config-map
c5b5bb27 VS: Do not consider MAP_IMPORTED_CONFIG_<CONFIG> on non-imported targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1256
2017-09-14 07:37:16 -04:00
Brad King
fda9a94fe6 Merge topic 'autogen-target-depends-fix-3-9-2'
06c8a37e Merge branch 'backport-autogen-target-depends' into autogen-target-depends-fix-3-9-2
b494308d Autogen: Tests: Backport tests for _autogen target dependencies
d0f15817 Autogen: Backport autogen target dependency as file dependency fix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1257
2017-09-14 07:19:40 -04:00
Alexandr (Sagrer) Gridnev
fb19b7789a CodeBlocks: add option to exclude external files
Add variable `CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES` to optionally
exclude files from outside the project root from the project file
written by the CodeBlocks extra generator.  This optionally restores
logic that had been removed by commit v2.8.3~40^2 (CodeBlocks Generator:
Do not omit files in the project file listing, 2010-10-05) in response
to QTCREATORBUG-2250.

Issue: #12110
Fixes: #17188
2017-09-14 13:21:59 +03:00
Kitware Robot
d6b49ee676 CMake Nightly Date Stamp 2017-09-14 00:01:05 -04:00
Craig Scott
dd67b65188 Merge topic 'improve-graphviz-doc'
7ed35aa3 Docs: Improve markup for graphviz related documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1236
2017-09-13 20:38:40 -04:00
Bill Hoffman
3bbe95f58a Clean up iwyu code to not be one big if statement.
This commit changes the internal -E__run_iwyu to be -E__run_co_compile. This
is used for co-compile commands. These are tools that want to mirror the
compiler. For each compiler invocation the tool will be invoked first. This
started as a way to implement include what you use (iwyu), but has expanded
to include cpplint, cppcheck and others. Likely there will be more in the
future as well. This commit implements each one in its own function and
provides a way to add additional ones in the future with less work.
2017-09-13 17:44:49 -04:00
Brad King
06c8a37e58 Merge branch 'backport-autogen-target-depends' into autogen-target-depends-fix-3-9-2
Use the "ours" merge strategy because we already have equivalent
changes on our side.
2017-09-13 15:09:36 -04:00
Brad King
badc892ff8 Merge branch 'backport-autogen-target-depends' into release-3.9
Merge-request: !1257
2017-09-13 15:08:08 -04:00
Sebastian Holtermann
b494308dab Autogen: Tests: Backport tests for _autogen target dependencies 2017-09-13 15:07:46 -04:00