Commit Graph

17836 Commits

Author SHA1 Message Date
Brad King edc9ff9422 Merge topic 'feature-record-msvc'
d3489bdb Features: Record for MSVC 2010-2015
3228fc50 Features: Define meaning for no language standard default
2015-01-30 10:23:10 -05:00
Brad King db4b9fe256 Merge topic 'fix-cpack-symlink-create-dir'
55e68bc9 Merge branch 'backport-fix-cpack-symlink-create-dir' into fix-cpack-symlink-create-dir
4dc5acee CPack: Fix packaging of source tarballs with symbolic links
81221b80 CPack: Fix packaging of source tarballs with symbolic links
2015-01-30 10:23:07 -05:00
Brad King 85fe9400cd Merge topic 'ninja-msvc-only-C-and-CXX'
8a93d3ea Ninja: Use "deps = msvc" only for C and CXX (#15253)
2015-01-30 10:23:05 -05:00
Brad King e62e04f3bb Merge topic 'vs-windows-store-default-language'
500794b0 VS: Set default language in generated Windows Phone and Store projects
4c5574a1 VS: Add missing newlines to .vcxproj generation
2015-01-30 10:23:03 -05:00
Bill Hoffman 4dc5acee63 CPack: Fix packaging of source tarballs with symbolic links
When staging the package installation, if the first file in a directory
happens to be a symbolic link, make sure we create the directory before
trying to create the link.
2015-01-30 10:08:12 -05:00
Bill Hoffman 81221b80e2 CPack: Fix packaging of source tarballs with symbolic links
When staging the package installation, if the first file in a directory
happens to be a symbolic link, make sure we create the directory before
trying to create the link.
2015-01-30 10:06:09 -05:00
Brad King 3cec0c75f7 Makefile: Generate .NOTPARALLEL without .PHONY (#14312)
In commit v3.0.0-rc1~222^2 (Makefile: Allow "gmake target1 target2 -j",
2013-12-18) we added generation of a .NOTPARALLEL rule and told the
generator it is "symbolic" because the file will never be created.
This causes ".PHONY" to be used.  However, "clearmake" does not support
parsing of .PHONY specifically for .NOTPARALLEL, so simply drop it.
This should not affect the role of the .NOTPARALLEL rule for GNU make.
2015-01-30 09:50:09 -05:00
Kitware Robot dea1631a8f CMake Nightly Date Stamp 2015-01-30 00:01:10 -05:00
Brad King 8a93d3ea18 Ninja: Use "deps = msvc" only for C and CXX (#15253)
The "/showIncludes" flag is only available with MS C and C++ compilers,
and on compilers that "simulate" them (like Intel for Windows).  Fix our
logic to choose this type only for MS tools with these languages.  All
other cases need to use "deps = gcc" and define DEP_FILE in the build
rule.
2015-01-29 15:34:24 -05:00
Brad King 3228fc5049 Features: Define meaning for no language standard default
Define an empty string in CMAKE_<LANG>_STANDARD_DEFAULT to mean that
the toolchain has no notion of lanuage standard levels.  In this case
the <LANG>_STANDARD[_REQUIRED] properties will have no effect.

Update the RunCMake.CompileFeatures test to exclude the
LinkImplementationFeatureCycle test when there is no standard default.
It can never fail because no use of specific features will adjust the
CXX_STANDARD level required for any target since the standard levels
have no meaning in this case.
2015-01-29 15:01:40 -05:00
Robert Goulet 500794b0db VS: Set default language in generated Windows Phone and Store projects
Otherwise building such projects gives:

 warning APPX1901: The DefaultLanguage property is either missing from
                   the project file or does not have a value
2015-01-29 14:30:29 -05:00
Robert Goulet 4c5574a15d VS: Add missing newlines to .vcxproj generation 2015-01-29 14:29:01 -05:00
Brad King 326cfe2b30 Merge topic 'xcode-revise-make-program'
ab9fa54d Xcode: Switch to internal CMAKE_MAKE_PROGRAM lookup by generator (#15324)
11e2e6ca Xcode: Select make program at build time
e4055a61 Xcode: Add internal API to find xcodebuild
2015-01-29 09:14:00 -05:00
Brad King 98659aecfd Merge topic 'vs-shader-flags'
4775c901 VS: Add source file property to set extra hlsl shader flags
2015-01-29 09:13:58 -05:00
Brad King 983a98e5b8 Merge topic 'ctest-update-gmake-error-match'
d52b5f88 ctest_build: Update GNU make error message matching (#15379)
2015-01-29 09:13:56 -05:00
Brad King abec4213d6 Merge topic 'fix-OBJECT_DEPENDS-after-path-normalization'
9259d778 Normalize OBJECT_DEPENDS paths to match custom commands (#15366)
2015-01-29 09:13:53 -05:00
Brad King ab9fa54d48 Xcode: Switch to internal CMAKE_MAKE_PROGRAM lookup by generator (#15324)
The "cmakexbuild" wrapper is not needed for Xcode 4 and above, and the
path to it may change when CMake moves.  Avoid storing a specific path
to a build program in CMakeCache.txt and instead compute the value for
CMAKE_MAKE_PROGRAM on demand.  However, if a user does set the value
explicitly then honor it.

This does for Xcode what commit v3.0.0-rc1~260^2~4 (VS: Switch to
internal CMAKE_MAKE_PROGRAM lookup by generators, 2013-11-15) did for
Visual Studio generators.
2015-01-29 09:11:11 -05:00
Kitware Robot 5968ad58fd CMake Nightly Date Stamp 2015-01-29 00:01:09 -05:00
Brad King 11e2e6cadf Xcode: Select make program at build time
Extend the change made in commit v3.0.0-rc1~260^2~16 (Teach
GenerateBuildCommand to find its own make program, 2013-11-13) to have
the Xcode generator pick between "xcodebuild" and CMake's own copy of
"cmakexbuild" at build time based on the version of Xcode.
2015-01-28 14:01:55 -05:00
Brad King e4055a6144 Xcode: Add internal API to find xcodebuild
Teach the Xcode generator to compute the location of this tool or the
cmakexbuild wrapper.  Add internal APIs to get the locations on demand.

Use the "cmakexbuild" wrapper for Xcode < 4, and "xcodebuild" for modern
Xcode.
2015-01-28 13:41:55 -05:00
Brad King 048fb8e3d0 Merge branch 'ctest-update-gmake-error-match' into release 2015-01-28 10:42:07 -05:00
Marco Nolden d52b5f8835 ctest_build: Update GNU make error message matching (#15379)
The "No rule to make target" error message of gmake is not correctly
recognized since GNU make changed the quoting style in commit 23c2b99e9d
(Convert all "`'" quotes to "''" per new GNU Coding Standard guidelines,
2012-03-04).  Fix our regex to match both old and new quoting styles.
2015-01-28 10:32:06 -05:00
Robert Goulet 4775c90145 VS: Add source file property to set extra hlsl shader flags
Create a VS_SHADER_FLAGS source file property so that we can set all
other Visual Studio .hlsl shader file compilation flags.
2015-01-28 09:29:50 -05:00
Brad King e6214b9a52 Merge branch 'fix-OBJECT_DEPENDS-after-path-normalization' into release 2015-01-28 09:07:44 -05:00
Brad King 9259d77881 Normalize OBJECT_DEPENDS paths to match custom commands (#15366)
Custom command path normalization added in commit v3.1.0-rc1~471^2
(add_custom_command: Normalize OUTPUT and DEPENDS paths, 2014-05-28)
broke use of OBJECT_DEPENDS to bring in custom commands because the
latter paths were not normalized too.  Normalize them and add a test
case.

Reported-by: Daniel v. Gerpen
2015-01-28 09:06:21 -05:00
Kitware Robot 0d59fa3ca4 CMake Nightly Date Stamp 2015-01-28 00:01:09 -05:00
Brad King a47b904db2 Merge topic 'file-strings-utf-16'
1f77a700 file: Teach STRINGS to support UTF-16 and UTF-32 encodings
2015-01-27 11:36:45 -05:00
Justin Borodinsky 1f77a7001b file: Teach STRINGS to support UTF-16 and UTF-32 encodings 2015-01-27 11:30:26 -05:00
Brad King af9cf04647 Merge topic 'cmake-E-tar-files-from'
44fd71de cmake: Teach "-E tar" command a "--files-from=" option
2015-01-27 11:22:08 -05:00
Brad King d1b3370d52 Merge topic 'cmake-gui-osx'
8ced6375 cmake-gui: Shrink spacing between search field and checkbox.
b46a1519 cmake-gui: Change install buttons to activate on clicked instead of pressed.
c19539c5 cmake-gui: Fix install menu to be available for Qt5 builds on OS X.
2015-01-27 11:22:01 -05:00
Brad King ef6d030c95 Merge topic 'cmake-builtin-targets-use-ninja-terminal'
bbffaa0e Configure some CMake-provided targets with USES_TERMINAL (#14915)
2015-01-27 11:21:59 -05:00
Brad King 4ef0f7f62f Merge topic 'load-initial-cache-from-stderr-to-stdout'
6cc0f6b5 cmake: Display "loading initial cache" message on stdout
2015-01-27 11:21:57 -05:00
Sylvain Joubert bbffaa0e6c Configure some CMake-provided targets with USES_TERMINAL (#14915)
This will make them use the 'console' pool with the Ninja generator.
Impacted targets are:
- Built-in targets: install, install/local, install/strip, tests,
  package, package_source, rebuild_cache
- Targets provided by the CTestTargets module: Nightly, Continuous,
  Experimental,
  and all their variants (*Start, *Configure, ...)
2015-01-27 11:16:48 -05:00
Kitware Robot 82ba50390f CMake Nightly Date Stamp 2015-01-27 00:01:10 -05:00
Brad King 44fd71decb cmake: Teach "-E tar" command a "--files-from=" option
Read file names from the lines of a specified file.  Reject input lines
starting in '-' to leave room for option parsing to be added later.  Add
just '--add-file=' now to allow files starting in '-' to be specified.
2015-01-26 13:28:31 -05:00
Kevin Wojniak 8ced6375df cmake-gui: Shrink spacing between search field and checkbox.
This allows the search field to show on OS X Yosemite
2015-01-26 09:22:21 -07:00
Kevin Wojniak b46a15194b cmake-gui: Change install buttons to activate on clicked instead of pressed.
This matches the behavior of other buttons.
2015-01-26 09:21:36 -07:00
Kevin Wojniak c19539c594 cmake-gui: Fix install menu to be available for Qt5 builds on OS X. 2015-01-26 09:20:49 -07:00
Brad King 8def82585c Merge topic 'try-run-link-libraries'
d0adcccb try_run: Add tests for LINK_LIBRARIES with mock libraries.
223c5cb7 try_run: Add test for bad link libraries.
e2b1f058 try_run: Add support for LINK_LIBRARIES option.
2015-01-26 10:28:25 -05:00
Matt McCormick e2b1f0583f try_run: Add support for LINK_LIBRARIES option.
Most functionality is already implemented in Source/cmCoreTryCompile.{h,cxx}.
Document and improve argument parsing.

This functionality is already being used by a number of modules, like
CheckCSourceCompiles.cmake, but it is not documented.
2015-01-26 10:05:26 -05:00
Brad King cb243cce13 Merge topic 'update-kwsys'
391748d5 Merge branch 'upstream-kwsys' into update-kwsys
0b9aad75 KWSys 2015-01-23 (d4e7f08e)
2015-01-26 09:51:55 -05:00
Brad King dfdcc42c60 Merge topic 'ninja-rsp_file-calculation'
097e26f4 ninja: use the minimum of all command line length limits (#14892)
2015-01-26 09:51:53 -05:00
Brad King 1337576b24 Merge topic 'curl-default-cainfo'
0abd3e53 cmake: Use a default CA path when not using system curl
6ce346c5 curl: Add CURL_CA_PATH option to CMake build process
2015-01-26 09:51:50 -05:00
Jean-Christophe Fillion-Robin 6cc0f6b512 cmake: Display "loading initial cache" message on stdout
This message has been on stderr since the "-C" option was first added,
but it is informational and not an error.  Other informational messages
go to stdout, so send this one there too.
2015-01-26 09:44:44 -05:00
Kitware Robot e71c35ff26 CMake Nightly Date Stamp 2015-01-26 00:01:09 -05:00
Kitware Robot 5a9d54a67a CMake Nightly Date Stamp 2015-01-25 00:01:08 -05:00
Brad King 391748d57e Merge branch 'upstream-kwsys' into update-kwsys 2015-01-24 07:38:51 -05:00
Kitware Robot 97502ba77b CMake Nightly Date Stamp 2015-01-24 00:01:09 -05:00
Brad King 482c84759f KWSys Directory: Check opendir return value before using it (#15367)
In Directory::GetNumberOfFilesInDirectory add a missing check for NULL.
2015-01-23 13:19:07 -05:00
Ben Boeckel 097e26f490 ninja: use the minimum of all command line length limits (#14892)
When choosing whether to use a response file, consider several possible
command line length limits for the current operating system, and choose
the smallest.
2015-01-23 10:54:13 -05:00
Brad King 154bf8da99 Merge topic 'INTERFACE_SYSTEM_INCLUDE_DIRECTORIES-update'
85857e6d Help: Clarify INTERFACE_SYSTEM_INCLUDE_DIRECTORIES documentation.
ee38062b IncludeDirectories: Respect SYSTEM flag when using CONFIG genex.
2015-01-23 10:50:31 -05:00
Brad King 0abd3e538e cmake: Use a default CA path when not using system curl
When using system curl, we trust it to be configured with desired CA
certs.  When using our own build of curl, we use os-configured CA certs
on Windows and OS X.  On other systems, try to achieve this by searching
for common CA cert locations.  According to a brief investigation, the
curl packages on popular Linux distros are currently configured as:

* Arch: /etc/ssl/certs/ca-certificates.crt
* Debian with OpenSSL: /etc/ssl/certs
* Debian with GNU TLS: /etc/ssl/certs/ca-certificates.crt
* Debian with NSS: /etc/ssl/certs/ca-certificates.crt
* Fedora: /etc/pki/tls/certs/ca-bundle.crt
* Gentoo with OpenSSL: /etc/ssl/certs
* Gentoo without OpenSSL: /etc/ssl/certs/ca-certificates.crt

Teach CMake and CTest to look for these paths and use them as a CA path
or bundle when no other os-configured or user-specified CAs are
available.
2015-01-23 08:57:32 -05:00
Kitware Robot c99e19a4ac CMake Nightly Date Stamp 2015-01-23 00:01:16 -05:00
Stephen Kelly ee38062be8 IncludeDirectories: Respect SYSTEM flag when using CONFIG genex.
Update the Makefile and Ninja generators to use the config when
requesting the include flags.
2015-01-23 00:08:18 +01:00
Brad King c0298947ff Merge topic 'cdash_upload_file_mode'
f3e0b6f1 CTestCoverageCollectGCOV: Add module to run gcov
6dd980e0 ctest_submit: Make CDASH_UPLOAD mode arguments more strict
5dc33f89 ctest_submit: Add CDASH_UPLOAD mode to upload files to CDash
2015-01-22 11:16:45 -05:00
Brad King 3eda92df91 Merge topic 'update-kwsys'
7e468cd8 Merge branch 'upstream-kwsys' into update-kwsys
77444a7d KWSys 2015-01-20 (b33e7b96)
2015-01-22 09:50:40 -05:00
Kitware Robot afe99212d2 CMake Nightly Date Stamp 2015-01-22 00:01:09 -05:00
Brad King 40c11f0f62 Merge topic 'jsoncpp-third-party'
27c6da93 Add option to build CMake against a system jsoncpp
2015-01-21 16:36:22 -05:00
Brad King 7e468cd8f9 Merge branch 'upstream-kwsys' into update-kwsys 2015-01-21 09:15:44 -05:00
Kitware Robot f709776864 CMake Nightly Date Stamp 2015-01-21 00:01:10 -05:00
Brad King 57622bd19d CMake 3.1.1 2015-01-20 11:04:44 -05:00
Brad King 27c6da933e Add option to build CMake against a system jsoncpp
Create a CMAKE_USE_SYSTEM_JSONCPP option.
2015-01-20 10:37:35 -05:00
Brad King 6dd980e0ef ctest_submit: Make CDASH_UPLOAD mode arguments more strict
Disallow mixing of arguments from different command signatures.
Extend the RunCMake.CTestSubmit test to cover such error cases.
2015-01-20 09:33:21 -05:00
Bill Hoffman 5dc33f89b5 ctest_submit: Add CDASH_UPLOAD mode to upload files to CDash
This adds support for the new cdash API where arbitrary files can be
uploaded to the CDash server.  This CDash API communicates via json
files so the json parser jsoncpp was added to the Utilities directory.
2015-01-20 09:33:21 -05:00
Brad King 17cfa09eb2 Merge topic 'cmake-labels-json'
0238d0c3 cmake: Generate an internal 'Labels.json' file next to 'Labels.txt'
bda4f0b6 jsoncpp: Add headers to help CMake include in-source jsoncpp headers
a02fbec5 jsoncpp: Drop doxygen comments that cause Clang warnings
2015-01-20 09:31:59 -05:00
Brad King 0238d0c397 cmake: Generate an internal 'Labels.json' file next to 'Labels.txt'
In each internal target directory we generate a "Labels.txt" file
containing labels for that target and its sources, but it uses an
internal format.  In order to make the list of labels easier to
publish, use a json format and call it "Labels.json".

Since we now use jsoncpp headers, link CMakeLib to the jsoncpp library.
2015-01-20 09:31:11 -05:00
Brad King 1ef4e3ab45 Merge topic 'cmake-E-tar-mtime'
3a60c899 cmake: Teach "-E tar" command a "--mtime=" option
90f9c427 cmake: Teach "-E tar" to report file name on failure to read from disk
2015-01-20 09:20:12 -05:00
Brad King 4970ac3d5f Merge topic 'xcode-target-sort'
9e0176e2 Xcode: Sort targets deterministically and with ALL_BUILD first (#15346)
c0ff542c Xcode: Fix early termination on per-config source file error
2015-01-20 09:19:55 -05:00
Kitware Robot 70eb44b7dc CMake Nightly Date Stamp 2015-01-20 00:01:17 -05:00
Brad King 3a60c899fc cmake: Teach "-E tar" command a "--mtime=" option
Add an option to set the mtime of entries in a tarball so that one can
create a tarball with a consistent content hash (e.g. MD5) for a given
set of files regardless of their current timestamps on disk.  This will
be useful for submission of tarballs to CDash, which tracks content
hashes to avoid duplication.

Inspired-by: Bill Hoffman <bill.hoffman@kitware.com>
2015-01-19 14:16:19 -05:00
Brad King 90f9c42732 cmake: Teach "-E tar" to report file name on failure to read from disk
The libarchive-provided error message does not always include the file
name, so add it to the message ourselves to ensure users know which file
fails.
2015-01-19 14:15:58 -05:00
Brad King 5806f6c5e6 Merge branch 'xcode-target-sort' into release 2015-01-19 13:57:29 -05:00
Brad King 9de2ab7fce Merge topic 'consistent-empty-method'
5f69314e Replace foo.length() pattern with !foo.empty().
fd0c036c Replace 'foo.length() >= 1' pattern with !foo.empty()
f09fde2d Replace 'foo.length() > 0' pattern with !foo.empty().
86b5bdfa Replace 'foo.length() == 0' pattern with foo.empty().
fd7b3712 Replace foo.size() pattern with !foo.empty().
aa773035 Replace !foo.size() pattern with foo.empty().
64592633 cmListCommand: Use empty() and expand whitespace.
607e1938 Replace 'foo.size() != 0' pattern with !foo.empty().
930bd478 Replace 'foo.size() == 0' pattern with foo.empty().
d92887ef Replace 'foo.size() > 0' pattern with !foo.empty().
2015-01-19 09:43:28 -05:00
Brad King a6bbbd0f4a Merge topic 'use-member-insert'
fa889c4d cmakemain: Initialize vector content with iterators directly.
8211010c cmakemain: Use member insert in command line handling code.
b5422573 cmListCommand: Replace loop with member algorithm.
92a37f92 Convert raw loops to set member insert.
aac44e71 Convert raw loops to vector member insert.
2015-01-19 09:43:27 -05:00
Brad King 95d42840e8 Merge topic 'delete-algorithm'
681d965d Use the cmDeleteAll algorithm for types derived from std::map.
4dc0c488 cmDeleteAll: Generalize deletion specialization for map types.
2015-01-19 09:43:25 -05:00
Brad King 373199b1c9 Merge topic 'eclipse-fix-cxx-natures'
6e6e0c40 Eclipse: Add org.eclipse.cdt.core.cnature to CXX projects (#15068)
2015-01-19 09:43:09 -05:00
Ben Boeckel 9e0176e2b3 Xcode: Sort targets deterministically and with ALL_BUILD first (#15346)
The default target in XCode is the first one in the file.

In commit v3.1.0-rc1~286^2 (cmTarget: use a hash_map for cmTargets
typedef, 2014-06-10) the order of the targets stored in cmMakefile was
made non-deterministic instead of lexicographic.  Teach the Xcode
generator to do its own sorting to restore a predictable order.

While at it, place ALL_BUILD first (as is done in VS IDE generators)
explicitly in the comparison function so that it is the default target
even if other targets sort earlier lexicographically (e.g. "AAA").
2015-01-19 08:36:45 -05:00
Brad King c0ff542c58 Xcode: Fix early termination on per-config source file error
In commit v3.1.0-rc1~687^2~4 (cmTarget: Make the source files depend on
the config, 2014-02-13) an early termination case was added to the Xcode
generator.  Fix handling of this case to actually abort all the
generation steps.  Otherwise some of the later steps are attempted
without the preconditions normally established by earlier steps,
possibly leading to a crash.
2015-01-19 08:34:32 -05:00
Kitware Robot 6164f7cef6 CMake Nightly Date Stamp 2015-01-19 00:01:10 -05:00
Stephen Kelly fa889c4d2f cmakemain: Initialize vector content with iterators directly. 2015-01-18 18:24:04 +01:00
Stephen Kelly 8211010c3f cmakemain: Use member insert in command line handling code. 2015-01-18 18:18:43 +01:00
Stephen Kelly b54225732f cmListCommand: Replace loop with member algorithm. 2015-01-18 15:15:17 +01:00
Stephen Kelly 92a37f9279 Convert raw loops to set member insert. 2015-01-18 15:14:47 +01:00
Stephen Kelly aac44e71e6 Convert raw loops to vector member insert. 2015-01-18 15:14:36 +01:00
Stephen Kelly 5f69314ea6 Replace foo.length() pattern with !foo.empty(). 2015-01-18 14:25:25 +01:00
Stephen Kelly fd0c036c0c Replace 'foo.length() >= 1' pattern with !foo.empty() 2015-01-18 14:25:25 +01:00
Stephen Kelly f09fde2d21 Replace 'foo.length() > 0' pattern with !foo.empty(). 2015-01-18 14:25:25 +01:00
Stephen Kelly 86b5bdfa08 Replace 'foo.length() == 0' pattern with foo.empty(). 2015-01-18 14:25:24 +01:00
Stephen Kelly fd7b371293 Replace foo.size() pattern with !foo.empty(). 2015-01-18 14:25:24 +01:00
Stephen Kelly aa773035b7 Replace !foo.size() pattern with foo.empty(). 2015-01-18 14:25:24 +01:00
Stephen Kelly 6459263377 cmListCommand: Use empty() and expand whitespace. 2015-01-18 14:25:24 +01:00
Stephen Kelly 607e19384f Replace 'foo.size() != 0' pattern with !foo.empty(). 2015-01-18 14:25:24 +01:00
Stephen Kelly 930bd47816 Replace 'foo.size() == 0' pattern with foo.empty(). 2015-01-18 14:25:24 +01:00
Stephen Kelly d92887efab Replace 'foo.size() > 0' pattern with !foo.empty(). 2015-01-18 14:25:24 +01:00
Kitware Robot f3e92d2816 CMake Nightly Date Stamp 2015-01-18 00:01:09 -05:00
Stephen Kelly 681d965df1 Use the cmDeleteAll algorithm for types derived from std::map. 2015-01-17 16:22:58 +01:00
Stephen Kelly 4dc0c488f9 cmDeleteAll: Generalize deletion specialization for map types.
Assume that a container whose value_type is a std::pair should have
its second member deleted.
2015-01-17 16:22:58 +01:00
Kitware Robot f8c416f00c CMake Nightly Date Stamp 2015-01-17 00:01:12 -05:00
Brad King ed4b95e12f Merge topic 'fix-ctest_build-output-processing-regression'
509f2713 ctest_build: Fix logic regression in parent that clips build output
2015-01-16 09:43:46 -05:00
Brad King 8741991e4b Merge branch 'release-3.0' into release 2015-01-16 09:04:02 -05:00
Brad King 9a92734cdd Merge branch 'eclipse-fix-cxx-natures' into release-3.0 2015-01-16 08:55:02 -05:00
André Klitzing 6e6e0c4048 Eclipse: Add org.eclipse.cdt.core.cnature to CXX projects (#15068)
Since commit v3.0.0-rc1~335^2~1 (eclipse: Add natures for Eclipse based
on enabled languages, 2013-08-29) CXX projects got only "ccnature", but
Eclipse itself also adds "cnature" when creating C++ projects.  Fix this
by adding both for CXX projects.
2015-01-16 08:54:39 -05:00
Kitware Robot fb354cc59c CMake Nightly Date Stamp 2015-01-16 00:01:16 -05:00
Brad King d58396b722 Merge branch 'fix-COMPILE_FEATURES-genex' into release 2015-01-15 09:59:19 -05:00
Brad King 0fcdc57b7b Merge branch 'cpack-PackageMaker-OSX-10.10' into release 2015-01-15 09:59:12 -05:00
Brad King 4ecc392b42 Merge topic 'delete-algorithm'
65b81da4 cmVariableWatch: Use the cmDeleteAll algorithm with for_each.
30d2de9a cmGeneratorExpressionEvaluator: Replace own algorithm with cmDeleteAll.
4a6e795b Use the cmDeleteAll algorithm instead of trivial raw loops.
abb4a678 Add a generic algorithm for deleting items in a container.
2015-01-15 09:54:04 -05:00
Brad King 6418eef222 Merge topic 'fix-COMPILE_FEATURES-genex'
45ec182d Features: Fix the COMPILE_FEATURES genex for unavailable features.
2bead0eb cmMakefile: Rename a method to what it really does.
2015-01-15 09:54:02 -05:00
Brad King 44612e7407 Merge topic 'fix-LOCATION-with-TARGET_OBJECTS'
23f3798c cmTarget: Compute link language of TARGET_OBJECTS with CMP0026 OLD (#15338)
2015-01-15 09:53:59 -05:00
Brad King fa636e19ce Merge topic 'cpack-PackageMaker-OSX-10.10'
70abf6e7 CPack: Fix PackageMaker internal versioning for OS X 10.10
2015-01-15 09:53:56 -05:00
Brad King 509f2713bf ctest_build: Fix logic regression in parent that clips build output
The sweeping pattern change in commit 238dd2fb (Use insert instead of a
loop in some cases, 2014-11-22) accidentally changed the iterator range
used on the queue in cmCTestBuildHandler::ProcessBuffer.  Instead of
ending at the iterator positioned at the next newline to populate
CurrentProcessingLine, it was changed to go to the end of the queue.
This causes the line to contain newlines and possibly be cut off in the
middle of a line.  Fix this regression by restoring use of the proper
end-of-line position.
2015-01-15 09:32:58 -05:00
Kitware Robot 23c02d2454 CMake Nightly Date Stamp 2015-01-15 00:01:09 -05:00
Brad King a08a444bab Merge branch 'fix-LOCATION-with-TARGET_OBJECTS' into release 2015-01-14 10:34:10 -05:00
Brad King 46eae52968 Merge branch 'backport-cpack_invalid_cmake_generator' into release 2015-01-14 10:33:30 -05:00
Domen Vrankar ea916230ef CPack: Avoid crash on invalid CMake generator name (#15308)
Case where CPACK_CMAKE_GENERATOR value is non existent or
or contains multiple words that were not quoted was not
handled and produced a segmentation fault.
2015-01-14 08:38:23 -05:00
Kitware Robot 2ece34516a CMake Nightly Date Stamp 2015-01-14 00:01:16 -05:00
Stephen Kelly 65b81da458 cmVariableWatch: Use the cmDeleteAll algorithm with for_each. 2015-01-13 23:00:17 +01:00
Stephen Kelly 30d2de9aa8 cmGeneratorExpressionEvaluator: Replace own algorithm with cmDeleteAll. 2015-01-13 23:00:17 +01:00
Stephen Kelly 4a6e795b0c Use the cmDeleteAll algorithm instead of trivial raw loops. 2015-01-13 23:00:17 +01:00
Stephen Kelly abb4a6781f Add a generic algorithm for deleting items in a container.
Specialize for std::map types to delete the second element from
the iterator.  This is not quite general enough that it can
be used everywhere, because CMake inherits from std::map and
creates typedefs with custom comparison functors etc, which
can not use this algorithm.
2015-01-13 23:00:16 +01:00
Stephen Kelly 23f3798c7b cmTarget: Compute link language of TARGET_OBJECTS with CMP0026 OLD (#15338)
Commit v3.1.0-rc1~297^2~5 (cmTarget: Drop 'head' argument from
GetSourceFiles, 2014-07-10) exposed a dormant bug in source file computation,
causing the test case to regress.  After that commit, the source file
computation and caching finds an existing container of source files.  Prior to
that patch, the GetSourceFiles method was called with either a null pointer
for the head cmTarget, or it was called with the this pointer.  The
processSources method is eventually called, which normalizes the difference
between the null pointer and the this pointer for the head target.  However,
the cache key depends on the actual pre-normalized pointer.  The change in
that commit caused the entry to be found in the cache where it was not before,
which resulted in incorrect behavior.

Prior to that commit, the test case also fails if the GetSourceFiles overload
taking a vector<cmSourceFile*> is changed to normalize the head target at
the beginning of the method:

  cmTarget const* head = head_ ? head_ : this;

Such a construct was correctly used in other locations where similar caching
was in place, before being removed in commit v3.1.0-rc1~310^2~25 (cmTarget:
Remove 'head' argument from GetLinkInformation, 2014-06-12), but is not
neccessary anymore.

Commit v3.1.0-rc1~674^2~2 (cmTarget: Cache the cmSourceFiles in
GetSourceFiles., 2014-04-05) introduced the caching, but fails the test case
for an unrelated reason.  That unrelated error was introduced in
commit v3.1.0-rc1~688^2~5 (cmTarget: Allow any generator expression in
SOURCES property., 2014-03-18) and fixed in
commit v3.1.0-rc1~561^2~1 (cmTarget: Fix listing of source files at
configure-time., 2014-04-13).

All commits which fail the test case in the testable way do so when such a
cached version of the source files is found and returned at generate
time.  In the test case, the cached content is populated at configure-time
through the use of the deprecated LOCATION property with CMP0026 OLD.  The
cached content is an empty container for the bar target in the test case,
because its source file 'foo.cpp.o' is not known until generate-time.  That
means that no source files are available to compute the link language and
the reported error is issued.

The actual problem is that the SourceFilesMap should be cleared after
configure time by cmTarget::ClearLinkMaps.  Clear it there now.
2015-01-13 09:36:20 +01:00
Kitware Robot d61c6df2fa CMake Nightly Date Stamp 2015-01-13 00:01:09 -05:00
Stephen Kelly 45ec182d27 Features: Fix the COMPILE_FEATURES genex for unavailable features.
Previously, the genex tested only for CMake knowledge of the feature,
but not compiler knowledge of the feature.
2015-01-12 10:30:43 -05:00
Stephen Kelly 2bead0eb1b cmMakefile: Rename a method to what it really does.
The method does not test availability of compile features.
2015-01-12 10:30:43 -05:00
Brad King dd6c596c12 Merge topic 'join-algorithm'
55a73e6b Use the cmJoin algorithm where possible.
8dc8d756 cmStandardIncludes: Add a join algorithm for string containers.
b5813cee cmInstallCommand: Remove unused variable.
2015-01-12 09:41:02 -05:00
Brad King d9a6ea4599 Merge topic 'add-xz-support'
4035ef78 cmake -E tar: error out on multiple compression formats
d811d238 cmSystemTools: use an enumeration for compression formats
df16dcfb cmake -E tar: add support for .xz files with 'J'
b0a5d393 cmake -E tar: clean up flag documentation
2015-01-12 09:39:40 -05:00
Brad King 212bf1f82a Merge topic 'improve_cobertura'
ab74553d ctest_coverage: Fix parsing of absolute paths in Cobertura files
2015-01-12 09:39:38 -05:00
Ben Boeckel 4035ef786d cmake -E tar: error out on multiple compression formats 2015-01-12 09:36:25 -05:00
Ben Boeckel d811d238ab cmSystemTools: use an enumeration for compression formats
Juggling 3 booleans was unwieldy.
2015-01-12 09:36:25 -05:00
Zack Galbreath ab74553db4 ctest_coverage: Fix parsing of absolute paths in Cobertura files
This commit fixes a segmentation fault I encountered when my
Coverage.xml referenced a system file, eg /usr/lib/python/foo.py.

Similar to other CMake coverage parsers, this one now ignores any
files it finds that are not located within this project's source
or binary directories.
2015-01-12 09:34:50 -05:00
Calin Cascaval 70abf6e780 CPack: Fix PackageMaker internal versioning for OS X 10.10
Avoid using a floating point value to represent the version, since
"10.10" would be treated as "10.1".
2015-01-12 09:12:50 -05:00
Brad King 1f41ec2ac2 Merge branch 'fix-autouic-regression' into release 2015-01-12 09:00:03 -05:00
Brad King b4f62b875b Merge topic 'fix-autouic-regression'
9a673737 QtAutoUic: Add a test for the regression in the parent commit.
7c585699 QtAutoUic: Restore source file AUTOUIC_OPTIONS settings
2015-01-12 08:57:52 -05:00
Brad King b5a467262b Merge topic 'drop-ancient-workarounds'
0f7bdd61 Remove VS 6 special case.
5e92c826 Remove some obsolete stuff.
15e42bb2 cmStandardIncludes: Remove obsolete cmOStringStream.
931e055d Port all cmOStringStream to std::ostringstream.
f194a009 Remove unused cmIStringStream class.
3ec1bb15 cmStandardIncludes: Remove std namespace hack.
bb3bce70 cmStandardIncludes: Remove ANSI_FOR_SCOPE hack.
28fa4923 cmStandardIncludes: Remove iostreams workaround for obsolete Compaq compiler.
837a8a63 cmStandardIncludes: Drop Comeau-related workaround.
4030ddfd Remove Borland-related undef.
17d6a6fd cmStandardIncludes: Remove comment about Borland.
26fb5011 Drop SGI as a CMake host compiler.
2015-01-12 08:57:39 -05:00
Brad King 6c61ffaf9b Merge topic 'sun-better-stdlib'
3660d063 cmTarget: Use insert instead of std::copy.
5c28495f Help: Remove documented restriction on template use.
ac3d3829 Help: Remove documented restriction on find in conditions.
36b8de56 Help: Remove documented restriction on insert APIs.
6162c919 Use two-iterator std::set::insert where appropriate.
238dd2fb Use insert instead of a loop in some cases.
2f7ef7e3 Revert "Misc. fixes for the Oracle / Sun compiler."
4c69ec6f SolarisStudio: Use alternative standard library to build CMake.
2015-01-12 08:57:37 -05:00
Kitware Robot 9fced51858 CMake Nightly Date Stamp 2015-01-12 00:01:19 -05:00
Justin Borodinsky 7c58569930 QtAutoUic: Restore source file AUTOUIC_OPTIONS settings
The "." in the extension was dropped by commit v3.1.0-rc1~556^2~2
(cmSourceFile: Cache the isUiFile check, 2014-02-08) by mistake.  This
caused the options to not be set.
2015-01-11 15:11:18 -05:00
Brad King 20d60c6361 Merge topic 'sln-bom'
61cf781a Encoding:  Write Visual Studio solution file with BOM.
2015-01-11 12:00:26 -05:00
Brad King cb5fc7b993 Merge topic 'fix-empty-target-property-queries'
c6d03a10 tests: add tests for querying properties
76ff92e0 set_tests_properties: fix documentation
28214862 get_test_property: clarify the documentation
34a99094 get_target_property: discern empty from undefined properties (#15333)
2015-01-11 12:00:20 -05:00
Brad King 4a549e7e0e Merge topic 'update-kwsys'
e5b91420 Merge branch 'upstream-kwsys' into update-kwsys
54d83cae KWSys 2015-01-09 (425fa73e)
2015-01-11 12:00:14 -05:00
Brad King ca5fe169aa Merge branch 'fix-empty-target-property-queries' into release 2015-01-11 11:50:14 -05:00
Stephen Kelly 34a990946c get_target_property: discern empty from undefined properties (#15333)
This was accidentally regressed by commit v3.1.0-rc1~812^2~50
(stringapi: Use strings for property names, 2013-09-02).
2015-01-11 11:43:58 -05:00
Stephen Kelly 5e92c82655 Remove some obsolete stuff.
We don't need to run compiler tests for ansi-for etc anymore. All
supported compilers support the features tested here.
2015-01-11 17:06:04 +01:00
Stephen Kelly 15e42bb27c cmStandardIncludes: Remove obsolete cmOStringStream. 2015-01-11 17:06:04 +01:00
Stephen Kelly 931e055d8c Port all cmOStringStream to std::ostringstream.
All compilers hosting CMake support the std class.
2015-01-11 17:06:03 +01:00
Stephen Kelly 3660d063bc cmTarget: Use insert instead of std::copy.
insert can reserve() memory in the container, and this is
more-consistent with the rest of CMake now.
2015-01-11 17:00:56 +01:00
Stephen Kelly ac3d382920 Help: Remove documented restriction on find in conditions.
The necessary conversion is supported by all CMake host compilers.
2015-01-11 17:00:56 +01:00
Stephen Kelly 238dd2fbab Use insert instead of a loop in some cases.
Limit this change to inserting into a vector from a vector.

A follow up change can use insert for inserting into a set.
2015-01-11 17:00:55 +01:00
Stephen Kelly 2f7ef7e38d Revert "Misc. fixes for the Oracle / Sun compiler."
This reverts commit 97b65f8156.
2015-01-11 17:00:55 +01:00
Stephen Kelly 6162c9194b Use two-iterator std::set::insert where appropriate. 2015-01-11 17:00:55 +01:00
Kitware Robot 7e5e8a37b5 CMake Nightly Date Stamp 2015-01-11 00:01:09 -05:00
Brad King e5b9142097 Merge branch 'upstream-kwsys' into update-kwsys 2015-01-10 12:09:04 -05:00
Kitware Robot ccd0046667 CMake Nightly Date Stamp 2015-01-10 00:01:15 -05:00
Ben Boeckel df16dcfb44 cmake -E tar: add support for .xz files with 'J' 2015-01-09 10:35:01 -05:00
Kitware Robot 4aa9c64511 CMake Nightly Date Stamp 2015-01-09 00:01:10 -05:00
Ben Boeckel b0a5d3932d cmake -E tar: clean up flag documentation 2015-01-08 16:56:17 -05:00
Stephen Kelly 55a73e6b1f Use the cmJoin algorithm where possible. 2015-01-08 22:28:18 +01:00
Stephen Kelly 8dc8d756bc cmStandardIncludes: Add a join algorithm for string containers.
This requires the input range to supply BidirectionalIterators, which
is not a problem for where it is currently useful to us.  The alternative
would be to not invoke --last;, and instead create an output iterator
similar to std::ostream_iterator, but which puts the delimiter before
the item to output.
2015-01-08 22:28:18 +01:00
Stephen Kelly b5813ceeb5 cmInstallCommand: Remove unused variable. 2015-01-08 22:25:18 +01:00
Stephen Kelly f194a009c8 Remove unused cmIStringStream class. 2015-01-08 22:10:15 +01:00
Stephen Kelly 3ec1bb1537 cmStandardIncludes: Remove std namespace hack. 2015-01-08 22:10:15 +01:00
Stephen Kelly bb3bce706a cmStandardIncludes: Remove ANSI_FOR_SCOPE hack.
All compilers hosting CMake support proper for scoping.
2015-01-08 22:10:15 +01:00
Stephen Kelly 28fa4923c3 cmStandardIncludes: Remove iostreams workaround for obsolete Compaq compiler.
It is no longer tested on the dashboard.
2015-01-08 22:10:15 +01:00
Stephen Kelly 837a8a6312 cmStandardIncludes: Drop Comeau-related workaround.
The compiler is not tested on the dashboard, and on Windows there
are more-natural compilers to use to build CMake.
2015-01-08 22:10:15 +01:00
Stephen Kelly 4030ddfda8 Remove Borland-related undef. 2015-01-08 22:10:14 +01:00
Stephen Kelly 17d6a6fd59 cmStandardIncludes: Remove comment about Borland.
The code the comment refers to was removed in commit 2db55ffa (Remove
borland workarounds., 2014-08-06)
2015-01-08 22:10:14 +01:00
Stephen Kelly 26fb50114f Drop SGI as a CMake host compiler.
It has not been tested since commit v3.1.0-rc1~584^2 (Utilities/Release: Drop
IRIX binary generation on ferrari, 2014-04-30).
2015-01-08 22:10:14 +01:00
Brad King 0042ad9748 Merge topic 'cpack_invalid_cmake_generator'
f89e41c3 CPack invalid CMake generator
2015-01-08 14:58:01 -05:00
Brad King c1c1fcb17c Merge topic 'fix-error-message-typo-tar-cmd'
c4e74367 cmcmd: fix copy/paste typo in '-E tar t' command
2015-01-08 14:57:59 -05:00
Brad King 3fb174dd0b Merge topic 'drop-GNU-2.95'
f07d96cc Remove workaround for GCC < 3 ios_base absence.
5a8b9437 Remove GCC 2.95 support macros in favor of template versions.
2015-01-08 14:57:45 -05:00
Brad King dc451574c6 Merge topic 'base64-casts'
0bdd4ebf cmCTest: Use size_t for cmsysBase64_Encode return value
a9fae8ac CTest: Fix integer overflow when uploading huge files
2015-01-08 14:57:41 -05:00
Brad King 9bb7f8f898 Merge topic 'update-kwsys'
1819d4ad Merge branch 'upstream-kwsys' into update-kwsys
6ed23ff4 KWSys 2014-12-23 (5a15cb3b)
2015-01-08 14:57:38 -05:00
Brad King 344604220d Merge branch 'kwsys-Terminal-xterm-termite' into release 2015-01-08 14:43:10 -05:00
Simon Gomizelj 2866a503a7 KWSys Terminal: Add xterm-termite to VT100 color support whitelist 2015-01-08 12:02:37 -05:00
Kitware Robot 46f87655c9 CMake Nightly Date Stamp 2015-01-08 00:01:08 -05:00
Kitware Robot 8c4b7c567b CMake Nightly Date Stamp 2015-01-07 00:01:08 -05:00
Kitware Robot 73144c098d CMake Nightly Date Stamp 2015-01-06 00:01:12 -05:00
Ben Boeckel c4e743674f cmcmd: fix copy/paste typo in '-E tar t' command 2015-01-05 13:53:53 -05:00
Kitware Robot 4b70635c9f CMake Nightly Date Stamp 2015-01-05 00:01:09 -05:00
Kitware Robot 592dd35570 CMake Nightly Date Stamp 2015-01-04 00:01:08 -05:00
Kitware Robot 472553b4c1 CMake Nightly Date Stamp 2015-01-03 00:01:08 -05:00
Domen Vrankar f89e41c3e7 CPack invalid CMake generator
Case where CPACK_CMAKE_GENERATOR value is non existent or
or contains multiple words that were not quoted was not
handled and produced a segmentation fault.
2015-01-02 10:46:08 +01:00
Kitware Robot 24dfa74214 CMake Nightly Date Stamp 2015-01-02 00:01:08 -05:00
Stephen Kelly f07d96ccf4 Remove workaround for GCC < 3 ios_base absence. 2015-01-01 12:45:54 +01:00
Stephen Kelly 5a8b9437c2 Remove GCC 2.95 support macros in favor of template versions.
GCC < 3 is no longer supported as a host compiler.
2015-01-01 12:44:11 +01:00
Kitware Robot ec31926d24 CMake Nightly Date Stamp 2015-01-01 00:01:09 -05:00
Kitware Robot c2445d3dfd CMake Nightly Date Stamp 2014-12-31 00:01:08 -05:00
Kitware Robot 3b62cb7244 CMake Nightly Date Stamp 2014-12-30 00:01:07 -05:00
Kitware Robot ca3d08e6b5 CMake Nightly Date Stamp 2014-12-29 00:01:08 -05:00
Kitware Robot 8e61140178 CMake Nightly Date Stamp 2014-12-28 00:01:07 -05:00
Kitware Robot 028cdfb3de CMake Nightly Date Stamp 2014-12-27 00:01:08 -05:00
Clinton Stimpson 61cf781a62 Encoding: Write Visual Studio solution file with BOM.
When configured to use UTF-8 internally, add a UTF-8 BOM
to generated .sln files for Visual Studio to correctly
handle them.
Otherwise, some versions of Visual Studio will read them
as ANSI encoded files.
2014-12-26 21:15:29 -07:00
Brad King 0bdd4ebfb8 cmCTest: Use size_t for cmsysBase64_Encode return value 2014-12-26 16:23:35 +01:00
Rolf Eike Beer a9fae8ac1d CTest: Fix integer overflow when uploading huge files
When uploading files greater 2GB a cast to 'int' overflows, leading to a
bad alloc when passed to new. Also avoid floating point arithmetic when
integer calculations will work as well.

Reported-by: Justin Borodinsky <justin.borodinsky@gmail.com>
2014-12-26 16:23:31 +01:00
Kitware Robot 2b28e07c02 CMake Nightly Date Stamp 2014-12-26 00:01:07 -05:00
Kitware Robot 05105d5c13 CMake Nightly Date Stamp 2014-12-25 00:01:09 -05:00
Brad King 8afa15fab1 Merge branch 'ninja-fix-subdir-objlib-languages' into release 2014-12-24 06:41:39 -05:00
Brad King 2a9f3dc6c7 Merge topic 'minor-warning-fixes'
098fc4a8 cmCMakeMinimumRequired: Use unsigned int for version numbers
1a9ba381 cmParseDelphiCoverage: Remove superfluous semicolons after methods
2014-12-24 06:38:33 -05:00
Brad King 661622f011 Merge topic 'ninja-fix-subdir-objlib-languages'
07fc7b75 Tests: Test using objects from a language enabled in a subdirectory (#15325)
fdbfcfdf Ninja: Generate rules only for languages compiled in a target (#15325)
2014-12-24 06:38:24 -05:00
Brad King c20d3d319c Merge topic 'cpack-PackageMaker-package-size'
42ed76bc cpack: Fix installed size computation with PackageMaker generator
2014-12-24 06:38:08 -05:00
Kitware Robot 279a2bcd65 CMake Nightly Date Stamp 2014-12-24 00:01:10 -05:00
Christoph Grüninger 098fc4a862 cmCMakeMinimumRequired: Use unsigned int for version numbers 2014-12-23 09:05:25 -05:00
Christoph Grüninger 1a9ba38174 cmParseDelphiCoverage: Remove superfluous semicolons after methods 2014-12-23 09:05:11 -05:00
Brad King 90b015a0ba Merge topic 'ninja-fix-crash-on-error'
9a13fcbf Ninja: Do not crash when CMAKE_<LANG>_COMPILE_OBJECT is empty (#15325)
2014-12-23 08:53:59 -05:00
Brad King 23e9bc55f3 Merge topic 'base64-constref'
82fbf490 cmCTestTestHandler: take reference to temporary string instead of doing a copy
2014-12-23 08:53:56 -05:00
Brad King 656af73bca Merge topic 'cleanup-ExpandListArgument-usage'
e2a489c7 Remove some temporary vectors for ExpandListArgument.
0f99feec cmGeneratorExpression: Remove unused header.
722f1a71 CTest: Expand a string directly into a container.
2014-12-23 08:53:50 -05:00
Brad King a19a43a930 Merge topic 'ctest-coverage-extra-line-error'
9c4984b4 ctest_coverage: Fix error message to report the file name
2014-12-23 08:53:48 -05:00
Brad King 1819d4ad1f Merge branch 'upstream-kwsys' into update-kwsys 2014-12-23 08:47:34 -05:00
Kitware Robot 7a2d1cd6d4 CMake Nightly Date Stamp 2014-12-23 00:01:15 -05:00
Brad King fdbfcfdf01 Ninja: Generate rules only for languages compiled in a target (#15325)
Refactoring in commit v3.1.0-rc1~688^2~2 (cmTarget: Compute languages
from object libraries on demand, 2014-03-18) taught cmTarget::GetLanguages
to (correctly) include the languages of object library sources.  Previously
this was done only in cmTarget::ComputeLinkImplementationLanguages to
choose the linker language.

The Ninja generator writes out generic build rules for each language
compiled within a target using the rule variables defined in the
directory of the target.  This only needs to be done for languages
actually compiled within the current target.  Switch from using the
cmTarget::GetLanguages method to get the list of languages over to
using cmTarget::GetSourceFiles directly so we do not get the languages
in object libraries.

Strictly speaking this should make no difference because it is not safe
to use objects from a language not enabled in the directory containing
a target or else the link information for the language may not be
considered.  However, in cases when no link information happens to be
needed for a language it was possible in CMake 3.0 and below to enable
a language only in a subdirectory providing an object library, and then
use the objects from a containing directory.  The above change teaches
the Ninja generator to continue working in this case.
2014-12-22 20:13:30 -05:00
Brad King 62b1998403 Merge branch 'ninja-fix-crash-on-error' into release 2014-12-22 20:00:07 -05:00
Brad King 9a13fcbf02 Ninja: Do not crash when CMAKE_<LANG>_COMPILE_OBJECT is empty (#15325) 2014-12-22 18:36:07 -05:00
Rolf Eike Beer 82fbf490b5 cmCTestTestHandler: take reference to temporary string instead of doing a copy
This will increase the lifetime of the temporary until the end of the function.
2014-12-22 21:38:59 +01:00
Brad King 6c39bc5520 Merge topic 'macho-parser'
c294a115 Mach-O: Use Mach-O parser to extract install names instead of otool.
e42da307 Mach-O: Add Mach-O parser for OS X and iOS.
2014-12-22 13:41:03 -05:00
Clinton Stimpson c294a115f2 Mach-O: Use Mach-O parser to extract install names instead of otool.
This has much better performance than calling "otool" or "xcrun -r otool"
to extract install names for rpath support.

Fixes bug #15178.
2014-12-22 11:33:00 -07:00
Clinton Stimpson e42da30782 Mach-O: Add Mach-O parser for OS X and iOS.
This parser also supports fat binaries which archive multiple
Mach-O binaries.
2014-12-22 11:32:10 -07:00
Vladislav Vinogradov 9c4984b4e5 ctest_coverage: Fix error message to report the file name
Print file name instead of line content for "Looks like there are more
lines in the file:" error message.
2014-12-22 09:25:24 -05:00
Calin Cascaval 42ed76bc99 cpack: Fix installed size computation with PackageMaker generator
Use the CPACK_PACKAGING_INSTALL_PREFIX when looking for files in a
component.  Otherwise we report all packages having size 1.
2014-12-22 09:17:12 -05:00
Kitware Robot d63609ed2a CMake Nightly Date Stamp 2014-12-22 00:01:08 -05:00
Kitware Robot 2c76f6f4da CMake Nightly Date Stamp 2014-12-21 00:01:07 -05:00
Kitware Robot 5bb0ae03ef CMake Nightly Date Stamp 2014-12-20 00:01:09 -05:00
Brad King bf731becfa Merge topic 'update-kwsys'
2e9acb6d Merge branch 'upstream-kwsys' into update-kwsys
1f7de543 KWSys 2014-12-18 (87c65319)
2014-12-19 08:26:59 -05:00
Brad King ccd5822a83 Merge topic 'osx-cfbundle-tweaks'
b189c599 Tests: Run CFBundleTest only with valid configuration
3a605693 Xcode: Call IsCFBundleOnApple to decide if bundle is being built
207b7af0 cmTarget: Use GetCFBundleDirectory within GetFullNameInternal
2014-12-19 08:26:57 -05:00
Brad King 1ac8523c3b Merge topic 'install-EXPORT-absolute-prefix'
dd089e08 install: Allow absolute EXPORT destination with relative targets (#15258)
2014-12-19 08:26:55 -05:00
Kitware Robot d48ccbe458 CMake Nightly Date Stamp 2014-12-19 00:01:09 -05:00
Stephen Kelly e2a489c76a Remove some temporary vectors for ExpandListArgument.
Expand directly into the target when possible.
2014-12-19 00:06:00 +01:00
Stephen Kelly 0f99feec04 cmGeneratorExpression: Remove unused header. 2014-12-19 00:06:00 +01:00
Stephen Kelly 722f1a71e3 CTest: Expand a string directly into a container.
Change the follow-up loop to use a const_iterator to log the
content.
2014-12-19 00:05:57 +01:00
Chuck Atkins 107dcac3e0 Fix compilation with the Oracle / Sun compiler (#15318)
One piece of code has some ambiguous type deduction that seems to
resolve correctly for most compilers but not for the Oracle compiler.
Make it more explicit.
2014-12-18 11:23:41 -05:00
Brad King 2e9acb6d43 Merge branch 'upstream-kwsys' into update-kwsys 2014-12-18 10:17:20 -05:00
Brad King cd7bde80bf Merge topic 'update-kwsys'
3470704f Merge branch 'upstream-kwsys' into update-kwsys
6a5ab894 KWSys 2014-12-16 (cc4046a8)
2014-12-18 10:16:42 -05:00
Brad King 45b1e31451 Merge topic 'vs-nsight-tegra-min-api'
eeaa25e5 Add 'ANDROID_API_MIN' target property to set Android Target MIN API
2014-12-18 10:16:40 -05:00
Brad King a39e65a817 Merge topic 'fix-sha2-cast-constness'
d4d2d72f sha2: Fix -Wcast-qual warnings by adding const to some casts
2014-12-18 10:16:38 -05:00
Kitware Robot 2a45da6ea4 CMake Nightly Date Stamp 2014-12-18 00:01:20 -05:00
Brad King 3470704f5a Merge branch 'upstream-kwsys' into update-kwsys 2014-12-17 15:00:39 -05:00
Brad King 9c7c6e434a Merge topic 'ctest_memcheck-no-empty-BC-output'
1c812979 ctest_memcheck: Do not open empty BC output file name
2014-12-17 14:54:14 -05:00
Brad King f408667d19 Merge topic 'fix_coverage_scanbuild_errors'
0622f92d CTest: Remove code to fix scanbuild errors
2014-12-17 14:44:19 -05:00
Sean McBride d4d2d72f5d sha2: Fix -Wcast-qual warnings by adding const to some casts 2014-12-17 13:53:04 -05:00
Gregor Jasny 3a605693a5 Xcode: Call IsCFBundleOnApple to decide if bundle is being built
Narrow down the decision if a CFBundle is built to one place.
This is a preparation patch to add another target property
which, if set, will imply BUNDLE.  Having only one function
which will have to look at both properties helps to keep code
clean.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2014-12-17 11:26:10 -05:00
Gregor Jasny 207b7af00b cmTarget: Use GetCFBundleDirectory within GetFullNameInternal
Replace duplicated code by call to GetCFBundleDirectory.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2014-12-17 11:24:02 -05:00
Dmitry Polyanitsa eeaa25e521 Add 'ANDROID_API_MIN' target property to set Android Target MIN API
Also add a 'CMAKE_ANDROID_API_MIN' variable to set the property
default.  Teach the VS generator to write the MIN API value into
Nsight Tegra project files.
2014-12-17 11:17:28 -05:00
Kitware Robot ddd193fcdd CMake Nightly Date Stamp 2014-12-17 00:01:08 -05:00
Brad King 1c8129795a ctest_memcheck: Do not open empty BC output file name
In cmCTestMemCheckHandler::PostProcessBoundsCheckerTest return early
if the output file name is empty.  We already do this in the similar
cmCTestMemCheckHandler::AppendMemTesterOutput method.
2014-12-16 13:49:38 -05:00
Kitware Robot f30bac5eb4 CMake Nightly Date Stamp 2014-12-16 00:01:09 -05:00
Joseph Snyder 0622f92d23 CTest: Remove code to fix scanbuild errors
Remove code from cmParseBlanketJSCoverage.cxx and
cmParseDelphiCoverage.cxx which caused scanbuild errors
about not reading the value that was stored.
2014-12-15 12:48:08 -05:00
Brad King dd089e08b5 install: Allow absolute EXPORT destination with relative targets (#15258)
When install(EXPORT) is given an absolute destination we cannot compute
the install prefix relative to the installed export file location.
Previously we disallowed installation of targets in such exports with a
relative destination, but did not enforce this for target property
values besides the location of the main target file.  This could lead to
broken installations when the EXPORT is installed to an absolute path
but usage requirements are specified relative to the install prefix.

Since an EXPORT installed to an absolute destination cannot be relocated
we can just hard-code the value of CMAKE_INSTALL_PREFIX as the base for
relative paths.  This will allow absolute install(EXPORT) destinations
to work with relative destinations for targets and usage requirements.

Extend the ExportImport test with a case covering this behavior.
2014-12-15 11:45:49 -05:00
Brad King c118816d44 CMake 3.1.0 2014-12-15 11:08:08 -05:00
Brad King 872ad7a26d Merge topic 'assert-no-string-conversion'
2e92570b Fix some Clang -Wstring-conversion warnings
2014-12-15 11:06:49 -05:00
Brad King 6da3f17309 Merge topic 'suncc-fixes'
97b65f81 Misc. fixes for the Oracle / Sun compiler.
2014-12-15 11:06:44 -05:00
Kitware Robot bbabb9d810 CMake Nightly Date Stamp 2014-12-15 00:01:07 -05:00
Kitware Robot 18817e07d6 CMake Nightly Date Stamp 2014-12-14 00:01:08 -05:00
Kitware Robot fef31f1f21 CMake Nightly Date Stamp 2014-12-13 00:01:30 -05:00
Sean McBride 2e92570bda Fix some Clang -Wstring-conversion warnings
Some false positives, but some flagged faulty asserts
where the ! was inside the string instead of outside.
2014-12-12 14:38:23 -05:00
Brad King 9f41c45f43 Merge topic 'catch-ctest-errors-better'
d8589e64 ctest: count errors from scripts properly
2014-12-12 11:16:04 -05:00
Brad King 9c4ef206c7 Merge topic 'drop-double-underscores'
111be180 Rename header guards to not start with double underscore
2014-12-12 11:16:00 -05:00
Chuck Atkins 97b65f8156 Misc. fixes for the Oracle / Sun compiler.
A few pieces of code have some ambiguous type deduction that seems to
resolve correctly for most compilers but not for the Oracle compiler.
This makes those few instances more explicit.
2014-12-12 10:04:47 -05:00
Kitware Robot 17f638a4c9 CMake Nightly Date Stamp 2014-12-12 00:01:09 -05:00
Sean McBride 111be1801f Rename header guards to not start with double underscore
Use regex to find/replace:

__(cm.*_h)
\1

Then fix QCMake.h by hand.
2014-12-11 13:53:06 -05:00
Kitware Robot 3171fe0afa CMake Nightly Date Stamp 2014-12-11 00:01:07 -05:00
Ben Boeckel d8589e6437 ctest: count errors from scripts properly
In the unlikely event that someone has a billion+ scripts (or some
codepath returns negative numbers), we could overflow and make a pile of
errors a non-error. This change also allows us to use flags for the
error in the future rather than just "something went wrong".
2014-12-10 17:22:21 -05:00
Kitware Robot a7d8345d8c CMake Nightly Date Stamp 2014-12-10 00:01:08 -05:00
Brad King 3b9477231d Merge topic 'find_library-updated-directory-content'
ce331bab find_library: Fix repeat call after changing directory content (#15293)
2014-12-09 10:54:54 -05:00
Kitware Robot 2372cdaa3a CMake Nightly Date Stamp 2014-12-09 00:01:08 -05:00
Brad King ce331bab92 find_library: Fix repeat call after changing directory content (#15293)
We use cmGlobalGenerator::GetDirectoryContent to avoid repeating
directory listings.  However, GetDirectoryContent loads content from
disk at most once.  This breaks find_library calls that occur when disk
content has changed since preceding find_library calls.

Teach cmGlobalGenerator::GetDirectoryContent to save the directory
modification time when content is loaded and re-load content if it
changes.

Create a RunCMake.find_library test with a case covering this.
2014-12-08 15:35:50 -05:00
Brad King 1f6f114a7a CMake 3.1.0-rc3 2014-12-08 09:09:24 -05:00
Brad King e72987dc11 Merge topic 'custom-command-multiple-outputs'
6c67b816 Makefile: Workaround Borland Make bug with multiple outputs
65ea5eb7 Tests: Cover rebuild with multiple custom command outputs (#15116)
644b4688 Makefile: Fix rebuild with multiple custom command outputs (#15116)
8a4c6d2d Xcode: Fix rebuild with multiple custom command outputs (#15116)
2014-12-08 09:07:18 -05:00
Brad King 47c41d902c Merge topic 'file-LOCK-timeout-type'
97841dad file: Use 'long' to represent the parsed LOCK TIMEOUT value
2014-12-08 09:07:14 -05:00
Brad King 79d1e1347a Merge topic 'ctest-binary-pipe'
29b0c8c3 ctest --launch: write to cout and cerr in binary
2014-12-08 09:07:12 -05:00
Brad King b61994d0a7 Merge topic 'vs-inherit-wd'
f545eb0b VS: Inherit target-level "-wd" flags in source files (#15284)
2014-12-08 09:07:08 -05:00
Brad King 90070a65d2 Merge topic 'try_compile-link-flags'
88eb5824 try_compile: Pass linker flags into test project (#14066)
a4f9b6f0 CMakeDetermineCompilerABI: Use normal linker flags in ABI project
2014-12-08 09:07:04 -05:00
Kitware Robot cfe666f1a2 CMake Nightly Date Stamp 2014-12-08 00:01:08 -05:00
Kitware Robot 9e6e6801d0 CMake Nightly Date Stamp 2014-12-07 00:01:16 -05:00
Brad King 6c67b8168c Makefile: Workaround Borland Make bug with multiple outputs
Given a rule of the form

  out1 out2: dep1
  out1 out2: dep2

Borland Make complains that there are multiple rules for "out1"
even though this works when there is only one output.  Instead
generate

  out1 out2: dep1 dep2

for Borland Make, but only when there are multiple outputs.
2014-12-06 07:36:52 -05:00
Kitware Robot bec5b3df01 CMake Nightly Date Stamp 2014-12-06 00:01:15 -05:00
Ruslan Baratov 97841dad2b file: Use 'long' to represent the parsed LOCK TIMEOUT value
Convert the StringToInt helper into a StringToLong helper with a 'long'
result type.  This will make the helper more useful to other callers
that want to use strtol.

While at it, also check errno after calling strtol in case the
conversion fails with a range error.
2014-12-05 12:59:37 -05:00
Ben Boeckel 29b0c8c360 ctest --launch: write to cout and cerr in binary
Because ctest reads in binary but writes in text mode, Windows' newline
transformation can be applied multiple times causing '\n' in the source
application to be written out as '\r\r\n' instead.
2014-12-05 12:47:18 -05:00
Brad King 644b4688d7 Makefile: Fix rebuild with multiple custom command outputs (#15116)
Fix the generated makefiles for custom commands with multiple outputs to
list all the outputs on the left hand side of the build rule.  This is
much simpler and more reliable than the old multiple-output-pair
infrastructure.
2014-12-05 09:55:49 -05:00
Brad King 8a4c6d2d2e Xcode: Fix rebuild with multiple custom command outputs (#15116)
The Xcode generator uses Makefiles under a run-script build-phase to
drive custom commands.  Fix the generated makefiles for custom commands
with multiple outputs to list all the outputs on the left hand side of
the build rule.  This is much simpler and more reliable than the old
multiple-output-pair infrastructure.
2014-12-05 09:52:09 -05:00
Kitware Robot c90633df9e CMake Nightly Date Stamp 2014-12-05 00:01:15 -05:00
Brad King f545eb0b0b VS: Inherit target-level "-wd" flags in source files (#15284)
If a source file COMPILE_FLAGS option adds "-wd", the .vcxproj file
will have a DisableSpecificWarnings setting for the source file.
Add to the setting a reference to %(DisableSpecificWarnings) to
inherit any such flags set for the whole target.
2014-12-04 15:40:04 -05:00
Brad King c7bd275393 Merge topic 'cached-regex-clear-fixed'
ceecd790 cmMakefile: store the number of last matches in a CMake var
7878d061 test: add a test for clearing regex results
2014-12-04 10:23:26 -05:00
Brad King e4665171f4 Merge topic 'fix-add_library-check-for-shared'
bd360ee3 add_library: Fix target type check for non-shared-lib platforms
2014-12-04 10:23:24 -05:00
Brad King 09f797c19c Merge topic 'vs-hlsl-typo'
955fbf29 VS: Fix typo in VS_SHADER_MODEL lookup comment
2014-12-04 10:23:21 -05:00
Brad King ba98442610 Merge topic 'vs-phone-store-deployment-location'
352f246f VS: Add source file property to specify Windows App deployment location
2014-12-04 09:10:05 -05:00
Kitware Robot 0f381ad521 CMake Nightly Date Stamp 2014-12-04 00:01:09 -05:00
Brad King 88eb5824da try_compile: Pass linker flags into test project (#14066)
Copy CMAKE_EXE_LINKER_FLAGS into the test project generated by
try_compile, just like we already copy CMAKE_<LANG>_FLAGS.

Add CMake Policy CMP0056 to activate this behavior in a compatible way,
but do not warn by default when the policy is not set since it will
affect all try_compile calls.

Extend the RunCMake.try_compile test with a case covering this behavior
for each policy setting.
2014-12-03 15:30:22 -05:00
Brad King a4f9b6f0ca CMakeDetermineCompilerABI: Use normal linker flags in ABI project
When compiling the ABI detection test project, do not override
CMAKE_EXE_LINKER_FLAGS completely.  The normally selected value of this
variable may influence how the link is done and may be needed to be
representative of how the calling project will be built.  Instead pass a
variable that try_compile will reference as additional flags.  Leave
this behavior of try_compile undocumented for now.
2014-12-03 14:53:14 -05:00
Brad King 955fbf29c7 VS: Fix typo in VS_SHADER_MODEL lookup comment 2014-12-03 14:12:32 -05:00
Ben Boeckel ceecd7902f cmMakefile: store the number of last matches in a CMake var
With PushScope and PopScope, keeping track of another bit of data for
each scope isn't easy. Instead, store it as another CMake variable so it
gets implicitly tracked along with everything else.

This works in a revert of commit
7d674b5f0b.
2014-12-03 11:06:44 -05:00
Brad King d90e288b7b Merge topic 'file-LOCK-command'
93017828 Help: Add notes for topic 'file-LOCK-command'
e6db4c5a file: Add LOCK subcommand to do file and directory locking
05d6531c cmSystemTools: Add StringToInt helper
2014-12-03 10:02:07 -05:00
Brad King cebce135c0 Merge topic 'fix-wince-unicode-entry-point'
681cda02 VS, WINCE: Fix entry point for Unicode builds
2014-12-03 10:02:01 -05:00
Brad King 03b3ee7de2 Merge topic 'xcode-target-search-perf'
48f78f5f Xcode: use a map to look up target pointers (#15201)
2014-12-03 10:01:53 -05:00
Brad King b9eac05fb6 Merge topic 'vs-hlsl-settings'
2a224b4c VS: Add source file properties to set the hlsl shader entry point and model
2014-12-03 10:01:49 -05:00
Brad King 53fa072e6a Merge topic 'add-continue-command'
0de867dd continue: Add a new CMake language command for loop continuation (#14013)
2014-12-03 10:01:44 -05:00
Ruslan Baratov e6db4c5a4e file: Add LOCK subcommand to do file and directory locking
Provide options to fail without blocking or to block up to a timeout.
Provide options to specify the scope containing the lock so it can be
released automatically at the end of a function, file, or process.

Extend the RunCMake.file test with cases covering the file(LOCK) command
usage and error cases.
2014-12-03 09:47:44 -05:00
Ruslan Baratov 05d6531c7a cmSystemTools: Add StringToInt helper
Convert a string to a signed integer and reject any extra input.

Co-Author: Rolf Eike Beer <eike@sf-mail.de>
2014-12-03 09:47:26 -05:00
Brad King 1c104c019a Merge branch 'vs-phone-store-deployment-location' into release 2014-12-03 09:32:42 -05:00
Brad King 7c28e7c172 Merge branch 'vs-hlsl-settings' into release 2014-12-03 09:32:38 -05:00
Gilles Khouzam 352f246f3e VS: Add source file property to specify Windows App deployment location
Add a VS_DEPLOYMENT_LOCATION source file property to specify where to
put files that are part of the package.  For example:

  set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_LOCATION "assets")

Without this, sources marked with VS_DEPLOYMENT_CONTENT cannot be
located properly.
2014-12-03 09:31:59 -05:00
Cedric Perthuis 2a224b4ce3 VS: Add source file properties to set the hlsl shader entry point and model
Create properties VS_SHADER_ENTRYPOINT and VS_SHADER_MODEL.  Without
these many .hlsl source files may not be possible to use.  Extend the
VSWinStorePhone test project to cover them.
2014-12-03 09:30:59 -05:00
Brad King 17e1ead25e Merge branch 'fix-wince-unicode-entry-point' into release 2014-12-03 09:08:40 -05:00
Pascal Bach 681cda02bf VS, WINCE: Fix entry point for Unicode builds
When _UNICODE is defined VS uses wmain instead of main as the entry function.
To make this correctly work on WindowsCE EntryPointSymbol needs to be set to
mainWCRTStartup instead of mainACRTStartup for console applications and to
wWinMainCRTStartup instead of WinMainCRTStartup for GUI applications.

Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
2014-12-03 09:07:11 -05:00
Brad King bd360ee329 add_library: Fix target type check for non-shared-lib platforms
When checking target types for TARGET_SUPPORTS_SHARED_LIBS == false,
enumerate exactly the library types not supported rather than trying to
maintain a list of all the types that are supported.  Otherwise

 add_library(SomeImportedLib UNKNOWN IMPORTED)

warns on platforms that do not support shared libraries.

Reported-by: Kelly Thompson <kgt@lanl.gov>
2014-12-03 08:51:11 -05:00
Kitware Robot 0e466f89fd CMake Nightly Date Stamp 2014-12-03 00:01:08 -05:00
Ben Boeckel 48f78f5f9e Xcode: use a map to look up target pointers (#15201)
Use an efficient internal lookup to associate cmTarget and cmXCodeObject
instances.
2014-12-02 10:51:15 -05:00
Brad King 983e434b00 Merge topic 'link-no-empty-response-files'
1c5be1f3 Makefile: Do not create an empty linker response file
2014-12-02 10:21:16 -05:00
Kitware Robot 0d757166fe CMake Nightly Date Stamp 2014-12-02 00:01:09 -05:00
Brad King 95b89e3fd3 Merge branch 'link-no-empty-response-files' into release 2014-12-01 13:59:41 -05:00
Brad King 1c5be1f367 Makefile: Do not create an empty linker response file
Since commit v3.1.0-rc1~821^2 (Windows: Use response files to specify
link libraries for GNU tools, 2014-03-04) we use a response file to pass
possibly long linker flag lists to the GNU linker on Windows.  On MinGW,
this may cause gfortran to use a response file to pass some flags to its
own internal invocation.  This is okay except when we are parsing
implicit link flags from the compiler ABI detection build.  If gfortran
uses a response file in that case then we may miss extracting some of
the implicit link flags, such as -lgfortran.  Fortunately, in the
compiler ABI detection case we do not actually link to anything so the
response file is empty.  Work around this problem by simply not using a
response file when the list of flags it is used to pass is empty (or
just whitespace).

Reported-by: Bill Somerville <bill@classdesign.com>
2014-12-01 13:49:26 -05:00
Gregor Jasny 0de867dde2 continue: Add a new CMake language command for loop continuation (#14013)
Inspired-by: Doug Barbieri
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2014-12-01 09:50:49 -05:00
Brad King 8e75f1d2fa Merge topic 'target-sources-error-conditions'
8a75c7ef Help: Document the export limitation of INTERFACE_SOURCES.
e1348056 Export: Disallow export of targets with INTERFACE_SOURCES
bb5905bb cmTarget: Don't allow relative paths in INTERFACE_SOURCES
2014-12-01 08:57:34 -05:00
Brad King 22b72b1894 Merge topic 'fix-transitive-OBJECT_SOURCES-context'
672f1001 Genex: Fix evaluation context propagation for TARGET_OBJECTS.
2014-12-01 08:57:28 -05:00
Brad King 9f59caa9bd Merge topic 'fix-source-case-matching'
84d124e8 Fix lookup of source names after conversion to their actual case (#15259)
2014-12-01 08:57:25 -05:00
Brad King d724640fa2 Merge topic 'revert-cached-regex-clear-for-master'
808c77e2 Merge branch 'revert-cached-regex-clear' into revert-cached-regex-clear-for-master
7d674b5f Revert "ClearMatches: Only clear matches which were actually set" (#15261)
2014-12-01 08:57:23 -05:00
Brad King 58d3898083 Merge branch 'target-sources-error-conditions' into release 2014-12-01 08:55:45 -05:00
Brad King baa283f922 Merge branch 'fix-transitive-OBJECT_SOURCES-context' into release 2014-12-01 08:51:59 -05:00
Kitware Robot b9d437a292 CMake Nightly Date Stamp 2014-12-01 00:01:08 -05:00
Kitware Robot 9e4e0a2307 CMake Nightly Date Stamp 2014-11-30 00:01:08 -05:00
Stephen Kelly e134805666 Export: Disallow export of targets with INTERFACE_SOURCES
This can be allowed in the next release, but it needs to have some
features present and tested such as

* Ensuring that relative paths do not appear in the generated property.
* Ensuring that paths to the source or build directories do not appear.
* Generating a check in the file for CMake 3.1 or later so that the
    resulting property will be consumed.
* Ensuring that any referenced targets are part of an export set and
    generating a check for them.
* INSTALL_INTERFACE and BUILD_INTERFACE content.

All of these checks are already done for INTERFACE_INCLUDE_DIRECTORIES,
but it is too late to add them for INTERFACE_SOURCES for CMake 3.1.
As the checks introduce some new error conditions, it is better to
disallow exporting fully for this case and introduce proper error
conditions later instead of policies.
2014-11-29 12:24:59 +01:00
Stephen Kelly bb5905bb13 cmTarget: Don't allow relative paths in INTERFACE_SOURCES
Follow the pattern of checks that are made for INTERFACE_INCLUDE_DIRECTORIES.
Existence is already checked by cmSourceFile::GetFullPath.  Add a check
to disallow relative paths in source directories. Otherwise code such as

 target_sources(lib1 INTERFACE foo.cpp)

would fail if consumed by a target in a different directory.

Unlike the INTERFACE_INCLUDE_DIRECTORIES behavior, we don't care whether
the entry comes from an IMPORTED target or not.  In the include directories
case, the directory for a non-imported target might not exist yet but
might be created.  In the sources case, a file which does not yet
exist in the filesystem must be explicitly marked with the GENERATED
property.

Adjust existing tests and add a new test for the error.
2014-11-29 12:24:59 +01:00
Kitware Robot 584d625a04 CMake Nightly Date Stamp 2014-11-29 00:01:08 -05:00
Kitware Robot 0963fb64c6 CMake Nightly Date Stamp 2014-11-28 00:01:08 -05:00
Kitware Robot 3fae1f9265 CMake Nightly Date Stamp 2014-11-27 00:01:14 -05:00
Brad King d7e4bd34e0 Merge branch 'fix-source-case-matching' into release 2014-11-26 17:17:41 -05:00
Brad King 84d124e8f0 Fix lookup of source names after conversion to their actual case (#15259)
Since commit v3.1.0-rc1~688^2~15 (cmTarget: Add a method to obtain list of
filenames for sources, 2014-03-17) we have code paths that lookup sources by
strings containing their own full path after normalization to the actual case
on disk.  This fails in the case that a cmSourceFile has already been created
with a different case in the filename.  The comparison of the directory works
because it is always normalized.  Only the comparison of the file name fails.

Fix this by using a case-insensitive comparison of source file names on
platforms that do not have case-sensitive filesystems.
2014-11-26 17:03:40 -05:00
Stephen Kelly 672f1001c0 Genex: Fix evaluation context propagation for TARGET_OBJECTS.
Extract a new method to encapsulate the requirements of evaluating
dependent-expressions, namely, propagation of the
EvaluateForBuildsystem setting, which is missing from the
getLinkedTargetsContent implementation.

Commit v3.1.0-rc1~688^2 (Genex: Only evaluate TARGET_OBJECTS to determine
target sources., 2014-03-20) introduced an error case for use of
TARGET_OBJECTS outside of the context of generating the buildsystem,
as the path to object files may be dependent on buildsystem
variables (See bug #15226).

Commit v3.1.0-rc1~314^2 (Allow INTERFACE_SOURCES to specify
$<TARGET_OBJECTS> (#14970), 2014-07-09) made it possible to
propagate such content to dependent targets.

While that commit propagated the EvaluateForBuildsystem setting
for the case of a TARGET_PROPERTY expression, as generated for
direct dependencies of a target in
cmTargetInternals::AddInterfaceEntries, it did not add propagation
for content from further transitive target dependencies, as determined
by getLinkedTargetsContent.
2014-11-26 22:16:15 +01:00
Brad King 808c77e231 Merge branch 'revert-cached-regex-clear' into revert-cached-regex-clear-for-master
Resolve conflict in Source/cmMakefile.h by integrating both changes.
2014-11-26 13:53:06 -05:00
Brad King 82582c96bd Merge topic 'break-command-strictness'
d54617d0 break: Add policy CMP0055 to check calls strictly
bae604d9 Track nested loop levels in CMake language with a stack of counters
2014-11-26 13:50:47 -05:00
Ben Boeckel 7d674b5f0b Revert "ClearMatches: Only clear matches which were actually set" (#15261)
This reverts commit v3.1.0-rc1~557^2~2 (ClearMatches: Only clear matches
which were actually set, 2014-03-12).  The optimization did not track
the match count in the same scope as the variables, allowing possible
inconsistency.

Resolve conflicts in Source/cmIfCommand.cxx, Source/cmMakefile.cxx,
and Source/cmMakefile.h by moving the changes to the new location
of the code involved.
2014-11-26 13:45:06 -05:00
Brad King 57a77fbe69 Merge topic 'ccmake-system-form'
6b045c3b ccmake: Add CMAKE_USE_SYSTEM_FORM option to use libform instead of cmForm
2014-11-26 10:37:51 -05:00
Kitware Robot 94c7ff9fef CMake Nightly Date Stamp 2014-11-26 00:01:14 -05:00
Gregor Jasny d54617d006 break: Add policy CMP0055 to check calls strictly
Reject break() without loop scope or any arguments.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2014-11-25 14:14:20 -05:00
Gregor Jasny bae604d9a8 Track nested loop levels in CMake language with a stack of counters
It gets incremented while entering a loop block (e.g. foreach or while)
and gets decremented when leaving the block. Because scope borders for
example at function borders must be taken into account the counter is
put into a stack. With every new scope an empty counter is pushed on the
stack, when leaving the scope the original value is restored.

This will allow easy querying if the break command is properly nested
within a loop scope.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2014-11-25 14:14:15 -05:00
Ådne Hovda 6b045c3ba8 ccmake: Add CMAKE_USE_SYSTEM_FORM option to use libform instead of cmForm 2014-11-25 11:29:58 -05:00
Brad King c7b9fad117 Merge topic 'remove-ancient-msvc-workarounds'
12cb0b86 Help: Update developer manual with some C++ features now permitted.
ba74465f cmGeneratorTarget: Remove MSVC7 workaround
41363c0c VisualStudio: Remove MSVC6 compatibility macro.
4efcfe52 cmSystemTools: Remove MSVC6 compatibility define.
5f4695cd cmStandardIncludes: Remove MSVC6 condition for cmArrayBegin macro.
7a064337 cmFindCommon: Remove MSVC6 workaround for nested struct private access.
fdb73547 cmTarget: Remove std::min and std::max MSVC6 compatibility code.
2014-11-25 10:28:57 -05:00
Brad King 4987b37165 Merge topic 'remove-c_str'
5eb4d759 Remove some unneeded c_str calls.
2014-11-25 10:18:49 -05:00
Brad King 2fefe9e575 Merge topic 'fortran-linker-flags'
17b0fe03 Fix incremental linking setting for Fortran + VS
2014-11-25 10:18:45 -05:00
Brad King ce64e3607f Merge topic 'cmTarget-null_ptr-everywhere'
32a191ce cmTarget: Use null_ptr code path on all platforms
2014-11-25 10:18:35 -05:00
Brad King 6a2c7e1e0d Merge topic 'file-GENERATE-rerun'
26e98c34 file(GENERATE): Re-run cmake when appropriate.
2014-11-25 10:18:29 -05:00
Brad King c8da86a094 Merge topic 'clean-autogen'
3bd59b60 QtAutogen: Use cmHasLiteral{Prefix,Suffix} where possible.
bf00f528 QtAutogen: Don't take a reference to temporary.
2014-11-25 10:18:23 -05:00
Brad King a5531950cc Merge topic 'ccmake-hpux'
7a687292 ccmake: Cleanup and simplify conditional blocks for HP-UX
44f02b42 ccmake: Use standard getmaxyx instead of non-standard getmax[xy]
ee3d06a4 ccmake: Remove incomplete support for cur_colr on old HP-UX
2014-11-25 10:18:21 -05:00
Brad King 0f19208076 Merge topic 'custom-command-byproducts'
557aef0b ExternalProject: Add options to specify BYPRODUCTS (#14963)
e15a7075 Add an option for explicit BYPRODUCTS of custom commands (#14963)
2014-11-25 10:18:16 -05:00
Kitware Robot c5ac0fce5c CMake Nightly Date Stamp 2014-11-25 00:01:13 -05:00
Kitware Robot 7e8fe68e9c CMake Nightly Date Stamp 2014-11-24 00:01:08 -05:00
Stephen Kelly 5eb4d7590e Remove some unneeded c_str calls. 2014-11-23 11:09:54 +01:00
Kitware Robot 2a0c654858 CMake Nightly Date Stamp 2014-11-23 00:01:08 -05:00
Kitware Robot 2ed0088b2a CMake Nightly Date Stamp 2014-11-22 00:01:07 -05:00
Zack Galbreath 17b0fe0305 Fix incremental linking setting for Fortran + VS
This commit fixes a bug where it was impossible to specify
/INCREMENTAL to Fortran projects built with Visual Studio.

The problem was due to the fact that .vfproj files expect
the value of this flag to be "linkIncremental{No,Yes},
whereas .vcproj files expect this value to be 0, 1, or 2.

The implementation of this fix adds a new data structure for
Visual Studio linker flags specific to Fortran.  This can
easily be extended in the future if more such discrepencies
between C/C++ and Fortran linking are discovered.
2014-11-21 13:32:45 -05:00
Kitware Robot a075777ca1 CMake Nightly Date Stamp 2014-11-21 00:01:11 -05:00
Stephen Kelly ba74465fbc cmGeneratorTarget: Remove MSVC7 workaround
Use partial specialization everywhere.
2014-11-20 23:07:22 +01:00
Stephen Kelly 41363c0c61 VisualStudio: Remove MSVC6 compatibility macro. 2014-11-20 22:25:44 +01:00
Stephen Kelly 4efcfe52f4 cmSystemTools: Remove MSVC6 compatibility define. 2014-11-20 22:24:27 +01:00
Stephen Kelly 5f4695cd06 cmStandardIncludes: Remove MSVC6 condition for cmArrayBegin macro. 2014-11-20 22:22:45 +01:00
Stephen Kelly 7a0643379b cmFindCommon: Remove MSVC6 workaround for nested struct private access. 2014-11-20 22:22:00 +01:00
Stephen Kelly fdb7354722 cmTarget: Remove std::min and std::max MSVC6 compatibility code.
CMake is no longer required to build with MSVC6.
2014-11-20 22:17:16 +01:00
Brad King 32a191ce4b cmTarget: Use null_ptr code path on all platforms
This reduces conversions asked of the compiler.  Also drop 'static' from
the declaration of the local null_ptr helper.
2014-11-20 10:22:07 -05:00
Kitware Robot b6f6b0a983 CMake Nightly Date Stamp 2014-11-20 00:01:08 -05:00
Kitware Robot f7b6f3d967 CMake Nightly Date Stamp 2014-11-19 00:01:08 -05:00
Stephen Kelly 26e98c34dc file(GENERATE): Re-run cmake when appropriate.
Re-run if the input file changes or if the output file is removed.

This only works with the Makefile generators currently.  The limitation
of the Ninja generator is tracked as issue #15256.  The IDE
generators will need larger refactoring as they currently rely on
being able to determine the depends and output files at the start of
generate-time, which is too early for the file(GENERATE) case.
2014-11-19 00:19:09 +01:00
Stephen Kelly 3bd59b6014 QtAutogen: Use cmHasLiteral{Prefix,Suffix} where possible. 2014-11-18 23:20:40 +01:00
Stephen Kelly bf00f5287b QtAutogen: Don't take a reference to temporary.
While a const reference to a temporary is standard conformant,
it doesn't seem to be necessary or advantageous here.
2014-11-18 23:20:40 +01:00
Ådne Hovda 7a68729223 ccmake: Cleanup and simplify conditional blocks for HP-UX 2014-11-18 10:03:35 -05:00
Ådne Hovda 44f02b42fb ccmake: Use standard getmaxyx instead of non-standard getmax[xy]
Swap out getmax[xy]() calls for single call to getmaxyx(), to support
strict X/Open conformant curses implementations, e.g. HP-UX Xcurses.
2014-11-18 10:02:33 -05:00
Ådne Hovda ee3d06a41e ccmake: Remove incomplete support for cur_colr on old HP-UX
Enable support for the more modern Xcurses.
2014-11-18 10:02:08 -05:00
Brad King d526ebc603 Merge topic 'vs-check-phone-store-tools'
689cd0d4 VS: Do not produce WinMD file for OBJECT libraries (#15228)
b20a32ac VS: Improve error messages when compiler is not detected (#15228)
2014-11-18 09:12:34 -05:00
Kitware Robot 52fd5775d1 CMake Nightly Date Stamp 2014-11-18 00:01:08 -05:00
Brad King bea609ac2a Merge branch 'vs-check-phone-store-tools' into release 2014-11-17 15:39:17 -05:00
Brad King 3609fceee7 Merge topic 'ninja-minor-refactoring'
67bd514a Ninja: Refactor restat to be a string internally
ef42e57d Ninja: Use a TARGET_FILE variable to hold the link output file
592644c4 Tests/BuildDepends: Drop unneeded help for Ninja
2014-11-17 11:35:45 -05:00
Brad King 598a316154 Merge branch 'vs14-is-2015' into release 2014-11-17 09:44:52 -05:00
Brad King ec34b4b8f7 Merge branch 'kwsys-SharedForward-vs14' into release 2014-11-17 09:44:45 -05:00
Brad King afc557d10e Merge branch 'upstream-kwsys' into update-kwsys 2014-11-17 09:41:57 -05:00
Brad King 444f61e044 Merge topic 'console-pool'
2d75d7e5 Help: Add notes for topic 'console-pool'
f42d86f0 Ninja: Implement USES_TERMINAL using the console pool if available
f281ae01 Ninja: Remove unused declaration
d5eae556 Ninja: factor out the test for console pool support
4d1fedf4 Give the interactive cache editor the USES_TERMINAL property
fe5d6e8c Add USES_TERMINAL option for custom commands
ad6ee426 Rename doing_verbatim to doing_nothing
2014-11-17 09:40:56 -05:00
Brad King e943fa8a19 Merge topic 'vs14-is-2015'
f5afb90d VS: Rename VS 14 generator to 'Visual Studio 14 2015'
2014-11-17 09:40:51 -05:00
Brad King c61efbd684 Merge topic 'fix-vs2015-warnings'
b138be07 cmVisualStudio10TargetGenerator: fix a narrowing warning
8d379cd7 cmCallVisualStudioMacro: fix a shadowing warning
2014-11-17 09:40:47 -05:00
Brad King 545d10cc67 Merge topic 'string-SUBSTRING-truncate'
474bbb9d string: Tolerate SUBSTRING length exceeding end index
2014-11-17 09:40:44 -05:00
Gilles Khouzam 689cd0d43e VS: Do not produce WinMD file for OBJECT libraries (#15228)
They are implemented as static libraries for the IDE so treat them the
same.
2014-11-17 08:57:14 -05:00
Kitware Robot d42e314900 CMake Nightly Date Stamp 2014-11-17 00:01:07 -05:00
Kitware Robot f1cd1434a4 CMake Nightly Date Stamp 2014-11-16 00:01:07 -05:00
Kitware Robot 08348aec48 CMake Nightly Date Stamp 2014-11-15 00:01:17 -05:00
Brad King 67bd514adc Ninja: Refactor restat to be a string internally
This will allow values other than "" and "1" to be generated in
the rules.ninja file.
2014-11-14 16:16:00 -05:00
Brad King e15a7075b5 Add an option for explicit BYPRODUCTS of custom commands (#14963)
A common idiom in CMake-based build systems is to have custom commands
that generate files not listed explicitly as outputs so that these
files do not have to be newer than the inputs.  The file modification
times of such "byproducts" are updated only when their content changes.
Then other build rules can depend on the byproducts explicitly so that
their dependents rebuild when the content of the original byproducts
really does change.

This "undeclared byproduct" approach is necessary for Makefile, VS, and
Xcode build tools because if a byproduct were listed as an output of a
rule then the rule would always rerun when the input is newer than the
byproduct but the byproduct may never be updated.

Ninja solves this problem by offering a 'restat' feature to check
whether an output was really modified after running a rule and tracking
the fact that it is up to date separately from its timestamp.  However,
Ninja also stats all dependencies up front and will only restat files
that are listed as outputs of rules with the 'restat' option enabled.
Therefore an undeclared byproduct that does not exist at the start of
the build will be considered missing and the build will fail even if
other dependencies would cause the byproduct to be available before its
dependents build.

CMake works around this limitation by adding 'phony' build rules for
custom command dependencies in the build tree that do not have any
explicit specification of what produces them.  This is not optimal
because it prevents Ninja from reporting an error when an input to a
rule really is missing.  A better approach is to allow projects to
explicitly specify the byproducts of their custom commands so that no
phony rules are needed for them.  In order to work with the non-Ninja
generators, the byproducts must be known separately from the outputs.

Add a new "BYPRODUCTS" option to the add_custom_command and
add_custom_target commands to specify byproducts explicitly.  Teach the
Ninja generator to specify byproducts as outputs of the custom commands.
In the case of POST_BUILD, PRE_LINK, and PRE_BUILD events on targets
that link, the byproducts must be specified as outputs of the link rule
that runs the commands.  Activate 'restat' for such rules so that Ninja
knows it needs to check the byproducts, but not for link rules that have
no byproducts.
2014-11-14 16:16:00 -05:00
Brad King ef42e57d47 Ninja: Use a TARGET_FILE variable to hold the link output file
Use an explicit "$TARGET_FILE" variable instead of "$out" so that
we can have multiple output files while still only referencing the
main one in command lines.
2014-11-14 16:16:00 -05:00
Brad King f5afb90d7c VS: Rename VS 14 generator to 'Visual Studio 14 2015'
Now that we know the year component of this VS version we
can add it to the generator name.  For convenience, map
the name without the year to the name with the year.
2014-11-14 14:23:36 -05:00
Brad King 480ed9cdec KWSys SharedForward: Hard-code the ldpath buffer size to below VS 14 limit
Visual Studio 14 (2015) complains if a static character array is
declared with more than 65535 elements.  This limit should be large
enough for SharedForward clients, so just hard-code that instead of
trying to compute a limit.
2014-11-14 13:56:58 -05:00
Peter Collingbourne f42d86f0b8 Ninja: Implement USES_TERMINAL using the console pool if available 2014-11-14 11:56:33 -05:00
Peter Collingbourne f281ae01a2 Ninja: Remove unused declaration 2014-11-14 11:56:33 -05:00
Peter Collingbourne d5eae5563f Ninja: factor out the test for console pool support 2014-11-14 11:56:33 -05:00
Peter Collingbourne 4d1fedf46e Give the interactive cache editor the USES_TERMINAL property 2014-11-14 11:56:33 -05:00
Peter Collingbourne fe5d6e8c0f Add USES_TERMINAL option for custom commands
Teach the add_custom_command and add_custom_target commands a new
USES_TERMINAL option.  Use it to tell the generator to give the command
direct access to the terminal if possible.
2014-11-14 11:55:09 -05:00
Peter Collingbourne ad6ee42627 Rename doing_verbatim to doing_nothing
We are about to introduce another property here, so give this
a better name.
2014-11-14 11:48:47 -05:00
Brad King fbefaaba20 Merge topic 'vs-nsight-tegra-version'
bb3c87f1 VS: Change Nsight Tegra 2.0 Project Revision Number from 8 to 9
2014-11-14 10:56:44 -05:00
Brad King 810ef59a42 Merge topic 'no-cmake-self-install-when-cross-compiling'
15f55cca Do not use just-built CMake to install itself when cross-compiling (#15248)
2014-11-14 10:56:39 -05:00
Gilles Khouzam b20a32ac73 VS: Improve error messages when compiler is not detected (#15228)
CMake requires both the Desktop SDK and the correct platform SDK
(Windows Phone or Windows Store) to be installed when targeting the
Windows mobile platforms.  Verify that the right platform components are
installed and give a more detailed error message when something is
wrong.
2014-11-14 09:13:27 -05:00
Kitware Robot 0700f2ef19 CMake Nightly Date Stamp 2014-11-14 00:01:13 -05:00
Brad King 6a16d9c7df Merge branch 'vs-nsight-tegra-version' into release 2014-11-13 14:07:10 -05:00
Dmitry Polyanitsa bb3c87f1da VS: Change Nsight Tegra 2.0 Project Revision Number from 8 to 9
A hotfix to Nsight Tegra 2.0 needed to increase the project number.
Teach CMake to generate the newer number for this version.
2014-11-13 14:05:12 -05:00
Ben Boeckel b138be07b4 cmVisualStudio10TargetGenerator: fix a narrowing warning
0xAA literals are integers which doesn't fit into a char array. C++11
says this is an error and VS2015 now warns about it.
2014-11-13 13:28:08 -05:00
Ben Boeckel 8d379cd7ac cmCallVisualStudioMacro: fix a shadowing warning 2014-11-13 13:27:56 -05:00
Domen Vrankar 474bbb9dbc string: Tolerate SUBSTRING length exceeding end index
string SUBSTRING command now ignores length if it points
past end of string and uses end of string instead.
String SUBSTRING tests now cover more corner cases.
2014-11-13 11:04:52 -05:00
Brad King 0d047e81f3 Merge branch 'no-cmake-self-install-when-cross-compiling' into release 2014-11-13 10:22:06 -05:00
Brad King cddb5002b5 Merge topic 'file-GENERATE-source'
b80557c7 file(GENERATE): Evaluate early to allow generating source files
0019d54b Genex: Fix whitespace issue.
2014-11-13 10:08:32 -05:00
Brad King dd89506c1e Merge topic 'refactor-search-path-construction'
1abd7cd9 Use containers of labeled search paths instead of individual members
2a9ac4bd Encapsulate search path manipulation functions into a seperate class.
32922840 Refactor and seperate search path construction for find commands
2014-11-13 10:08:27 -05:00
Brad King 15f55cca59 Do not use just-built CMake to install itself when cross-compiling (#15248)
The special case added by commit v2.4.0~3051 (When building CMake
itself, use the new cmake to install so that the current cmake can be
overwritten, 2004-06-09) does not make sense when cross-compiling.
2014-11-13 08:58:16 -05:00
Kitware Robot e41799d574 CMake Nightly Date Stamp 2014-11-13 00:01:15 -05:00
Stephen Kelly b80557c7bd file(GENERATE): Evaluate early to allow generating source files
The evaluation files must be known before cmTargetTraceDependencies
attempts to find them, but we must actually generate the files after
cmTargetTraceDependencies, as that can add to target SOURCES.  The
limitation is that the generated output name must not depend on the
SOURCES of a target if the generated file is used by that target.

Mark the output files as GENERATED so that trace dependencies does
not expect them to already exist in the filesystem.

Move the invokation of ForceLinkerLanguage in the Generate logic
to after the generated file names are known.  ForceLinkerLanguage
tries to determine the sources of a target (in order to determine
an already-known language) and otherwise fails to get information
about the generated file.

Test that the output of file(GENERATE) can be used as a target source
file and that accessing the target SOURCES in the name of the output
file is an error.  Accessing the TARGET_OBJECTS would be a similar
error if it was legal to use that generator expression in this
context.  That is not currently possible and is a different error
condition, so test the current error output as a reminder to change
the expected output if that becomes possible in the future.  Test
that generated rule files resulting from cmTargetTraceDependencies
appear in the SOURCES generated in the output file.
2014-11-12 22:36:45 +01:00
Brad King 433c6d4689 CMake 3.1.0-rc2 2014-11-12 09:41:58 -05:00
Brad King 7d9611433b Merge topic 'fix-vs12-GetVersionEx-warning'
3a6c3599 Suppress deprecation warnings for GetVersionEx
2014-11-12 09:35:49 -05:00
Brad King 9a4afc1f9f Merge topic 'update-kwsys'
75009e4b Merge branch 'upstream-kwsys' into update-kwsys
35ecc355 KWSys 2014-11-12 (5843f590)
2014-11-12 09:35:48 -05:00
Brad King 5bed08a06d Merge branch 'kwsys-SystemInformation-AIX-_SC_AIX_REALMEM' into release 2014-11-12 09:17:13 -05:00
Brad King 75009e4bcd Merge branch 'upstream-kwsys' into update-kwsys 2014-11-12 08:58:42 -05:00
Chuck Atkins 1abd7cd930 Use containers of labeled search paths instead of individual members
Manage classes of search paths in labeled containers.  This removes the
need to have a seperate member variable for each type of search path, but
also allows path types to be grouped togethor in various different ways
and manipulated as subsets of the full set of search paths.
2014-11-12 08:21:46 -05:00
Kitware Robot 3fdaf78afe CMake Nightly Date Stamp 2014-11-12 00:01:10 -05:00
Stephen Kelly 0019d54b6e Genex: Fix whitespace issue. 2014-11-11 21:20:55 +01:00
Chuck Atkins 2a9ac4bd83 Encapsulate search path manipulation functions into a seperate class.
The functions for adding the various different types of paths have been
factored out into a new class, cmSearchPath.  It is to be used as a helper
container class for the various find_* commands.
2014-11-11 13:39:51 -05:00
Chuck Atkins 32922840e7 Refactor and seperate search path construction for find commands
Prior to this commit, the set of search paths to traverse for find commands
was incrementally constructed.  This change allows each group of paths, i.e.
CMakeVariablePaths, UserHintsPaths, SystemEnvironmentPaths, etc. to be
constructed and manipulated independently, and then all combined togethor.
2014-11-11 13:39:51 -05:00
Brad King ec893d9a26 Merge branch 'fix_link-line-dedup_regression' into release 2014-11-11 12:46:27 -05:00
Brad King 70c2432887 Merge topic 'fix_link-line-dedup_regression'
4db31095 Fix link line order when shared libraries are de-duplicated
2014-11-11 12:45:54 -05:00
Ådne Hovda a234bcafd2 KWSys SystemInformation: Check for _SC_AIX_REALMEM before using it
Add a check for supported flag when querying for system memory on
AIX 5.1.
2014-11-11 09:16:46 -05:00
Brad King 3a6c359906 Suppress deprecation warnings for GetVersionEx
Visual Studio 12 (2013) deprecated GetVersionEx:

  warning C4996: 'GetVersionExW': was declared deprecated

in favor of either "versionhelpers.h" or VerifyVersionInfo, neither of
which exist in some of the older compilers we support.  Rather than
try to port conditionally to VerifyVersionInfo, simply suppress the
warning for now.
2014-11-11 08:55:58 -05:00
Kitware Robot dd563e1eb3 CMake Nightly Date Stamp 2014-11-11 00:01:07 -05:00
Daniele E. Domenichelli 4db31095e5 Fix link line order when shared libraries are de-duplicated
Since commit v3.1.0-rc1~227^2~1 (De-duplicate shared library targets in
generated link lines, 2014-07-30) we de-duplicate shared library targets
on the link line.  However, some toolchains will fail linking if an
executable is linking to a shared library that is not used directly and
a static library that depends on the shared one.  The linker may not
keep the reference to the shared library the first time and then the
symbols needed by the static library may not be found.

Fix this by reversing the direction of the for loop that removes the
duplicate shared libraries, in order to ensure that the last occurrence
of the library is left instead of the first one.

Extend Tests/Dependency with a case covering this behavior.  Create an
executable that links to a shared library and a static library but only
needs the shared library as a dependency of the static library.

Co-Author: Brad King <brad.king@kitware.com>
2014-11-10 14:46:22 -05:00
Brad King a1f964ef68 Merge topic 'make-fortran-preprocessor-assembly-targets'
b6b37e30 Makefile: Add assembly and preprocessed targets for Fortran
0842b084 Makefile: Refactor checks for lang-specific targets and export compile cmds
2014-11-10 10:43:08 -05:00
Brad King 742e6f8f06 Merge topic 'encoding-curl'
e63dcb13 Encoding: Use encoding libcurl expects with file: urls.
2014-11-10 10:43:06 -05:00
Brad King 8532a4f9a0 Merge topic 'file-GENERATE-permissions'
81afbbc0 file(GENERATE): Use permissions of input file if present.
2014-11-10 10:43:04 -05:00
Brad King ee6c79d1a3 Merge topic 'genex-target-objects-ordering'
caa4b7b8 genex: Preserve order while evaluating TARGET_OBJECTS
2014-11-10 10:42:59 -05:00
Tim Gallagher b6b37e3037 Makefile: Add assembly and preprocessed targets for Fortran
Extend the FortranOnly test to cover "make <src>.i" targets.
2014-11-10 10:24:53 -05:00
Kitware Robot a82dde2d3f CMake Nightly Date Stamp 2014-11-10 00:01:07 -05:00
Kitware Robot 13fb4fd167 CMake Nightly Date Stamp 2014-11-09 00:01:08 -05:00
Kitware Robot 5bdb9b6189 CMake Nightly Date Stamp 2014-11-08 00:01:08 -05:00
Clinton Stimpson caa4b7b88b genex: Preserve order while evaluating TARGET_OBJECTS
The logic introduced in commit v3.1.0-rc1~688^2~9 (Genex: Evaluate
TARGET_OBJECTS as a normal expression, 2014-02-26) ordered a map
by pointer value and then constructed a list of object files by
iterating over the map.  This is not deterministic.

Since commit v3.1.0-rc1~688^2~5 (cmTarget: Allow any generator
expression in SOURCES property, 2014-03-18) the order produced by the
above-mentioned logic started being used for the actual list of object
files on the link line.  Since it is not deterministic, spurious
re-links occur after re-running CMake simply because the order of
objects changed on the link line.

Fix this by iterating over the original vector of source files instead
of the map.  This has a deterministic order.
2014-11-07 09:38:00 -05:00
Kitware Robot c60a5f83ce CMake Nightly Date Stamp 2014-11-07 00:01:08 -05:00
Kitware Robot 917da5d027 CMake Nightly Date Stamp 2014-11-06 00:01:08 -05:00
Tim Gallagher 0842b08463 Makefile: Refactor checks for lang-specific targets and export compile cmds
The checks are now split into languages that are able to generate
assembly listings, languages that are able to generate preprocessed
listings, and languages that are able to export the compile commands.
2014-11-05 14:50:16 -05:00
Clinton Stimpson e63dcb1378 Encoding: Use encoding libcurl expects with file: urls.
For unescaped file: URLs on Windows, libcurl expects
the ANSI code page.

This fixes the CMake.FileUpload test when CMake is configured
to use UTF-8 internally with a non-ascii build directory name.
2014-11-05 07:20:21 -07:00
Kitware Robot d5a373a10d CMake Nightly Date Stamp 2014-11-05 00:01:08 -05:00
Stephen Kelly 81afbbc09b file(GENERATE): Use permissions of input file if present. 2014-11-04 22:38:22 +01:00
Brad King 34c16c5558 Merge topic 'update-kwsys'
5868b4e2 Merge branch 'upstream-kwsys' into update-kwsys
72b5b480 KWSys 2014-10-31 (88c8cc7f)
2014-11-04 15:09:41 -05:00
Kitware Robot 38be87caa4 CMake Nightly Date Stamp 2014-11-04 00:01:09 -05:00
Brad King a72ff020db Merge branch 'fix-configure_file-COPYONLY' into release 2014-11-03 09:35:34 -05:00
Brad King 6aa2d47737 Merge topic 'fix-configure_file-COPYONLY'
1531df2b configure_file: Warn about unknown arguments
4abbb140 Qt4: Fix configure_file call to use COPYONLY, not COPY_ONLY
bd7ba8e2 KWSys: Fix configure_file call to use COPYONLY, not COPY_ONLY
e9282782 Help: Fix configure_file call to use COPYONLY, not COPY_ONLY
2014-11-03 09:08:35 -05:00
Kitware Robot 44853be608 CMake Nightly Date Stamp 2014-11-03 00:01:07 -05:00
Kitware Robot 5755d0059a CMake Nightly Date Stamp 2014-11-02 00:01:07 -04:00
Kitware Robot b25a200204 CMake Nightly Date Stamp 2014-11-01 00:01:14 -04:00
Brad King 1531df2b86 configure_file: Warn about unknown arguments
Extend the RunCMake.configure_file test with a case covering possible
common typos of the COPYONLY option.

Reported-by: Iosif Neitzke <iosif.neitzke@gmail.com>
2014-10-31 13:21:21 -04:00
Brad King bd7ba8e25f KWSys: Fix configure_file call to use COPYONLY, not COPY_ONLY 2014-10-31 13:20:19 -04:00
Brad King 5868b4e2fb Merge branch 'upstream-kwsys' into update-kwsys 2014-10-31 13:11:58 -04:00
Brad King f2805bd01b Merge topic 'VERSION_no_sscanf'
ef09df64 cmSystemTools: reimplement verson comparison without sscanf()
667560c8 extend the testing for version comparison
2014-10-31 11:35:06 -04:00
Brad King 163868b311 Merge topic 'xcode-inherit-warning-flags'
820e95d0 Xcode: Inherit global settings in per-target WARNING_CFLAGS (#15224)
2014-10-31 11:34:58 -04:00
Rolf Eike Beer ef09df646a cmSystemTools: reimplement verson comparison without sscanf()
This now has the advantage that it works with version strings with any number
of components.
2014-10-31 11:31:31 -04:00
Brad King 820e95d000 Xcode: Inherit global settings in per-target WARNING_CFLAGS (#15224)
Allow projects to use CMAKE_CODE_ATTRIBUTE_WARNING_CFLAGS to add their
own warning flags and have them used by the targets.
2014-10-31 11:29:53 -04:00
Kitware Robot f274597abb CMake Nightly Date Stamp 2014-10-31 00:01:08 -04:00