Commit Graph

42313 Commits

Author SHA1 Message Date
Brad King 8375c303e2 VS: Fix detection of clang-cl with -T llvm
When using a VS generator with `-T llvm`, MSBuild relies on the "LLVM
Compiler Toolchain" VS Extension.  This does not put `clang-cl` in the
`PATH` inside the build, and LLVM no longer provides a `cl` replacement
either.  Therefore we need another way to extract the path to the
`CMAKE_{C,CXX}_COMPILER`.  Fortunately the LLVM VS integration provides
a `$(ClangClExecutable)` macro we can reference to get the path.

Fixes: #18983
2019-02-26 09:58:51 -05:00
Brad King e6897c72e7 CMake 3.14.0-rc2 v3.14.0-rc2 2019-02-15 07:46:43 -05:00
Brad King 113a395ee7 Merge branch 'try_compile-expand-compile-defs' into release-3.14
Merge-request: !2965
2019-02-15 06:47:59 -05:00
Brad King dac6cf1b99 Merge branch 'FindLibXml2' into release-3.14
Merge-request: !2970
2019-02-15 06:47:22 -05:00
Saleem Abdulrasool fd86a4de04 FindLibXml2: Document LibXml2_FOUND as preferred case
Both `LIBXML2_FOUND` and `LibXml2_FOUND` are provided but the modern
convention is to use the case that matches the module name.
2019-02-15 06:41:32 -05:00
Brad King cde2596a19 try_compile: Restore expansion of ;-list in COMPILE_DEFINITIONS
The quoting added by commit 8c5221fb1f (try_compile: Preserve special
characters in COMPILE_DEFINITIONS, 2019-01-21, v3.14.0-rc1~108^2~3)
broke the case that the `COMPILE_DEFINITIONS` value contains a `;`.
Without the quoting the `;` would be generated literally in an unquoted
argument in the test `CMakeLists.txt` file and would then be expanded.
With quoting the `;` is preserved, which is not the old behavior.

Fix this by expanding the `;`-list ahead of time.  Add test cases for
behavior with both `#` and `;`.

This was noticed with the PGI compiler where we set
`CMAKE_CXX*_STANDARD_COMPILE_OPTION` to values like `--c++17;-A`.  The
symptom had also been observed while preparing commit ef8f237686
(ParseImplicitIncludeInfo: add SunPro Fortran and PGI compiler, Cray
fix, 2019-01-29, v3.14.0-rc1~26^2~2) but was not recognized at the time
as a regression.  Revert the workaround added by that commit.

Fixes: #18919
2019-02-15 06:21:19 -05:00
Brad King 9d3710affe Merge branch 'vs2017-sdk81' into release-3.14
Merge-request: !2962
2019-02-14 11:24:16 -05:00
Brad King 2f51f281a8 Merge branch 'fortran-submodule-names' into release-3.14
Merge-request: !2958
2019-02-14 10:24:43 -05:00
Brad King d80ecba5c2 Fortran: Fix submodule file names across compilers
The naming convention for submodule files varies across compilers.  Add
a table to the compiler information modules and thread the information
through to the Fortran module dependency parser.  Fill out the table for
compiler ids known to support Fortran submodules.

Fixes: #18746
2019-02-14 10:23:02 -05:00
Brad King 72057d9c15 Fortran: Thread compiler id through to internal Fortran parser 2019-02-14 10:23:02 -05:00
Brad King 7ae329e2ed Fortran: Factor out .mod and .smod file name construction 2019-02-14 10:23:02 -05:00
Brad King 5c26e3c5e3 VS: Fix validation of Windows 8.1 SDK
The check added by commit 0a29a31161 (VS2017: Verify Windows 8.1 SDK
before using it, 2017-04-25, v3.8.1~2^2) used the wrong path to
`windows.h` within the SDK, leading to it never being detected.

Fixes: #18923
2019-02-14 08:25:26 -05:00
Brad King 9f351b93ab Merge branch 'fix-pointer-truncation' into release-3.14
Merge-request: !2956
2019-02-13 10:28:02 -05:00
Zsolt Parragi 76a5ac2100 cmListFileLexer: Add missing include to avoid possible pointer truncation
The `cmsys/Enconding.h` include had a typo in its surrounding ifdef,
possibly causing a missing function declaration (`cmsysEncoding_DupToWide`).
As this is C code, this resulted in the code compiling, but with a truncated
return value, possibly causing crashes.
2019-02-13 10:22:59 -05:00
Brad King 30783addc1 Merge branch 'fix-legacy-implicit-includes' into release-3.14
Merge-request: !2957
2019-02-13 10:05:48 -05:00
Brad King 6fc3382944 Update logic for sysroot in detected implicit include directories
Since commit 5990ecb741 (Compute implicit include directories from
compiler output, 2018-12-07, v3.14.0-rc1~108^2) the values of the
`CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES` variables are computed from
a real compiler invocation.  In this case the paths under the sysroot
should already have the sysroot prefix so we should no longer have to
add the sysroot prefix.  However, it is also possible for project code
to add its own paths to `CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES`
without the sysroot prefix and expect the historical addition of the
sysroot prefix to be preserved.

