Commit Graph

17487 Commits

Author SHA1 Message Date
Kolan Sh 3b68e2c829 Fix for 'mode_t' type definition. 2015-04-22 22:58:00 +03:00
Brad King 91d5261b58 CMake 3.2.2 2015-04-13 09:09:42 -04:00
Brad King 74337b87ac Merge branch 'custom-command-multiple-outputs' into release 2015-04-10 16:27:55 -04:00
Brad King 9660a3ccea Makefile: Fix multiple custom command outputs with one missing
The use of "cmake -E touch_nocreate" added in commit v3.2.1~4^2
(Makefile: Fix multiple custom command outputs regression, 2015-03-06)
caused builds to fail when one of the outputs is intentionally not
created.  This was fixed by our parent commit by making touch_nocreate
succeed when the file is missing.  Add a test case covering it.

For the Watcom WMake generator, check for the SYMBOLIC source file
property separately on each output.  The mark is needed on outputs that
are not really created to tell 'wmake' not to complain that it is
missing.  The mark is also needed on outputs that are created or 'wmake'
will not consider them out of date when they exist.

Inspired-by: Ben Boeckel <ben.boeckel@kitware.com>
2015-04-10 16:27:42 -04:00
Brad King 5c08e2559c KWSys SystemTools: Teach Touch with !create to succeed on missing file 2015-04-10 12:51:10 -04:00
Betsy McPhail 1f289095f9 file(LOCK): Close file descriptor/handle when releasing a lock
The file lock functionality added in commit v3.2.0-rc1~297^2~1 (file:
Add LOCK subcommand to do file and directory locking, 2014-11-26) forgot
to close the lock file descriptors.  Eventually it was possible to run
out of file descriptors and locks could not longer be acquired.  Fix
this by closing the file descriptor or handle when we are done with it.
Also set the member back to the initial value from the constructor
to leave everything in a consistent state (useful for debugging).

