The system tools GetParentDirectory method no longer removes the root
path component. This fixes cmSystemTools::FileExistsInParentDirectories
to not infinitely loop at when GetParentDirectory stops at the root.
When SystemTools::GetParentDirectory was fixed to never remove the root
path component from a full path we violated an assumption made by
IsSubDirectory that eventually GetParentDirectory returns an empty
string. This led to an infinite loop if the potential parent directory
is empty, so we explicitly avoid that case.
The previous change to this method broke cases where the input path does
not exist. The SystemTools::GetParentDirectory method is redundant with
the more robust SystemTools::GetFilenamePath. This replaces its
implementation to just call GetFilenamePath.
The cmSystemTools::RenameFile method returns type bool, but its
implementation on Windows returns the result of an API function that
returns BOOL. This change avoids the compiler warning.
This extends the "-E" command line mode with a "rename old new"
signature. The new command atomically renames a file or directory
within a single disk volume.
This moves the cmGeneratedFileStream::RenameFile method implementation
into cmSystemTools. It works only within a single filesystem volume,
but is atomic when the operating system permits.
All KWSys C symbol names begin with the KWSYS_NAMESPACE defined at
configuration time. For ease of editing we write canonical names with
the prefix 'kwsys' and use macros to map them to the configured prefix
at preprocessing time. In the case of standalone KWSys, the prefix is
'kwsys', so the macros were previously defined to their own names.
We now skip defining the macros in the identity case so that the final
symbol names are never themselves macros. This will allow the symbols
to be further transformed behind the scenes to help linkers in special
cases on some platforms.
Linking to a Windows shared library (.dll) requires only its import
library (.lib). This teaches CMake to recognize SHARED IMPORTED library
targets that set only IMPORTED_IMPLIB and not IMPORTED_LOCATION.
When an IMPORTED target provides no generic configuration and no match
for a desired configuration then we choose any available configuration.
This change corrects the choice when the first listed available
configuration does not really have a location.
Previously KWSys SystemInformation parsed this file assuming a strict
order and set of fields, but the order is not reliable. This
generalizes the implementation to support any order and extra fields.
The transitive link dependencies of a linked target must be followed in
its own scope, not in the scope of the original target that depends on
it. This is necessary since imported targets do not have global scope.
See issue #8843.
The previous wording of the VERBATIM option documentation in the
add_custom_command and add_custom_target commands was confusing. It
could be interpreted as the opposite of what the option means (no
escaping instead of escaping). This clarifies the documentation to
explicitly state that it escapes.
The value of CMAKE_CURRENT_LIST_FILE is supposed to be the list file
currently being executed. Before macros were introduced this was always
the context of the argument referencing the variable.
Our original implementation of macros replaced the context of command
arguments inside the macro with that of the arguments of the calling
context. This worked recursively, but only worked when macros had at
least one argument. Furthermore, it caused parsing errors of the
arguments to report the wrong location (calling context instead of line
with error).
The commit "Improve context for errors in macros" fixed the latter bug
by keeping the lexical context of command arguments in macros. It broke
evaluation of CMAKE_CURRENT_LIST_FILE because the calling context was no
longer preserved in the argument referencing the variable. However,
since our list file processing now maintains the proper value of
CMAKE_CURRENT_LIST_FILE with dynamic scope we no longer need the context
of the argument and can just evaluate the variable normally.
The add_definitions() command and COMPILE_DEFINITIONS dir/tgt/src
properties support preprocessor definitions with values. Previously
values were not supported in the VS6 generator even though the native
tool supports them. It is only values with spaces that VS6 does not
support. This enables support and instead complains only for values
with spaces. See issue #8779.
The CTest version control refactoring broke the value returned for the
ctest_update command's RETURN_VALUE argument. The value is supposed to
be the number of files updated, but the refactoring accidentally made it
the number of locally modified files after the update.
The RPATH target properties are initialized by CMAKE_<prop> variables at
target creation time. This notes the feature in the property
documentation. It is already noted in the variable documentation.
This creates a new mode of the foreach command which allows precise
iteration even over empty elements. This mode may be safely extended
with more keyword arguments in the future. The cost now is possibly
breaking scripts that iterate over a list of items beginning with 'IN',
but there is no other way to extend the syntax in a readable way.
This creates global property RULE_MESSAGES which can be set to disbale
per-rule progress and action reporting. On Windows, these reports may
cause a noticable delay due to the cost of starting extra processes.
This feature will allow scripted builds to avoid the cost since they do
not need detailed information anyway. This replaces the RULE_PROGRESS
property created earlier as it is more complete. See issue #8726.
This creates global property RULE_PROGRESS which can be set to disbale
per-rule progress reporting. On Windows, progress reports may cause a
noticable delay due to the cost of starting an extra process. This
feature will allow scripted builds to avoid the cost since they do not
need detailed progress anyway. See issue #8726.
Long ago the native build system generators needed HEADER_FILE_ONLY to
be set on header files to stop them from building. The modern
generators correctly handle headers without the help of this property.
This removes automatic setting of the property so that it can be used
reliably as an indicator of project author intention. It fixes VS IDE
project files to show header files normally instead of excluded (broken
by the fix for issue #7845).
This class is the old-style dependency scanner. It is needed only to
implement the output_required_files command. This change removes some
code not needed for that purpose, including a reference to the
HEADER_FILE_ONLY property.