Try to account for both cases by conditionally adding the sysroot prefix
on implicit include directories that do not already have it.
2019-02-13 10:03:56 -05:00
Brad King 2ad14ef4ea cmAlgorithms: Add cmHasPrefix to match existing cmHasSuffix 2019-02-13 09:52:20 -05:00
Brad King 557b2d6e65 Fix regression in -I/usr/include exclusion logic
The change in commit 15ad830062 (Refactor exclusion of -I/usr/include to
avoid per-language values, 2019-01-21, v3.14.0-rc1~108^2~4) caused the
exclusion to apply to Fortran, but it was only meant for C, CXX, and
CUDA.  The purpose of the change was to prepare for the value of
`CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES` to be computed from the
actual compiler instead of hard-coded.  We need to preserve exclusion of
`-I/usr/include` if the compiler has any implicit include directory that
looks intended to replace it, e.g. `<sdk>/usr/include` on macOS.

Fixes: #18914
2019-02-13 09:52:20 -05:00
Brad King 017598a444 macOS: Fix addition of <sdk>/usr/include to default implicit include dirs
In commit 1293ed8507 (ParseImplicitIncludeInfo: keep implicit incl.
consistent when rerunning cmake, 2019-01-30, v3.14.0-rc1~26^2) the
`Platform/UnixPaths` module was updated to add `/usr/include` to
`CMAKE_{C,CXX,CUDA}_IMPLICIT_INCLUDE_DIRECTORIES` through an
initialization variable used by `CMakeDetermineCompilerABI` instead of
directly.  This approach makes it only a default that can be overridden
by detection of the implicit include directories really used by the
compiler.

The addition of `<sdk>/usr/include` to default implicit include
directories by the `Platform/Darwin` module needs the same update but
was accidentally left out of the original commit.
2019-02-13 09:52:19 -05:00
Brad King 1c4570e22e Merge branch 'genex-GENEX_EVAL-fix-recursion' into release-3.14
Merge-request: !2954
2019-02-13 08:37:38 -05:00
Marc Chevrier e429e9af42 genex: Fix erroneous handling of recursion for $<GENEX_EVAL:>
Fixes: #18894
2019-02-13 08:37:02 -05:00
Brad King a251b61181 Merge branch 'doc-if-legacy' into release-3.14
Merge-request: !2950
2019-02-11 14:44:00 -05:00
Juuso "Linda" Lapinlampi 572b4fd85b Help: Fix elseif/endif typo
In CMake 3.13.x, we had this evaluation for if() conditions:

    if(a) elseif(b) else(a) endif(a)

The sensible intention of the change in commit c2efb3efcd (Help: Revise
docs on Scripting Commands, 2018-10-16, v3.14.0-rc1~505^2) was:

> "endif", "endfunction" etc: Explain that the argument is optional and
> maintained for compatibility only

Instead of "endif", it ended up being written to the documentation as
"elseif" by the commit author (oops) to if()'s page.

    if(a) elseif(a!?) else() endif(a?)

Truthfully, endif()'s parameter should be an optional verbatim repeat
and not elseif()'s. If it wasn't, elseif() would be described to be the
same as if(). The rightful intended description is:

    if(a) elseif(b) else() endif()

