Some commands on Windows do not understand forward slash paths and
require backslashes. In order to help projects generate shell
invocations of such commands, provide a generator expression to convert
paths to the shell-preferred path format for the current generator.
This will allow custom commands to generate paths the same way CMake
does for compiler command invocations.
Extract upstream KWSys using the following shell commands.
$ git archive --prefix=upstream-kwsys/ dc4e4a55 | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' cfeb27cc..dc4e4a55
Ben Boeckel (1):
dd466688 CTestCustom: use list(APPEND)
Domen Vrankar (1):
dc4e4a55 SystemTools: Handle directories in CopyFile{Always,IfDifferent}
In the Ninja generator we run all build rules from the top of the build
tree rather than changing into each subdirectory. Therefore we convert
all paths relative to the HOME_OUTPUT directory. However, the Convert
method on cmLocalGenerator restricts relative path conversions to avoid
leaving the build tree with a "../" sequence. Therefore conversions
performed for "subdirectories" that are outside the top of the build
tree always use full paths while conversions performed for
subdirectories that are inside the top of the build tree may use
relative paths to refer to the same files.
Since Ninja always runs rules from the top of the build tree we should
convert them using only the top-level cmLocalGenerator in order to
remain consistent. Also extend the test suite with a case that fails
without this fix.
The changes in commit 47b060ae (CPackDeb: allow empty directories in
component packages, 2015-09-21), commit b58de9fe (CPack: allow packaging
of empty directories, 2015-09-21), and commit b761e90d (CPack: remove
accidental changes, 2015-09-22) regressed packaging of CMake itself.
Revert the changes until they can be revised and rebased on other
changes that make additional fixes.
fff9434d FindThreads: officially announce it works with only C++ enabled
66db914a FindThreads: fix printing a pointer value in test code
0b38424c FindThreads: make the call to try_run() work also if only C++ is enabled
9924a212 FindThreads: replace CheckIncludeFiles by CheckIncludeFile
a27bc0cc Check(Function|Library|Symbol)Exists: make it work if only C++ is enabled
7279f293 FindThreads: add simple testcase
8bfff686 cmLocalGenerator: Compute object max path on construction.
2c2479fb cmGlobalGenerator: Create all local generators after Configure().
194bb068 cmGlobalGenerator: Remove unused method.
c5f07e05 cmGlobalGenerator: Create local generators after all makefiles configured.
dd408de4 cmGlobalGenerator: Create local generator after configuring the makefile.
8a88089b cmMakefile: Create the local generator after configuring the makefile.
934aa454 Makefiles: Remove need to create local generator at configure time.
61b48e70 Makefiles: Port to cmOutputConverter.
This causes a warning in C mode, and entirely fails in C++ mode:
CMake/Modules/CheckForPthreads.c: In function ‘runner’:
CMake/Modules/CheckForPthreads.c:34:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
printf("%d CC: %d\n", (int)args, cc);
^
Use %p to print out a pointer value, which will not cause any problems.
While at it, also add a branch using CheckIncludeFileCXX. Also give a better
error message if no supported language is enabled. C++ support isn't working
yet, but it has never worked.
When parsing digits we know our `c - '0'` expression results in a
non-negative value due to preceding conditions. Simply cast the result
to UInt. This fixes compilation on SolarisStudio 12.4.
In TryCompileCode we construct an internal argv[] vector that needs to
have a fake argv[0] so our internal cmake command line looks like a real
command line. Fix construction of the fake argv[0] when try_compile is
called without the CMAKE_FLAGS argument. Otherwise the first internal
-DVAR=val argument that we use to pass information like
CMAKE_OSX_SYSROOT is ignored.