22187 Commits

Author SHA1 Message Date
Brad King
0d5a2252ef CMake 3.8.2 2017-05-31 09:47:47 -04:00
Brad King
93cadfc2b5 Merge branch 'source_group-TREE-relative-path' into release 2017-05-17 09:07:00 -04:00
Mateusz Janek
4716f2be83 source_group: Restore TREE support for relative paths
The fix in commit v3.8.1~4^2 (source_group: Fix TREE with root that is
not current source dir, 2017-04-20) accidentally broke support for
specifying paths relative to the source directory.  Fix it and add a
test covering the case.

While at it, fix a typo in a variable name.

Fixes: #16876
2017-05-17 09:04:02 -04:00
Aleksey Chernov
9557b403f5 cmFileCommand: Fix build on mingw-w64
Include header needed for `CP_ACP`.
2017-05-15 14:25:37 -04:00
Brad King
8bd6af0d63 CMake 3.8.1 2017-05-02 08:40:39 -04:00
Brad King
341486fd09 Merge branch 'vs2017-sdk-detection' into release 2017-04-25 11:05:37 -04:00
Roger Leigh
0a29a31161 VS2017: Verify Windows 8.1 SDK before using it
The detection logic added by commit v3.8.0-rc2~14^2 (VS2017: If Win 8.1
SDK is not available, use Win 10 SDK, 2017-02-20) was incomplete.  It is
possible for the Win 8.1 SDK registry entry to exist, and even the
directory, but the header files to not actually be installed.  Teach
`cmGlobalVisualStudio15Generator::IsWin81SDKInstalled` to verify that
the `windows.h` header actually exists in the SDK directory.  We do this
in `cmGlobalVisualStudio14Generator::GetWindows10SDKVersion` for the
Windows 10 SDK already.

Fixes: #16811
2017-04-25 11:04:52 -04:00
Brad King
627288fe23 Merge branch 'backport-source_group-TREE-alt-root' into release 2017-04-21 15:36:58 -04:00
Mateusz Janek
1b4d2c741a source_group: Fix TREE with root that is not current source dir
Also raise an error if files are given that are not below the root.

Fixes: #16807
2017-04-21 15:31:02 -04:00
Brad King
59224c3989 Merge branch 'fix-vs2017-guid-braces' into release 2017-04-20 10:31:14 -04:00
Richard Walters
fd7e8f339a VS: Fix project reference inspection in VS IDE
The braces around project reference GUIDs for vcxproj projects were
apparently optional in the past, but Visual Studio 2017 is more strict,
displaying a warning, and not displaying project reference properties
unless the braces are present.

Fixes: #16820
2017-04-20 10:30:21 -04:00
Brad King
da7833c5bb CMake 3.8.0 2017-04-10 11:16:00 -04:00
Brad King
9e32b88784 CMake 3.8.0-rc4 2017-03-30 09:16:41 -04:00
Brad King
6ca509e7c6 Merge branch '16742-swift-3.0' into release 2017-03-29 10:40:59 -04:00
Brad King
d4a995750a Merge branch 'vs-rc-defines' into release 2017-03-29 09:24:29 -04:00
Gregor Jasny
c03141c04c Swift: Default to Swift 3.0 with Xcode 8.3 and later
Xcode 8.3 has dropped support for Swift 2.3 so that compiler and
feature detection failed.

Closes #16742
2017-03-28 16:06:29 -04:00
Brad King
c77194ec47 VS: Honor preprocessor definitions in RC flags
The VS generators use the C (or CXX) preprocessor definitions for
the Windows Resource Compiler tool.  This causes definitions parsed
out of `CMAKE_RC_FLAGS[_<CONFIG>]` variables to be dropped.  Fix
the implementation to preserve both.

Issue: #16745
2017-03-28 13:10:55 -04:00
Brad King
1449f6f63d cmVisualStudio10TargetGenerator: De-duplicate preprocessor defs 2017-03-28 13:10:55 -04:00
Brad King
8a619e8c85 cmIDEOptions: Add GetDefines method 2017-03-28 13:10:55 -04:00
Brad King
8c94f5085d Merge branch 'ninja-fix-sysconf-non-limit' into release 2017-03-27 13:42:30 -04:00
Christian Pfeiffer
92fe00d33c Ninja: Fix command line limit when sysconf has no ARG_MAX
The `sysconf(3)` manual explains that the return value can be `-1` for
limits if there is no definite limit.  Recognize this case and skip
using the value as a limit candidate.  Otherwise we use response files
unconditionally on such systems instead of checking other limits.

Fixes: #16740
2017-03-27 13:42:19 -04:00
Brad King
3ed87b7ee1 Merge branch 'InstallRequiredSystemLibraries-vs2017' into release 2017-03-27 11:50:36 -04:00
Brad King
cf784d9ff5 Add undocumented CMake language means to find VS 2017
Add a query to the `cmake_host_system_information` command to get
the location of a VS 2017 installation.  Leave it undocumented and
for internal use for now.
2017-03-27 11:43:01 -04:00
Brad King
3b7f19a72f CMake 3.8.0-rc3 2017-03-24 08:47:13 -04:00
Brad King
324d7f5a50 Merge branch 'server-mode-fix-home-dir-check' into release 2017-03-23 08:42:51 -04:00
Tobias Hunger
8285ad511a server-mode: Make CMAKE_HOME_DIRECTORY more reliable
Make CMAKE_HOME_DIRECTORY detection work more reliably in the face
of symlinks.

Closes #16736
2017-03-22 17:31:02 +01:00
Brad King
849f1ec1c0 Merge branch 'ninja-fortran-depfile-fix' into release 2017-03-21 15:37:07 -04:00
Brad King
805706b36d Ninja: Fix Fortran include dependency on generated file
Work around upstream ninja issue 1251 by converting include directories
used by our Fortran dependency scanner to the same path format that we
use in preprocessor `-I` flags and in the `build.ninja` manifest.