Fix that typo.
2019-02-11 14:41:51 -05:00
Brad King 3ff5a43c49 Merge branch 'FindMatlab-version-empty' into release-3.14
Merge-request: !2949
2019-02-11 13:21:41 -05:00
Sebastian Nagel 40176749bc FindMatlab: Tolerate empty version log file 2019-02-11 13:20:55 -05:00
Brad King 633b3145c0 Merge branch 'FindOctave-interp-target' into release-3.14
Merge-request: !2931
2019-02-11 08:06:38 -05:00
Brad King 9e309cd4f0 Merge branch 'ghs-relnotes' into release-3.14
Merge-request: !2934
2019-02-11 07:50:00 -05:00
Fred Baksik 2d701b78de Help: Update 3.14 release notes for GHS changes 2019-02-11 07:49:08 -05:00
Peter Stroia-Williams 6725975bd8 FindOctave: Add target for octinterp
This change adds the Octave::Octinterp target to make the octinterp
library available without users having to resort to using the
Octave_INTERP_LIBRARY variable.
2019-02-08 20:34:30 +00:00
Brad King 88031dd09a Merge branch 'ghs-updates' into release-3.14
Merge-request: !2943
2019-02-08 14:02:14 -05:00
Brad King 3b58b647ae Merge branch 'fix-exclude-dir-with-iface' into release-3.14
Merge-request: !2937
2019-02-08 14:02:03 -05:00
Kyle Edwards 3b87e7aaa3 Merge branch 'file_create_link_release_note' into release-3.14
Merge-request: !2942
2019-02-08 13:47:35 -05:00
Tushar Maheshwari e729f2b3fd Help: Add notes for file(CREATE_LINK) subcommand 2019-02-08 13:20:45 -05:00
Fred Baksik bcd99fac60 GHS: Document usage of GHS_NO_SOURCE_GROUP_FILE
-- Also change variable name to CMAKE_GHS_NO_SOURCE_GROUP_FILE
2019-02-08 13:07:00 -05:00
Brad King f87e724e8c Fix EXCLUDE_FROM_ALL on directory with an interface library
Since commit dc6888573d (Pass EXCLUDE_FROM_ALL from directory to
targets, 2019-01-15, v3.14.0-rc1~83^2) we automatically forward the
`EXCLUDE_FROM_ALL` to targets as they are created.  This regressed
support for interface libraries on which the property is not allowed.

Skip forwarding the `EXCLUDE_FROM_ALL` property for interface libraries.
It is not needed on them because they do not participate in the
generated build system anyway.

Fixes: #18896
2019-02-08 08:17:48 -05:00
Brad King 12b8e41c07 Merge branch 'doc-object-library-link' into release-3.14
Merge-request: !2933
2019-02-07 09:36:58 -05:00
Brad King 0f87bd1bd8 Help: Clarify 3.14 release note about object library dependencies
Revise the note from commit bab24e782c (target_link_libraries: Propagate
dependencies of object libraries, 2018-12-10, v3.14.0-rc1~260^2).
2019-02-07 09:34:17 -05:00
Brad King 1e2e12889b Merge branch 'cpack-ifw-error-wording' into release-3.14
Merge-request: !2928
v3.14.0-rc1
2019-02-07 06:51:28 -05:00
Joachim Wuttke (o) 60a8d4c5f4 CPack/IFW: Correct wording in error message 2019-02-07 06:51:15 -05:00
Brad King 6383dc398a Merge branch 'FindHDF5-cleanup' into release-3.14
Merge-request: !2916
2019-02-07 06:48:52 -05:00
Michael Hirsch, Ph.D d3d9e6b760 FindHDF5: Modernize formatting of variable documentation 2019-02-07 06:47:07 -05:00
Michael Hirsch, Ph.D acbd69c219 FindHDF5: Use execute_process instead of exec_program 2019-02-07 06:47:07 -05:00
Brad King f657bcbd48 Merge branch 'xcode-stdlib-flags' into release-3.14
Merge-request: !2919
2019-02-07 06:44:19 -05:00
Gregor Jasny 8af334f5ba Xcode: Derive stdlib from CXX flags
Closes: #18396
2019-02-07 06:43:51 -05:00
Brad King f835526d8f Merge branch 'vs-csharp-nowarn-numbers' into release-3.14
Merge-request: !2923
2019-02-07 06:41:22 -05:00
Wil Stark 822697996e VS: Fix nowarn compiler option to accept warning numbers.
Warning disables are transferred to the VS IDE `<NoWarn>` node.

Fixes: #18878
2019-02-07 06:39:45 -05:00
Brad King bf1c2a2593 CMake 3.14.0-rc1 version update 2019-02-06 10:08:35 -05:00
Brad King 0b882e4213 Help: Drop development topic notes to prepare release
Release versions do not have the development topic section of
the CMake Release Notes index page.
2019-02-06 10:06:25 -05:00
Brad King 6f23321d40 Merge topic 'doc-3.14-relnotes'
aa9161fd57 Help: Organize and revise 3.14 release notes
0d1a9282c4 Help: Consolidate 3.14 release notes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2925
2019-02-06 10:04:49 -05:00
Brad King aa9161fd57 Help: Organize and revise 3.14 release notes
Add section headers similar to the 3.13 release notes and move each
individual bullet into an appropriate section.  Revise a few bullets.
2019-02-06 09:52:35 -05:00