Commit Graph

17028 Commits

Author SHA1 Message Date
Brad King bd6389f7bc CMake 3.1.3 2015-02-11 10:23:38 -05:00
Brad King 8ad8a81d5c Merge branch 'makefile-missing-comment' into release-3.1 2015-02-10 09:27:52 -05:00
Nils Gladitz eeb2831b5f Makefile: Fix regression in target-bound custom command COMMENT output
Fix a logic typo introduced by commit v3.1.0-rc1~781^2 (Generalize
cmCustomCommandGenerator to more fields, 2014-03-10).
2015-02-10 09:22:05 -05:00
Brad King cd408d93fd Add setlocale() calls around use of libarchive APIs (#14934, #15377)
The libarchive APIs use nl_langinfo(CODESET) for iconv so they need the
locale to be set for LC_CTYPE.  However, the rest of CMake does not
define any behavior for non-ASCII character classification/conversion so
we do not want to setlocale() globally.  Add a RAII class to save, set,
and restore the locale around calls to libarchive APIs.

Inspired-by: Clinton Stimpson <clinton@elemtech.com>
2015-02-06 13:32:57 -05:00
Brad King 87be2e1427 Do not call setlocale() globally in CMake applications (#15377)
Revert the changes made by commit v3.1.0-rc1~406^2~1 (Encoding: Add
setlocale() to applications, 2014-05-30) and commit v3.1.0-rc1~406^2
(Encoding: Change to only set LC_CTYPE, 2014-06-11), and other setlocale
calls added later in their spirit.  CMake has not been taught how to
deal with non-C locales everywhere.  We do not define any functionality
for character conversions for non-ASCII strings.  Another solution will
be needed to address the original problem motivating addition of
setlocale() calls.
2015-02-06 13:32:26 -05:00
Brad King 44100adc6c CMake 3.1.2 2015-02-04 13:58:33 -05:00
Brad King fdb0799d75 Merge branch 'fix-default-install-config' into release-3.1 2015-02-03 13:23:57 -05:00
Ben Boeckel dea42d9296 install: Fix regression in default configuration selection
The refactoring in commit v3.1.0-rc1~812^2~16 (stringapi: Pass
configuration names as strings, 2014-02-09) broke the code path in
cmLocalGenerator::GenerateInstallRules that intends to pick a default
install configuration for multi-config generators.  Fix the logic to
select an empty default configuration only when using a single-config
generator whose CMAKE_BUILD_TYPE is not set.

Inspired-by: Roman Wüger <roman.wueger@gmx.at>
Reported-by: NoRulez <norulez@me.com>
2015-02-03 13:05:47 -05:00
Brad King 37662ea4bf Merge branch 'backport-fix-cpack-symlink-create-dir' into release-3.1 2015-01-30 10:24:21 -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
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
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
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
Brad King 57622bd19d CMake 3.1.1 2015-01-20 11:04:44 -05:00
Brad King 5806f6c5e6 Merge branch 'xcode-target-sort' into release 2015-01-19 13:57:29 -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
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
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 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
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
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
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
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 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
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
Brad King 8afa15fab1 Merge branch 'ninja-fix-subdir-objlib-languages' into release 2014-12-24 06:41:39 -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
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 c118816d44 CMake 3.1.0 2014-12-15 11:08:08 -05:00
Brad King 1f6f114a7a CMake 3.1.0-rc3 2014-12-08 09:09:24 -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