Some vendor tools convert PDB file names given on the command line to
lower-case before creating the file. When CMake places a mixed-case PDB
file name into the build system, the file does not exist the first time
and it is written with mixed case. After the first build though the
native tool has created a lower-case version of the file. If CMake does
CollapseFullPath again, the file exists so the actual-case lookup gets
the lower-case name. This causes the build files to change so the
project rebuilds.
The solution is to avoid calling CollapseFullPath for files generated by
the build. In the case of PDB files we already construct them from
paths that have been collapsed, so we can just skip the call altogether.
See issue #9350.
In cmMakefile::AddSubDirectory we were checking for addition of the same
source directory multiple times. However, the check code was incorrect
because it compared pointers instetad of pointed-to strings. Since the
check was written, a better check was added right after it to enforce
unique binary directories (in which case duplicate sources are fine).
This commit simply removes the old-style check code.
Before this change all targets were displayed in the top level directory of
the project. Now the targets are displayed in the correct directory.
The targets "clean" and "all" are now created in every subdirectory.
Also now the targets for just compiling one file, preprocessing one file,
assembling one file are are created for Eclipse.
Additionally all targets get a prefix now in eclipse, so that they are
sorted in a way which makes sense (global targets first, then executable and
libraries, then object files, then preprocessed, then assembly). Also
this prefix gives the user a hint what the target is, i.e. whether it's a
library or an executable or something else.
Alex
This commit teaches configure_file how to handle directories for input
and output. It is an error if the input is a directory. If the output
is a directory we put the configured copy of the input file in it with
the same name. See issue #9537.
The configure_file() command now converts relative output paths to full
paths using the current binary directory. Input relative paths were
already converted using the current source directory, but this behavior
was not previously documented.
Now gcc is queried also for the builtin definitions, and they are then added
to the .cproject file. This should make the preprocessor highlighting in
eclipse work better (#9272)
Patch mostly from Miguel.
Alex
The Intel Visual Fortran compiler plugin for MS Visual Studio may be one
of several versions of the Intel compiler. This commit teaches CMake to
detect the plugin version and set the version number in .vfproj files.
See issue #9169.
This method returns the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\<version>
A protected GetIDEVersion method retrieves the version-specific part of
the key name.
The commit "Improve dynamic variable scope implementation" optimized
function scopes using an efficient parent scope pointer. However, the
parent scope used to initialize a new directory might not exist later
(like add_subdirectory called inside a function of the parent scope).
This caused CMake to crash when following the dangling pointer to the
original parent scope.
We fix the problem in this commit by always computing the closure of the
parent scope at directory initialization time so that no parent scope
pointer is needed. See issue #9538.
The cmProcess::Buffer class derives from std::vector. We were using
local variable 'data' in the GetLine method but this name shadowed a
member of vector with GNU. This renames it to 'text'.
When we clear the buffer for an output pipe after returning the last
partial line (without a newline) we need to set the partial line range
to empty. Otherwise the buffer object is left in an inconsistent state.
This commit fixes cmCTestRunTest and cmProcess to more efficiently
handle child output. We now use the buffer for each child output pipe
to hold at most a partial line plus one new block of data at a time.
All complete lines are scanned in-place, and then only the partial line
at the end of the buffer is moved back to the beginning before appending
new data.
We also simplify the cmProcess interface by making GetNextOutputLine the
only method that needs to be called while the process is running. This
simplifies cmCTestRunTest so that CheckOutput can be called until it
returns false when the process is done.
The commit "Remove barely-used cmMakefile::AddCacheDefinition" removed
all but one use of the cmCacheManager method 'bool' overload. This
commit removes the other use and the entire method, thus reducing code
duplication.
The commit "Remove barely-used cmMakefile::AddCacheDefinition" broke
option() calls that pass a non-boolean default value. We restore the
old behavior by always coercing the value to 'ON' or 'OFF'.
The GNU compiler warns about possible operator precedence mistakes and
asks for explicit parentheses (-Wparentheses). We add the parentheses
to silence the warning. This also fixes one real logic error in the
find_package() implementation by correcting expression evaluation order.
The set(CACHE) and option() commands should always expose the cache
value. Previously we failed to expose the value when it was already set
if a local variable definition hid it. When set to NEW, this policy
tells the commands to always remove the local variable definition to
expose the cache value. See issue #9008.
The boolean overload of this method was used only to implement option().
We re-implement option() in terms of the main method and removes the
now-unused signature. This removes some duplicate code that had already
fallen behind on changes (it was not removing the local definition
instead of setting it).
Basically the code is now a copy of the one from the CodeBlocks generator,
maybe this could move into a common helper function somewhere:
-only insert GLOBAL targets from the toplevel directory
-don't insert the edit_cache target if it calls ccmake, since this doesn't
work in the output tab of Eclipse
-add the /fast targets
Alex