Commit Graph

21171 Commits

Author SHA1 Message Date
Stephen Kelly 0b39fefeac GenexEval: Extract a getLinkedTargetsContent from TargetPropertyNode.
This will be used to process transitive components of properties
which depend on linked targets. Currently only the link interface
of the target can be used as the source of the linked targets, but
in the next commit it will be possible to use the link implementation
as the source of link targets.

This commit does not change the semantics of the code.
2013-05-30 15:43:42 +02:00
Stephen Kelly 53164ac997 cmTarget: Remove some hardcoding of transitive property names. 2013-05-30 15:43:37 +02:00
Brad King 585cfa51de Merge topic 'fix-FileIsDirectory-SEGV'
7378792 if: Add test for IS_DIRECTORY
4ab10e0 Merge branch 'master' into fix-FileIsDirectory-SEGV
045d6ae KWSys: Fix SystemTools::FileIsDirectory with long paths (#14176)
2013-05-30 08:57:42 -04:00
Brad King d721a9cf6a Merge topic 'update-kwsys'
2c0c59a Merge branch 'upstream-kwsys' into update-kwsys
9270129 KWSys 2013-05-29 (725e541e)
2013-05-30 08:57:23 -04:00
Stephen Kelly e5375442ff try_compile: Trim whitespace from LINK_LIBRARIES entries
Commit e65ef08b (try_compile: Fix quoting of libraries in generated
CMakeLists.txt, 2013-05-24) added quoting to entries specified in
the LINK_LIBRARIES. However, if the input entries contain whitespace
padding, that quoted whitespace causes an error in the generated
CMakeLists.txt at target_link_libraries.

Strictly, it is an error to have space separated entries in the
CMAKE_REQUIRED_LIBRARIES, as it was never properly handled by
CMakeExpandImportedTargets even prior to commit 236133e7 (Handle
targets in the LINK_LIBRARIES of try_compile., 2013-02-09). However,
it is causing a regression in KDE code which tests the next branch.
2013-05-30 13:50:37 +02:00
Kitware Robot fafa66c7f0 CMake Nightly Date Stamp 2013-05-30 00:01:03 -04:00
Clinton Stimpson cbe3f2072b Xcode: Add support for shared library versioning
Add a post-build command to shared library targets to create the
versioning symbolic links.
2013-05-29 09:05:00 -04:00
Brad King 2c0c59a2e1 Merge branch 'upstream-kwsys' into update-kwsys 2013-05-29 08:56:20 -04:00
KWSys Robot 927012979e KWSys 2013-05-29 (725e541e)
Extract upstream KWSys using the following shell commands.

$ git archive --prefix=upstream-kwsys/ 725e541e | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' f4928d44..725e541e
Brad King (1):
      9fd64779 SystemTools: Fix FileIsDirectory with long paths

Rolf Eike Beer (3):
      e8269442 Tests: fix a warning with acc
      87abd647 SystemInformation: fix truncation warnings
      039d9598 fix warnings about sizeof() return value truncation

Change-Id: I1c459346a622610eac62dfcd3abd0e73c5a83494
2013-05-29 08:56:13 -04:00
Stephen Kelly e162326128 Fix indentation. 2013-05-29 08:40:00 +02:00
Kitware Robot 6927b25aff CMake Nightly Date Stamp 2013-05-29 00:01:03 -04:00
Brad King 7378792b49 if: Add test for IS_DIRECTORY
Add a RunCMake.if test to cover if() command behavior.  Start with a
test for IS_DIRECTORY cases with an existing directory and a long path,
both with a trailing slash.
2013-05-28 11:35:32 -04:00
Brad King 4ab10e063d Merge branch 'master' into fix-FileIsDirectory-SEGV
Resolve conflict in Source/kwsys/SystemTools.cxx by combining the two
changes.
2013-05-28 11:34:50 -04:00
Brad King 045d6ae0b0 KWSys: Fix SystemTools::FileIsDirectory with long paths (#14176)
Allocate a buffer large enough to hold the input path when removing a
trailing slash.  Use a local stack buffer when it is large enough and
fall back to heap allocation otherwise.
2013-05-28 11:27:05 -04:00
Brad King 590a41ba0e Merge topic 'fix-try_compile-library-spaces'
e65ef08 try_compile: Fix quoting of libraries in generated CMakeLists.txt
2013-05-28 10:42:40 -04:00
Brad King 07942da96c Merge topic 'ExternalData-no-re-stage'
c35961b ExternalData: Do not re-stage staged object files
2013-05-28 10:42:33 -04:00
Brad King 93e9291da7 Merge topic 'fix-protobuf-threads'
8961c4b FindProtobuf: also find pthread
2013-05-28 10:42:29 -04:00
Brad King 7cde91cc8c Merge topic 'silence-vs6-warnings'
015309f Tests/CompileDefinitions: Avoid spaces in defines on VS 6
2013-05-28 10:42:23 -04:00
Brad King be85fa4a89 Merge topic 'genex-generate-file'
b983a58 file: Add GENERATE command to produce files at generate time
2013-05-28 10:42:18 -04:00
Brad King 9c1393217c Merge topic 'use-java-use-parse-arguments'
81b5fb5 UseJava.cmake: fully use cmake_parse_arguments in add_jar
2013-05-28 10:42:12 -04:00
Funda Wang 3de9bb48a5 FindImageMagick: Find v6 include dir (#14174)
The header files of ImageMagick are now located at
<prefix>/include/ImageMagick-6 instead of <prefix>/include/ImageMagick.
2013-05-28 09:43:29 -04:00
Bjoern Thiel a2099a8e8d SelectLibraryConfigurations: Fix for cached <base>_LIBRARY
The line

  set( ${basename}_LIBRARY )

removes the normal variable, but if the corresponding cached variable is
present then line

  list( APPEND ${basename}_LIBRARY optimized "${_libname}" )

uses that and fails.  Replace the original line with

  set( ${basename}_LIBRARY "" )

to set the normal variable to empty instead of unsetting it.
2013-05-28 09:26:34 -04:00
Kitware Robot 97c2166de4 CMake Nightly Date Stamp 2013-05-28 00:01:05 -04:00
Stephen Kelly fa55751f83 QtAutomoc: Get the Qt version through the target link interface
In Qt 5.1, Qt5::Core has a INTERFACE_QT_MAJOR_VERSION property
of '5', and since CMake 2.8.11, Qt4::QtCore has an
INTERFACE_QT_MAJOR_VERSION of '4'. This was introduced in
commit 4aa10cd6 (FindQt4: Set the INTERFACE_QT_MAJOR_VERSION for
Qt4::QtCore, 2013-03-16), to produce an error if Qt 4 and Qt 5
are erroneously used by the same target. This can also be used
however to determine the Qt major version, and therefore the
particular moc executable to use during automoc steps. This means
that targets in a single buildsystem can use a selection of Qt 4
and Qt 5, and still take advantage of the CMAKE_AUTOMOC feature
without conflicting.
2013-05-28 01:19:37 +02:00
Stephen Kelly f776316721 Use the qt5::moc imported target instead of a variable.
The variable is provided in the Qt5 config files only for compatibility
with this automoc feature, so use the more-future-proof method instead.
2013-05-27 20:56:07 +02:00
Kitware Robot ab7cd03cea CMake Nightly Date Stamp 2013-05-27 00:01:02 -04:00
Kitware Robot fe1584f276 CMake Nightly Date Stamp 2013-05-26 00:01:05 -04:00
Kitware Robot a3a82b5ed7 CMake Nightly Date Stamp 2013-05-25 00:01:08 -04:00
Brad King a6c8dcee64 Merge topic 'fix-include_directories-whitespace-handling'
b8cc6f4 include_directories: Fix handling of empty or space-only entries
2013-05-24 16:43:25 -04:00
Stephen Kelly b8cc6f4eba include_directories: Fix handling of empty or space-only entries
Since commit 0d46e9a0 (Store includes from the same include_directories
call together., 2013-01-20) we accidentally use such entries.  Fix the
code to drop them instead.  Update the IncludeDirectories test to cover
this case.

Reported-by: Christophe Giboudeaux <cgiboudeaux@gmx.com>
2013-05-24 16:40:58 -04:00
Brad King e65ef08bf2 try_compile: Fix quoting of libraries in generated CMakeLists.txt
Since commit 236133e7 (Handle targets in the LINK_LIBRARIES of
try_compile, 2013-02-09) libraries passed to the new LINK_LIBRARIES
option of try_compile are not quoted inside the generated CMakeLists.txt
file.  Quote the library names so they re-parse correctly when loaded by
CMake to configure and generate the test project.

Reported-by: Bogdan Cristea <cristeab@gmail.com>
2013-05-24 16:30:26 -04:00
Brad King c35961b010 ExternalData: Do not re-stage staged object files
The ExternalData_LINK_CONTENT option tells ExternalData to convert real
data files it finds into content links and to "stage" the original
content in a ".ExternalData_<algo>_<hash>" file.  However, after a data
object has been staged it is possible that a user-provided pattern in
the "REGEX:" option will later match the staged object file.  We must
not process staged object files even when a user pattern matches them.

Fix the implementation to not match a staged object file as a normal
data file for conversion.  Extend the RunCMake.ExternalData test to
cover this case.
2013-05-24 15:45:38 -04:00
Matthew Woehlke 8961c4b68b FindProtobuf: also find pthread
Modify FindProtobuf.cmake to find the pthread library on UNIX platforms,
and to add the same to PROTOBUF_LIBRARIES, as this is a link dependency
of libraries using the protobuf headers.
2013-05-24 15:44:10 -04:00
Stephen Kelly 015309fc9f Tests/CompileDefinitions: Avoid spaces in defines on VS 6
The VS 6 IDE does not like spaces in definition values so CMake drops
them and warns.  The Tests/CompileDefinitions test C code that looks for
the dropped definitions already knows to skip them, but CMake still
warns.  Silence the warnings by avoiding such values in the first place
on VS 6.
2013-05-24 09:35:43 -04:00
Brad King 6aba976427 Merge topic 'geh-cleanup-identifiers'
7e24997 GenerateExportHeader: Generate only C identifiers as defines
2013-05-24 09:20:20 -04:00
Brad King a2e80aaa82 Merge topic 'geh-MODULE-export'
7ffef50 GenerateExportHeader: Allow use of of this macro with MODULEs.
2013-05-24 09:19:58 -04:00
Brad King dc85291c57 Merge topic 'geh-add-missing-test'
74f24b2 Tests/Module/GenerateExportHeader: Test exported free-function
2013-05-24 09:19:43 -04:00
Brad King 239604685d Merge topic 'geh-output-tweak'
bb412d0 GenerateExportHeader: Add newlines to separate the compiler output.
2013-05-24 09:19:28 -04:00
Brad King 14d90d81de Merge topic 'language-generator-expressions'
3241014 Add $<LINK_LANGUAGE> generator expression
2013-05-24 09:19:15 -04:00
Brad King 4ae24a105e Merge topic 'fix-include_directories-whitespace-handling'
a97240b Tests/IncludeDirectories: Avoid shared library with no symbols
2013-05-24 09:19:08 -04:00
Brad King 795e369e6b Merge topic 'Memchecker-Mac-fix'
0aed09f Tests: ignore GuardMalloc messages on all Apple build, not just XCode ones
2013-05-24 09:18:56 -04:00
Stephen Kelly 7e24997fed GenerateExportHeader: Generate only C identifiers as defines
The variables in this module are used to configure a header file
with defines whose name depends on the name of the target.

As valid names of targets may be invalid for use as defines, convert
the names of the defines used to C identifiers first. This is already
done in C++ code for the DEFINE_SYMBOL property.

This is not as simple as ensuring that the BASE_NAME is a C identifier,
because most of the define names are configurable, and because use of
a BASE_NAME which is not a C identifier, such as 4square can become a
C identifier by specifying a prefix in the generate_export_header
macro.
2013-05-24 09:09:43 -04:00
Stephen Kelly 32410140a7 Add $<LINK_LANGUAGE> generator expression
They can't be used when evaluating link libraries, but they can be
used for include directories and compile definitions. Later they can
be used for compile options.
2013-05-24 09:06:53 -04:00
Stephen Kelly 74f24b2842 Tests/Module/GenerateExportHeader: Test exported free-function 2013-05-24 09:04:35 -04:00
Stephen Kelly b983a58bdf file: Add GENERATE command to produce files at generate time
The idea is to write to a temp file which contains generator
expressions, and at generate time, evaluate the generator expressions,
and write the result to a file.

Because executables on Windows are limited in the length of command line
it is possible to use, it is common to write command line arguments to a
file instead and specify the file as a source of arguments.

This new FILE(GENERATE) subcommand allows the use of generator
expressions to create such files so that they can be used with
add_custom_command for example.
2013-05-24 09:02:45 -04:00
Kitware Robot 3cc5d3883e CMake Nightly Date Stamp 2013-05-24 00:01:04 -04:00
Stephen Kelly 7ffef5024a GenerateExportHeader: Allow use of of this macro with MODULEs.
The significant issue with MODULEs is that on Windows, the exported
symbols must be dllexported and they are not imported.

In other export macro implementations this is done by defining an
export macro outside of any ifdef which depends on definitions set
on the command line. However, with cmake we already expect the
DEFINE_SYMBOL to be defined, so the regular EXPORT macro can be
used by such plugins.
2013-05-23 19:24:34 +02:00
Brad King 711073e8c6 Merge topic 'xcode-attributes-variant'
332350b Xcode: Support XCODE_ATTRIBUTE_ with [variant=<config>] (#12532)
2013-05-23 10:52:31 -04:00
Brad King 79e40f830f Merge topic 'xcode-shared-linker-flags-per-config'
bcda47d Xcode: Honor CMAKE_(MODULE|SHARED)_LINKER_FLAGS_<CONFIG> (#14161)
2013-05-23 10:52:17 -04:00
Clinton Stimpson 373faae5e1 Refactor how bundles and frameworks are supported.
Make handling of directory separators consistent between
non-bundle and bundle code.

Remove xcode specific flag from cmTarget when getting install_name.

Add (more) consistent convenience functions in cmTarget to get
directories inside of bundles and frameworks to add files to.

This refactor also fixes bug #12263 where frameworks
had the wrong install name when SKIP_BUILD_RPATH.

Also make install_name for frameworks consistent between Makefile
and Xcode generator.
2013-05-23 10:42:49 -04:00