Avoid tracing dependencies of GLOBAL_TARGET targets. The build system
generators are not designed to handle any dependencies that may be
discovered. Global targets are only generated by CMake and never have
commands that reference targets built in the project anyway.
The exception is when building CMake itself there is a special case to
use the just-built "cmake" binary in the "install" target so that CMake
can replace itself on Windows. Even in this special case we do not want
to let the "install" target depend on the "cmake" target. Doing so
breaks cases like "make -j4 install".
Commit "merge in changes for beos support" (2006-12-04) added a realpath
call for every directory parsed out of a PATH-style environment
variable. No reason was given in the commit message or comments.
The call incorrectly resolves symlinks in referenced paths. Remove it.
If BeOS support really needs it then it can be restored for that
platform with a full explanation.
The cmCustomCommandGenerator::GetCommand method completely replaces the
purpose of this method. Re-implement GetRealLocation inline at the only
remaining call site and remove it.
The Makefile, VS, and Xcode generators previously duplicated some custom
command line generation code. Factor this out into a separate class
cmCustomCommandGenerator shared by all generators.
A custom command may name a target created by add_custom_target in its
DEPENDS field. Treat this case as a target-level dependency only since
a custom target provides no standard file on which to add a file-level
dependency.
Imported targets do not themselves build, but we can follow dependencies
through them to find real targets. This allows imported targets to
depend on custom targets that provide the underlying files at build
time.
Commit 60cd72d0 (Cleaned up generation of symbolic rules, 2006-02-15)
incorrectly made these Makefile targets .PHONY even though the build
rule touches an actual file. Correct it so that the copy_f90_mod and
touch steps do not happen on every "make".
Also, improve the documentation of the fixup_bundle and fixup_bundle_item
functions to clarify that plugin type "libs" need to be copied into
the bundle *before* calling fixup_bundle.
Commit e93a4b4d34 changed the way that
the libs parameter to fixup_bundle is interpreted. Before the commit,
the libs were copied into the bundle first and then fixed up. After
the commit, the copy was skipped, assuming the libs were in the bundle
in the first place, and then the fixups occurred as before.
However, before the commit, it was possible to name a lib from outside
the bundle, and have it copied in and then fixed up. Its resolved
embedded name was always inside the bundle before. After, its resolved
embedded name was just the same as its resolved name, which is in its
original location, and not necessarily inside the bundle.
This manifested itself as a problem with the ParaView call to
fixup_bundle and its many plugins. Previously, ParaView had simply
passed in the list of plugin file names as they existed in the build
tree, and left the copying into the bundle up to the fixup_bundle
function. When built with CMake 2.8.3 (the first version to contain
the above named commit) the fixup_bundle call would inadventently
fixup libraries in the build tree, not libraries that were in the
bundle. Furthermore, the plugins would not be in the final bundle.
This points out the fact that the fix for the bugs made by the above
commit was a backwards-incompatible change in behavior.
This commit makes it an error to try to fixup an item that is not
already inside the bundle to make the change in behavior apparent
to folks who were depending on the prior copy-in behavior: now,
they should get an error, and hopefully, reading the new and
improved documentation, should be able to resolve it in their
projects by adding code to install or copy in such libraries prior
to calling fixup_bundle.
Whew.
Commit 34e1ac24 (Create Fortran info variables for .mod behavior,
2010-11-12) incorrectly taught GetFortranModuleDirectory to return a
relative path. We really want to use "." as the module directory only
as a workaround for compilers that do not do so by default. Therefore
we need this default only when generating the compiler command line and
not when scanning dependencies.
Revert the previous change to GetFortranModuleDirectory and apply the
change only at one of its call sites.
Commit 3827991e (...fix...not being able to remove try compile code,
2008-03-26) introduced a loop of RemoveFile attempts to overcome
anti-virus locks on recently created try_compile executables. Fix the
logic in this loop to work when the file is already missing.
The Express Edition does not come with 64-bit tools, but one can install
the "Microsoft Windows SDK v7.1" to get them. Detect this case and
check for the SDK. If found, set PlatformToolset to use the SDK tools.
Otherwise, fail with a concise and informative error.
Commit 1a0c166 (Store direct dependencies in solutions for VS >= 8,
2010-08-20) disabled use of VS-specific global dependency analysis.
Avoid perfoming the analysis at all when it is not needed. This also
prevents creation of bogus and unused '_UTILITY' targets since they are
not needed for dependencies.
Previously the command
find_path(VAR DOC "")
would crash because the argument pre-processing removed the DOC ""
arguments but the rest of the parsing assumes at least 2 arguments.
Reject the call with an error instead.