When running CMake from the build tree the CMAKE_ROOT is the
entire source tree. Fix the CMP0017 check to be specific to
the Modules/ directory under CMAKE_ROOT so that Tests/ does
not count. Fix the FindPackageTest modules to include FPHSA
by full path from CMAKE_ROOT so that they do not include the
local FPHSA which reports an error meant to test that CMP0017
works.
The Intel Fortran .vfproj format accepts the $(Configuration) placeholder
in the path to an input file but appears to consider it always out of
date. Therefore adding OBJECT library objects as external object source
files causes the referencing binary to re-link on every build. Work
around this problem by putting OBJECT library objects on the link line
as is done for VS < 8 already.
Since commit v2.8.12~437^2~2 (VS: Separate compiler and linker PDB files
2013-04-05) we no longer set /Fd with the PDB_NAME or PDB_OUTPUT_DIRECTORY
properties. Those properties now exclusively handle linker PDB files.
Since STATIC libraries do not link their compiler PDB file becomes more
important. Add new target properties "COMPILE_PDB_NAME[_<CONFIG>]" and
"COMPILE_PDB_OUTPUT_DIRECTORY[_<CONFIG>]" to specify the compiler PDB
file location and pass the value to the MSVC /Fd option.
My last related commit e5e3f3d4 (CTest: filter /showIncludes output from
ninja compile launcher, 2013-12-01) filtered /showIncludes messages from
the generated xml output but they also need to be filtered in
ScrapeLog(). Otherwise they are being detected as warnings when using
compilers withs english diagnostics.
048be205 Help: Add release notes for the 'faster-parsers' topic
7c565d2f cmGeneratorExpression: Improve parsing in StripEmptyListElements
68eb1757 cmGeneratorExpressionLexer: Use a switch statement to parse
67253133 ExpandListArguments: Optimize the parser
f9d5b1fd Handle Mac OSX source flags for individual files lazily.
64d39841 cmGeneratorTarget: Classify sources on demand, not up front.
d3682d86 cmGeneratorTarget: Use a method to access the definition file.
5771f81d cmTarget: Add GetTransitiveTargetClosure method.
a6dd4990 cmTarget: Create a temporary cmTarget in checkInterfacePropertyCompatibility
b8b99cc1 cmTarget: Avoid computing languages when computing transitive targets.
01bca553 cmTarget: Move ComputeLinkInterface to the internal class.
d93e1af2 cmTarget: Extract a ComputeLinkInterfaceLibraries method.
3bcb197c cmTarget: Re-arrange the ComputeLinkInterface method.
326d07d2 cmTarget: Extract a ComputeLinkImplementationLanguages method.
21e91350 cmTarget: Change GetTransitivePropertyLinkLibraries to output targets.
f81eb49e cmTarget: Find source files on request.
84e5f5a0 cmTarget: Move SourceFileFlags to cmGeneratorTarget.
Add a cmTarget::CompileInfo struct to hold per-configuration information
about the compilation settings in a target. This is different than
cmTarget::OutputInfo because it applies to any targets that can compile
sources even if they do not link or archive.
Implement a Visitor to hold the sequence of source file tests
for populating outputs. Use VS 6 and 7 workaround from Brad
King for lack of partial template specialization and function
template specialization capabilities.
This will make it possible to use context dependent generator
expressions to determine the sources of a target.
Replace calls to GetLinkInformation with calls to a method to get only
the target closure, not the link languages etc. The replaced calls
are used while evaluating generator expressions only. This makes
transitive generator expression evaluation independent from
the languages of a target. In a follow-up topic, it will be possible
to make the languages depend on generator expression evaluation, via
evaluation of the SOURCES and INTERFACE_SOURCES target properties.
Because the order of entries is not the same as the final link line,
the order of debug output is different in the RunCMake.CompatibleInterface
test, because the BOOL_PROP7 target property is evaluated first. Adjust
the test to account for that new order.
For the OLD CMP0022 behavior, we need to treat the implementation
as the interface when computing the interface libraries. Make it
possible to do that without computing the link languages by adding
a new GetLinkImplementationLibraries method. Extend the existing
GetLinkImplementation method to populate the languages if the
libraries have already been computed and cached.
Change GetTransitivePropertyTargets to invoke GetLinkInterfaceLibraries
instead of GetLinkInterface. This is key, as it is a method called
by cmGeneratorExpressionEvaluator.
Change the cmGeneratorExpressionEvaluator to invoke
GetLinkImplementationLibraries instead of GetLinkImplementation.
When evaluating the SOURCES property, we will need to be able to access
the link libraries without accessing the link languages, as the languages
depend on the SOURCES.
Arrange the logic so that the part which deals with libraries only is
at the top. In a follow-up commit, this will be split into two methods.
Ensure that the explanatory CMP0022 comment is only present in one
location.
The callers already skip non-targets, so unify the target search.
Change supporting functions to accept a container of targets instead
of strings where possible.
In a follow-up, the list of sources will become dependent on
the config, so check for existence in cmTarget::GetSourceFiles
instead of up-front with cmGlobalGenerator::CheckTargets().
6e89c8a5 install: Support generator expressions in FILES and PROGRAMS mode
f11f7b34 cmInstallFilesGenerator: Add reference to calling cmMakefile
e190236c Help: Format install() command documentation
Teach the install(FILES) and install(PROGRAMS) commands to evaluate
generator expressions in the list of files.
Extend the ExportImport test to cover installation cases involving
generator expressions.
Add a Makefile member to the cmInstallFilesGenerator class and
populate it on construction. This will be useful in a following
change to evaluate generator expressions with proper context.
The char-by-char parsing causes lots of reallocations which shouldn't be
necessary. To improve this, fast-path strings without a semicolon,
reserve space in the result, and insert into the result in chunks.
Optimize cmGeneratorExpressionLexer::Tokenize to use a switch statement.
The many dereferences of the input pointer were expensive. Also remove
excess pointer arithmetic.
Historically CMake used three version components for the feature level.
We released new features while incrementing only the third version
component. Since commit v2.8.2~105^2~4 (New version scheme to support
branchy workflow, 2010-04-23) we used the fourth version component for
bug-fix releases and the development date:
<major>.<minor>.<patch>[.<tweak>][-rc<n>] = Release
<major>.<minor>.<patch>.<date>[-<id>] = Development
This solidified use of three components for the feature level, and was
necessary to continue releasing 2.x versions because:
* Some existing projects performed floating-point comparisons of
${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} to 2.x numbers
so ``x`` could never be higher than 9.
* Version 2.9.<date> was used briefly in post-2.8.0 development in
CVS prior to the transition to Git, so using it in releases may
have caused confusion.
Now that we are moving to 3.x versions, these two restrictions go away.
Therefore we now change to use only two components for the feature
level and use the scheme:
<major>.<minor>.<patch>[-rc<n>] = Release
<major>.<minor>.<date>[-<id>] = Development
The cmGeneratorExpression is used here, but the header for it is not
in the include heirarchy. This would be a compile error if the file
were compiled as a standalone translation unit, but it is instead
used in a mini-unity-build by inclusion in cmCommands.cxx. The header
for cmGeneratorExpression happens to be included first, so the
compilation works fine.
IDEs do not know this however, and flag the use as an error.
Several CMake operations need to replace files in rapid succession.
This commonly fails on Windows due to filesystem lock behavior so
we have retry loops. No matter how many times we retry or how long
we delay there will inevitably be someone with an environment that
needs more. Make the retry count and delay configurable in the
Windows Registry keys:
{HKCU,HKLM}/Software/Kitware/CMake/Config
in DWORD values
FilesystemRetryCount = Number of tries
FilesystemRetryDelay = Delay in milliseconds between tries
Leave the feature undocumented for now to see how it goes.
9bcc1b21 Export: Fix internal CMake version test logic
d2059d25 cmVersion: Fix CMake_VERSION_ENCODE for date in patch level
28805109 cmStandardIncludes: Include cmIML/INT.h for portable integer types
Fix the internal DEVEL_CMAKE_VERSION macro to use CMake_VERSION_ENCODE
to compare version component-wise. Otherwise an old invocation of the
macro may be tricked into using the current version when the requested
major version is smaller than the current version but the requested
minor version is larger. It should use the requested (old) version in
that case.
Use a uint64_t to store encoded version numbers so we have plenty of
bits available. Encode with room for up to 1000 minor releases between
major releases and to encode dates until the year 10000 in the patch
level. This is necessary because CMake development versions prior to
release 2.8.0 used the date in the patch level, and this practice may be
restored after the 3.0 release.
In CMakeGraphVizOptions.cmake, allow the options GRAPHVIZ_GENERATE_PER_TARGET
and GRAPHVIZ_GENERATE_DEPENDERS to enable the generation of per target graphs
and subgraphs respectively. Both options are TRUE per default to maintain
current behavior.
This is a hot-fix for the bug. It seems like a good idea to generally
reform the generator to care about targets instead of directories,
but this patch at least makes the reported error go away.
Define the list of commands in the CMakeLists.txt file. List the
sources in the CMakeLib target, but mark them as HEADER_FILE_ONLY.
This has the effect that IDEs will show the files, though they
will not be built again.
Add a cmCommandsForBootstrap.cxx file for bootstrapping purposes.
Rename the cmExportLibraryDependencies file to match the common
pattern.
The qtx_add_resources() macro adds the resource file to the output list
to maintain file-level dependencies. Having the qrc file in a target
sources is a precondition for AUTORCC to function.
When processing the source files of a target, only add the generated
qrc_<file>.cpp to the target sources if AUTORCC is ON. This avoids
pre-porting conflict with the macro.
Reported-by: Micha Hergarden
Since commit v2.8.2~105^2~2 (Teach CMake Policies about tweak version
component, 2010-04-23), cmPolicies has known how to handle a policy
introduced in a tweak version. This was done back when we introduced
policies with the current development date version and later updated it
to the release version. Now we always introduce policies using the next
expected release version and explicitly set the policy to test the NEW
behavior.
CMake Policies (or any other features) should never be introduced in a
tweak (bugfix) release, so drop the infrastructure that allows this.
Set a global property in the find_package implementation. Track and
reset that property in the find_dependency macro. Read the property
in FeatureSummary when determining whether to print output.
This means that packages which are found only as dependencies are not
listed by FeatureSummary, but if a project uses find_package elsewhere
directly, then it will be listed by FeatureSummary.
Suggested-by: Alex Merry
http://thread.gmane.org/gmane.comp.kde.devel.frameworks/10640
41d2f2c4 write_basic_package_version_file: use PROJECT_VERSION
7e142c5a project: Manage VERSION variables
16d040c9 project: Add optional LANGUAGES keyword
00007dcc Help: Format project command and variable documentation
When using link_directories() and including CMAKE_CFG_INTDIR,
one can end up with duplicate RPATHs in the binary which
install_name_tool cannot fix without corrupting the binary.
Also, the cmake_install.cmake file has been fixed to correctly
handle these generator specific variables.
It accepts a before parameter but is never called with before=true.
compile definitions are sorted by std::set, so it wouldn't make sense
to allow user sorting.
f7ae1d8a QtAutogen: Short-circut some logic when moc is not available.
4b989d5f QtAutogen: Separate source file processing from AUTOMOC.
c48d877d QtAutogen: Make some methods appropriately file-static.
394e86df QtAutogen: Fix autouic target options in the presence of a config.
964d7f2a QtAutogen: Remove unused variables.
0d934efd QtAutogen: Remove read of SKIP_AUTOUIC target property.
321e348e QtAutogen: Use Qt 4 IMPORTED targets to find executable locations.
e96683b0 Qt4: Use IMPORTED executable names with custom commands.
e6182f5d Qt4: Create IMPORTED executable targets for all Qt executables.
Teach the project() command to set variables
{PROJECT,<PROJECT-NAME>}_VERSION{,_MAJOR,_MINOR,_PATCH,_TWEAK}
holding the project version number and its components. Add project()
command option "VERSION" to specify the version explicitly, and default
to the empty string when it is not given.
Since this clears variables when no VERSION is given, this may change
behavior for existing projects that set the version variables themselves
prior to calling project(). Add policy CMP0048 for compatibility.
Suggested-by: Alex Neundorf <neundorf@kde.org>
Teach the project() command to recognize an optional "LANGUAGES"
keyword after the project name and prior to the list of languages.
Do not allow multiple copies of the keyword. If the keyword is
specified and no languages are listed, imply NONE.
Avoid using the moc from Qt 5 with Qt 4 based targets. Moc generates
a version check to ensure that such generated code does not compile.
The Qt4And5Automoc unit test should have been testing this, but it
was not because the test was broken. In that unit test, moc was run
on trivial files which have no significant content, and in particular
no Q_OBJECT macro. Therefore moc was generating empty files which
do not even contain the version check. Fix this by generating files
for input to moc at cmake time.
bde0dab1 cmMakefile: Make ConfigureString const.
bf1e1bf1 cmMakefile: Make FindSourceGroup const.
01d7ceda cmMakefile: Trivially constify some methods.
9073318f cmMakefile: Remove non-const version of method
9b05bc4f cmMakefile: Remove method declarations with no implementation.
c6c0bd9d cmMakefile: Consify custom command API.
d6d4eaac cmMakefile: Constify policies accessors.
2a6e56e0 cmCacheManager: Consify version accessors.
5cc9fb02 cmSourceGroup: Fix method name capitalization.
fe8b0330 cmMakefile: Constify some cmSourceGroup related code.
e68a3ead cmSourceFile: Use a const cmMakefile.
b6292402 cmSourceFileLocation: Use a const cmMakefile.
b33ea578 cmMakefile: Make GetProperty const.
a432b93b file DOWNLOAD: Display the curl result status when a hash mismatch occurs.
1cb9ef81 file DOWNLOAD: Test non-zero return status.
f73f0fb3 file DOWNLOAD: Add test for bad hash.
b5e2265f ExternalProject: Reattempt download when verification fails.
Introduce policy CMP0047 to control resetting the id for
compatibility.
De-duplicate content in the QNX platform file by including the GNU
one. QNX is a form of GNU platform.
Do not clear CMAKE_SHARED_LIBRARY_${lang}_FLAGS variables. They
are populated again later by the Compiler/GNU.cmake file anyway.
Modify the CMAKE_CXX_COMPILE_OBJECT variable only when the QCC
compiler id is in use, and the language is CXX. Use the QNX
recommended flag for QCC instead of the gcc compatible -x flag.
Populate new module files to handle system includes and depfiles
when using the QCC compiler.
Remove code which unsets the system include and depfiles related
variables. When a GNU driver is used instead of the QCC one, the
appropriate flags will be used. These variables were previously
cleared for lowest-common-denominator compatibility with both
drivers.
Mark unknown revisions as such and fail instead of reporting revision 0.
Otherwise CTest reports massive file updates between revisions when the
server timeouts while trying to fetch the current revision number.
Define a new 'CMAKE_CONFIGURE_DEPENDS' directory property that projects
can use to specify input files to the CMake configuration process.
Extend the RunCMake.Configure test to verify that the build system
re-runs CMake when this input changes.
The logic added by commit ffc0b5e4 (Overwrite the symlink if it already
exists, 2007-02-15) does not recognize and remove existing broken links
before replacing them. Improve the logic to remove any existing
destination file or link (but not directory). On failure, report an
error message explaining why the existing path could not be removed or
the new one could not be created.
Add a RunCMake.CommandLine test to cover 'cmake -E' cases. Start with
test cases covering 'cmake -E create_symlink' behavior on UNIX platforms.
...otherwise the generator failed in embedded projects via
externalproject(), since there CMAKE_KATE_MAKE_ARGUMENT is not set.
Using GetSafeDefinition() is good enough to protect against
NULL-pointers.
Alex
Images and xib files must have 'lastKnownFileType' attribute to be
displayed correctly. If xib file has attribute 'explicitFileType' it is
displayed as raw xml. If static image has attribute 'explicitFileType'
it is displayed as question mark on storyboard.
Most callers already have a std::string, on which they called c_str() to pass it
into these methods, which internally converted it back to std::string. Pass a
std::string directly to these methods now, avoiding all these conversions.
Those methods that only pass in a const char* will get the conversion to
std::string now only once.
Store variable types together with their names in the variable completion
list so that the type is automatically recovered when you select a variable.
Keep variable names and types in separate lists. This removes the :TYPE
string from completion list and the Name field and makes variable search
easier. The variable names and types are now kept in two different
settings - AddVariableNames and AddVariableTypes. Drop the old
AddVariableCompletionEntries setting.
Revert commit 4a6397a7 (Ninja: Track configured files so we can
regenerate them, 2013-06-17). The files reported by the method
cmMakefile::GetOutputFiles() must cause CMake to re-run only if they are
missing and without considering a timestamp. This is not the meaning of
the implicit dependencies field so Ninja re-runs CMake too often.
Another solution will have to be found to the original problem.
Revert commit 6fac24d7 (Ninja: Avoid re-running CMake on next build
after regeneration, 2014-01-09). The files reported by the method
cmMakefile::GetOutputFiles() must cause CMake to re-run only if they are
missing and without considering a timestamp. Therefore they cannot be
listed as outputs of the re-run rule or Ninja will re-run CMake every
time because the timestamp of configure_file outputs does not change.
Another solution will have to be found to the original problem.
2cbf0311 cmGlobalGenerator: Make SelectMakeProgram const.
b4ff38a5 cmGlobalGenerator: Make CheckALLOW_DUPLICATE_CUSTOM_TARGETS const
8aeddf1f cmGlobalGenerator: Make some API const.
8fd0f2a7 cmGeneratorTarget: Hold a const global generator.
46315320 cmComputeLinkDepends: Hold a const global generator.
In commit 4a6397a7 (Ninja: Track configured files so we can regenerate
them, 2013-06-17) we accidentally started listing files generated by
CMake as inputs to the configuration process instead of outputs from it.
Move the list of files generated by CMake to the regeneration rule
outputs section and tell Ninja to restat after running it.
Create cmGeneratorTargets before generating generate-time information.
C++ interfaces for querying build information is increasingly only
available at generate time through the cmGeneratorTarget class. Ensure
that the required cmGeneratorTarget instances are created. Use the
cmGlobalGenerator access API to access the relevant cmGeneratorTarget
instead of creating a temporary one on the stack.
73e9340 get_target_property: Error on non-existent target.
ab9f58f FindQt4: Ensure target exists before calling get_target_property.
37ebeb9 FindQt4: Fix use of get_target_property to use actual target name.
6aabb6a Genex: Use case-sensitive comparison for COMPILER_ID.
5bb53f6 cmTarget: Deprecate COMPILE_DEFINITIONS_ properties with a policy.
The implementation of the "cmake --help-custom-modules" was removed
along with the rest of the old help generation infrastructure when
documentation was converted to reStructuredText. In order to avoid
breaking existing project builds outright when they use a custom command
that runs a command like "cmake --help-custom-modules foo.1", generate
the requested file with placeholder content explaining that the option
is not supported anymore.
In VS <= 9 we already convert include paths to use backslashes
but the conversion was left out of the VS >= 10 generator.
Add the conversion now for consistency. VS 11 and 12 now require
it because they mistakenly interpret forward-slash options that
happen to occur in paths:
http://connect.microsoft.com/VisualStudio/feedback/details/778367
Since commit 56831461 (Xcode: Use explicitFileType to mark source types,
2013-04-16) the Xcode generator prefers to use explicitFileType to tell
Xcode about each source file type. This works better than
lastKnownFileType for some file types, but not for "file.storyboard".
If storyboard file has attribute 'explicitFileType' it is displayed
incorrectly (as raw xml). Switch it back to 'lastKnownFileType'.
3917d86 Genex: Add a nullary form for CONFIG
5169130 Help: Document the target properties exported to IMPORTED targets.
ee21f1c CompatibleInterface: Test debugging of not-set property.
80e9fe9 Help: Note that language-specific 'built-ins' are set by the project command.
0b5bf8a Help: Mention CMAKE_DISABLE_FIND_PACKAGE_<PackageName> in package docs.
28c865b Tests: simplify Qt4 target usage
6cfe6b8 Help: Fix typo: 'target' -> 'target property'
b7deca4 Test: Remove obsolete commented code.
9c9f69f Genex: Make EQUAL support upper case binary literals
6eb3218 Genex: Fix case of methods in the dag checker.
646c6ec Genex: Use a preprocessor loop to implement transitive DAG check.
711fb38 Genex: List transitive properties and methods as a table, not two lists.
802a28f Add cmHasLiteralSuffix API.