Co-Author: Ruslan Baratov <ruslan_baratov@yahoo.com>
2015-03-25 09:00:51 -04:00
Brad King 732d8a467a CMake 3.2.1 2015-03-10 09:15:35 -04:00
Brad King 244e3d0fc9 Merge branch 'ninja-check-root-robustly' into release 2015-03-09 13:37:15 -04:00
Brad King a6b0908571 Ninja: Improve internal check for generating at the top-level (#15436)
Simply check for whether the local generator has a parent instead of
depending on a string comparison of directory names.
2015-03-09 13:36:46 -04:00
Brad King 77f3804ab2 Merge branch 'configure_file-NEWLINE_STYLE-no-warn' into release 2015-03-09 09:20:58 -04:00
Brad King 3ef776fc38 configure_file: Do not warn about newline style arguments
The unknown argument warning added by commit v3.2.0-rc1~452^2
(configure_file: Warn about unknown arguments, 2014-10-31) failed to
account for options handled by the NewLineStyle member instead of
directly in the main loop.  Simply whitelist them for now.
2015-03-09 09:17:59 -04:00
Brad King cc1ee21383 Merge branch 'custom-command-multiple-outputs' into release 2015-03-06 20:00:42 -05:00
Brad King 66a9c90c4b Makefile: Fix multiple custom command outputs regression (#15116)
In commit v3.2.0-rc1~272^2~2 (Makefile: Fix rebuild with multiple custom
command outputs, 2014-12-05) we changed the generated makefile pattern
for multiple outputs from

  out1: depends...
          commands...
  out2: out1

to

  out1 out2: depends...
          commands...

This was based on the incorrect assumption that make tools would treat
this as a combined output rule and run the command(s) exactly once for
them.  It turns out that instead this new pattern is equivalent to

  out1: depends...
          commands...
  out2: depends...
          commands...

so the commands may be run more than once.

Some documents suggest using a "dedicated witness" stamp file:

  stamp: depends...
          rm -f stamp
          touch stamp.tmp
          commands...
          mv stamp.tmp stamp
  out1 out2: stamp

However, if the commands fail the error message will refer to the stamp
instead of any of the real outputs, which may be confusing to readers.
Also, this approach seems to have the same behavior of the original
approach that motiviated the above commit: multiple invocations are
needed to bring consumers of the outputs up to date.

Instead we can return to the original approach but add an explicit
touch to each extra output rule:

  out1: depends...
          commands...
  out2: out1
          touch -c out2

This causes make tools to recognize that all outputs have changed and
therefore to execute any commands that consume them.
2015-03-06 19:58:30 -05:00
Brad King a49a467fd0 CMake 3.2.0 2015-03-03 08:38:36 -05:00
Brad King eb3bced50f Merge branch 'backport-KWSys-SystemTools-CopyFileAlways-fix' into release 2015-03-02 08:55:21 -05:00
Paul Martin b8ea771b13 KWSys SystemTools: Update CopyFileAlways stream library workarounds
On some stream libraries failbit is not set when trying to read past
EOF.  Instead, always exit the copy loop when gcount() is zero.
2015-03-02 08:55:13 -05:00
Brad King 6b6852a0eb Merge branch 'fix-crash-on-bad-LANG_STANDARD' into release 2015-02-28 12:15:34 -05:00
Brad King 00d66557d4 Diagnose invalid <LANG>_STANDARD value instead of crashing (#15426) 2015-02-28 12:14:42 -05:00
Brad King 693a944736 Merge branch 'install-manifest-optimize' into release 2015-02-26 15:06:00 -05:00
Robert Goulet c48141744e install: Write the entire installation manifest at once
Avoid a separate open/close for each file installed.  Use a single
file(WRITE) instead of a loop with file(APPEND).
2015-02-26 15:04:07 -05:00
Brad King 987d4a1240 VS: Do not generate a BOM in .sln files
Revert commit v3.2.0-rc1~165^2 (Encoding:  Write Visual Studio solution
file with BOM, 2014-12-26).  The BOM breaks the VS IDE version selector
when loading the .sln from Windows Explorer.
2015-02-24 13:30:50 -05:00
Brad King 99575c9ac1 CMake 3.2.0-rc2 2015-02-23 11:10:12 -05:00
Brad King 57d4e1c776 Merge branch 'private-FindJsonCpp' into release 2015-02-20 08:33:03 -05:00
Brad King a576844263 FindJsonCpp: Drop new module due to upstream jsoncpp providing package
Since jsoncpp 0.7.0 (2014-11-20) the upstream may provide a CMake
package configuration file such that find_package(jsoncpp) will find a
jsoncppConfig.cmake file.  In order to avoid conflicting with this
(especially on case-insensitive filesystems), and since we always prefer
projects to provide package config files (that they maintain), it is
better to not provide FindJsonCpp publicly.

Move FindJsonCpp into a private source directory that is not installed
so that we can still use it for building CMake itself.

Reported-by: Ryan Pavlik <ryan.pavlik@gmail.com>
2015-02-20 08:22:02 -05:00
Brad King 1ade687d8d cmake-gui: Reset generator platform and toolset on configure (#15411)
At the start of each configure step we already reset the generator
selection (CMAKE_GENERATOR) to match that loaded for the current
project.  Add missing code to reset the generator platform and toolset
(CMAKE_GENERATOR_PLATFORM and CMAKE_GENERATOR_TOOLSET) also so that they
do not leak across projects.
2015-02-19 09:14:38 -05:00
Brad King 001cd08187 Merge branch 'makefile-missing-comment' into release 2015-02-10 09:46:23 -05:00
Nils Gladitz eeb2831b5f Makefile: Fix regression in target-bound custom command COMMENT output
Fix a logic typo introduced by commit v3.1.0-rc1~781^2 (Generalize
cmCustomCommandGenerator to more fields, 2014-03-10).
2015-02-10 09:22:05 -05:00
Brad King 8772420e2f Merge branch 'no-global-setlocale' into release 2015-02-06 13:38:41 -05:00
Brad King 0f870234fe Merge branch 'backport-no-global-setlocale' into no-global-setlocale
Resolve conflict in Source/CMakeLists.txt by taking both changes.
2015-02-06 13:35:21 -05:00
Brad King cd408d93fd Add setlocale() calls around use of libarchive APIs (#14934, #15377)
The libarchive APIs use nl_langinfo(CODESET) for iconv so they need the
locale to be set for LC_CTYPE.  However, the rest of CMake does not
define any behavior for non-ASCII character classification/conversion so
we do not want to setlocale() globally.  Add a RAII class to save, set,
and restore the locale around calls to libarchive APIs.

Inspired-by: Clinton Stimpson <clinton@elemtech.com>
2015-02-06 13:32:57 -05:00
Brad King 87be2e1427 Do not call setlocale() globally in CMake applications (#15377)
Revert the changes made by commit v3.1.0-rc1~406^2~1 (Encoding: Add
setlocale() to applications, 2014-05-30) and commit v3.1.0-rc1~406^2
(Encoding: Change to only set LC_CTYPE, 2014-06-11), and other setlocale
calls added later in their spirit.  CMake has not been taught how to
deal with non-C locales everywhere.  We do not define any functionality
for character conversions for non-ASCII strings.  Another solution will
be needed to address the original problem motivating addition of
setlocale() calls.
2015-02-06 13:32:26 -05:00
Brad King cb01f15170 CMake 3.2.0-rc1 version update 2015-02-05 09:55:27 -05:00
Brad King 9042c875dc Merge topic 'fix-C-standard-features'
fb3487a9 Features: Fix C90 feature detection.
6027798a Features: Allow setting standard dialect below the default.
9d767810 Features: Populate CMAKE_<LANG>_STANDARD_DEFAULT only for supported compilers.
72537e44 Features: Add dialect compile flags only if default is known.
82c9d686 AppleClang: Remove redundant UNIX condition.
2015-02-05 09:25:14 -05:00
Kitware Robot ebe1f4f896 CMake Nightly Date Stamp 2015-02-05 00:01:15 -05:00
Stephen Kelly 6027798a30 Features: Allow setting standard dialect below the default.
If the requested standard dialect is older than the default dialect
then we must use a flag because we cannot decay to a newer standard.
2015-02-04 18:36:36 -05:00
Stephen Kelly 72537e4436 Features: Add dialect compile flags only if default is known.
The CMAKE_<LANG>_STANDARD_DEFAULT variable indicates whether the
compiler has any notion of standard levels and that CMake knows
about them.  If no language standard levels are available, skip
all logic to attempt to add a flag for the level.

Also fail with an internal error if a bad default value is set.
2015-02-04 18:28:07 -05:00
Brad King 44100adc6c CMake 3.1.2 2015-02-04 13:58:33 -05:00
Brad King f560fdddd1 Merge topic 'fix-default-install-config'
dea42d92 install: Fix regression in default configuration selection
2015-02-04 12:30:17 -05:00
Brad King be072d3fe1 Merge topic 'Qt-AUTOUIC-file-origin'
2fed8e17 QtAutogen: Issue error message with origin file (#15342).
2015-02-04 12:30:12 -05:00
Kitware Robot 5f37785717 CMake Nightly Date Stamp 2015-02-04 00:01:09 -05:00
Stephen Kelly 2fed8e173c QtAutogen: Issue error message with origin file (#15342). 2015-02-03 22:52:17 +01:00
Brad King fdb0799d75 Merge branch 'fix-default-install-config' into release-3.1 2015-02-03 13:23:57 -05:00
Ben Boeckel dea42d9296 install: Fix regression in default configuration selection
The refactoring in commit v3.1.0-rc1~812^2~16 (stringapi: Pass
configuration names as strings, 2014-02-09) broke the code path in
cmLocalGenerator::GenerateInstallRules that intends to pick a default
install configuration for multi-config generators.  Fix the logic to
select an empty default configuration only when using a single-config
generator whose CMAKE_BUILD_TYPE is not set.

Inspired-by: Roman Wüger <roman.wueger@gmx.at>
Reported-by: NoRulez <norulez@me.com>
2015-02-03 13:05:47 -05:00
Brad King 99e3650e66 Merge topic 'make-NOTPARALLEL-not-PHONY'
3cec0c75 Makefile: Generate .NOTPARALLEL without .PHONY (#14312)
2015-02-03 09:46:20 -05:00
Kitware Robot 460f7bcb7d CMake Nightly Date Stamp 2015-02-03 00:01:08 -05:00
Kitware Robot cf38f68685 CMake Nightly Date Stamp 2015-02-02 00:01:07 -05:00
Kitware Robot 8d69764d06 CMake Nightly Date Stamp 2015-02-01 00:01:08 -05:00
Kitware Robot 83ae27dcd1 CMake Nightly Date Stamp 2015-01-31 00:01:16 -05:00
Brad King a01f81b906 Merge topic 'ctest_submmit-CDASH_UPLOAD-encode-url'
18e3771a ctest_submit: Escape URL components in CDASH_UPLOAD mode
2015-01-30 10:39:12 -05:00
Bill Hoffman 18e3771ac7 ctest_submit: Escape URL components in CDASH_UPLOAD mode
Call curl_easy_escape on arguments sent to CDash upload.
2015-01-30 10:36:38 -05:00