Fixes: #16722
2017-03-21 15:19:01 -04:00
Brad King
1356ef4f84 Merge branch 'cuda_no_ninja_response_support' into release 2017-03-21 11:15:49 -04:00
Robert Maynard
feaea0658c CUDA: Disable support for using response files. 2017-03-21 11:09:18 -04:00
Brad King
ac66dec5c5 Merge branch 'fix_csharp_custom_targets' into release 2017-03-07 09:30:46 -05:00
Michael Stürmer
bd8b5401cf VS: Do not treat custom targets as CSharp targets
Fixes: #16697
2017-03-07 09:30:27 -05:00
Brad King
485685fdd9 Revert "Remove CTestTestfile.cmake when BUILD_TESTING is OFF"
This reverts commit v3.8.0-rc1~305^2 (Remove CTestTestfile.cmake when
BUILD_TESTING is OFF, 2016-11-14).  It breaks projects that never enable
testing but create their own `CTestTestfile.cmake` manually instead.
2017-03-06 11:31:19 -05:00
Brad King
e1adec32b8 CMake 3.8.0-rc2 2017-03-03 08:29:09 -05:00
Brad King
8d1af9cad2 Merge branch 'implicit-dir-symlinks' into release 2017-03-02 08:38:21 -05:00
Brad King
fce6233d8b Merge branch 'csproj_add_free_source_tags' into release 2017-03-02 08:38:16 -05:00
Brad King
f3102ca884 Merge branch 'backport-implicit-dir-symlinks' into implicit-dir-symlinks 2017-03-02 08:36:13 -05:00
Brad King
c3fb650c85 cmOrderDirectories: Consider symlinks when checking implicit directories
When checking whether a directory is "implicit" (e.g. implicit link
directory or implicit rpath directory), resolve the real path of both
sides of the comparison.  Otherwise we will not recognize paths like
`/usr/lib32` as implicit when `/usr/lib` is implicit and `lib32` is
actually a symlink to `lib`.  This can lead to addition of unnecessary
entries to the RPATH of a binary, for example.

Fixes: #16682
2017-03-02 08:35:48 -05:00
Michael Stürmer
9588d0a2e2 VS: add VS_CSHARP_<tagname> sourcefile property 2017-03-01 15:31:05 -05:00
Brad King
b1a37362b8 cmOrderDirectories: Factor out implicit directory check 2017-03-01 12:39:18 -05:00
Brad King
baed38107e Merge branch 'find-libarch-not-symlink' into release 2017-02-28 15:57:54 -05:00
Brad King
6f5aede716 find_library: Skip 'lib => lib<arch>' searches if one symlinks the other
The `FIND_LIBRARY_USE_LIB<arch>_PATHS` global properties ask
`find_library` to look in `lib<arch>` directories automatically before
corresponding `lib` directories.  However, if `lib<arch>` is just a
symlink to `lib` (or vice-versa) then we should skip adding the
`lib<arch>` path.  Such symlinks typically only exist to satisfy
software that expects the `lib<arch>` path to be available.

Fixes: #16687
2017-02-28 14:56:54 -05:00
Brad King
e67963ed73 cmFindLibraryCommand: Refactor AddArchitecturePath logic
Use boolean variables to save results and rename variables to more
closely represent their roles.
2017-02-28 14:56:13 -05:00
Brad King
ad3bf56dd2 Merge branch 'object-library-compile-pdb' into release 2017-02-24 11:31:46 -05:00
Brad King
feff52d42c Fix COMPILE_PDB_NAME when used on an OBJECT library
When `COMPILE_PDB_NAME` is used without `COMPILE_PDB_OUTPUT_DIRECTORY`
we cannot fall back on the link `PDB_OUTPUT_DIRECTORY` for an object
library because it has no link step.

Fixes: #16674
2017-02-24 11:26:52 -05:00
Brad King
8ea060f960 Merge branch 'ninja-no-full-path' into release 2017-02-24 10:50:21 -05:00
Brad King
666ad1df2d Revert "Ninja: Use full path for all source files"
This reverts commit v3.7.0-rc1~275^2 (Ninja: Use full path for all
source files, 2016-08-05).  Unfortunately using absolute paths can
cause incorrect rebuilds due to ninja limitations.  The ninja
manual [1] explains:

> ... using absolute paths, your depfile may result in a mixture of
> relative and absolute paths. Paths used by other build rules need
> to match exactly.

Passing an absolute path to a source file to the compiler while using a
relative path in the ninja build manifest can cause such mixture and
lead to incorrect rebuilds.  Simply revert the change for now.

Note that there was a follow-up to the original change in commit
v3.7.0-rc2~10^2 (Ninja: Fix RC language depfile generation with
cmcldeps, 2016-10-13).  We don't need to revert that because that
change made the relevant code cleverly adapt to whatever variable
we use to reference the source file.

[1] https://ninja-build.org/manual.html#_deps

Fixes: #16675
Issue: #13894
2017-02-24 10:15:50 -05:00
Brad King
5eb4d9d80b Merge branch 'vcxproj-indentation' into release 2017-02-23 14:01:05 -05:00
Brad King
2cb165e8c0 VS: Fix .vcxproj indentation
In commit v3.8.0-rc1~87^2~1 (VS: added support for C#, 2017-01-09) we
removed what looked like a no-op streaming operation but in fact it
is responsible for applying indentation.  Restore the line.
2017-02-23 13:38:47 -05:00
Brad King
25480ffbf6 Merge branch 'clang-format-attrs' into release 2017-02-22 17:00:58 -05:00