Commit Graph

17014 Commits

Author SHA1 Message Date
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 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
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
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
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
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
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 bea609ac2a Merge branch 'vs-check-phone-store-tools' into release 2014-11-17 15:39:17 -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
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