Teach kwsysProcessKill to identify processes on this platform using the "ps"
command just as on Linux. Patch from Modestas Vainius <modax@debian.org>.
See issue #10432.
The compiler id is checked for C++ and C, if there is not one
of those available, then just default to gcc. This makes it
work with Fortran, or None projects.
This makes the behavior of the build with the Visual Studio generators
equivalent to the behavior of makefile based builds. After an error
in a custom command sequence, the build stops and reports an error
rather than executing the remaining commands in the sequence.
Create platform variable "CMAKE_<LANG>_RESPONSE_FILE_LINK_FLAG" to
specify an alternative to "@" for referencing response files. It
applies specifically to response files with linker options.
See issue #10401.
Response files are parsed by tools, not by shells. We teach
cmLocalGenerator::Convert() a new "RESPONSE" output format and use it
for objects listed in response files. It does not do special slash or
MSYS root translation like the "SHELL" format does. This is necessary
for GNU tools on Windows to understand response file content.
See issue #10401.
Allow the user to set the CMake variable CTEST_COST_DATA_FILE, which will be used to store the cost data from test runs. If not set, defaults to the original location in the build tree Testing/Temporary dir.
Ensure that the HTML documentation generated by CMake complies with
"XHTML 1.0 Strict":
- All tags are properly closed and DOCTYPE is specified
- Useful for downstream XML-processors (e.g. for extracting section
titles)
See issue #10338.
Signed-off-by: Simon Harvey <simon.harvey@cambridgeflowsolutions.com>
http://public.kitware.com/Bug/view.php?id=9978
Now instead of one linked resource for each project() just one linked
resource to the top level source directory is created.
This should really avoid this type of name clashes. And to me it looks also
much less confusing.
Hopefully the name "[Source directory]" containing a space and square
brackets doesn't lead to problems somewhere. Here it works.
Alex
In commit 'Create KWSYS_PLATFORM_INFO_TEST macro' (2009-11-20) we
implemented the macro to use a cache entry to avoid re-running the
try_compile(). However, the output copied from the try_compile is
needed on every configure. If the user wipes out the build tree but not
the cache file then the try_compile() will not re-run to recreate the
needed file. We address the problem by teaching the macro to run the
try_compile() whenever its output file does not exist.
We store custom command rule hashes in CMakeFiles/CMakeRuleHashes.txt
persistently across CMake runs. When the rule hash changes we delete
the custom command output file and write a new hash into the persistence
file.
This functionality was first added by the commit 'Introduce "rule
hashes" to help rebuild files when rules change.' (2008-06-02).
However, the implementation in cmGlobalGenerator::CheckRuleHashes kept
the file open for read when attempting to rewrite a new file. On
Windows filesystems this prevented the new version of the file from
being written! This caused the first set of rule hashes to be used
forever within a build tree, meaning that all custom commands whose
rules changed would be rebuilt every time CMake regenerated the build
tree.
In this commit we address the problem by splitting the read and write
operations into separate methods. This ensures that the input stream is
closed before the output stream opens the file.
We use 'git diff-index' to detect local modifications after pull. On
some filesystems the work tree timestamps of a few files may be dated
after the index, making them appear as locally modified. We address the
problem by using 'git update-index --refresh' to refresh the index and
avoid false local modifications.
Our internal path processing methods assume no trailing slashes, but bzr
adds trailing slashes to updated directories. This can lead to empty
entries in Update.xml files. We address the problem by stripping the
slashes as soon as they are parsed.
Cygwin versions .dll files by putting the version number in the file
name. Our fix to issue #3571 taught CMake to do this, but it used the
VERSION target property. It is better to use the SOVERSION property
since that is the interface (rather than implementation) version.
Change based on patch from issue #10122.
When building on Cygwin without -mwin32, the _WIN32 macro may not be
defined. SharedForward must still set the PATH environment variable to
ensure runtime dependencies are found.
The 'ldd' wrapping feature uses 'cygcheck' for now since a real ldd tool
is not available in Cygwin 1.5. We can change to use the real ldd when
we choose to stop supporting legacy Cygwin and require 1.7.
When kwsys is built using GCC visibility support can be used. This is similar
to the way that Windows exports symbols in DLLs, and requires projects that
build kwsys to change the default visibility using some compiler flags. See
http://gcc.gnu.org/wiki/Visibility for more details about GCC visibility.
Makefile dependencies must be escaped using cmLocalGenerator::Convert
with the cmLocalGenerator::MAKEFILE option. This fixes Fortran module
dependencies with spaces in the path. We test the fix by adding a space
to one of the module paths in the Fortran test.
The improved text gives very clear information when either the CMakeLists.txt or CTestConfig.cmake file is missing. Hopefully, it makes it easier for those poor future souls who encounter these messages to solve their problems quickly.
If APPEND is given to ctest_start, it will read the tag from the current existing Testing/TAG file rather than creating a new one based on the current time stamp. This allows a developer to run several dashboard scripts in a row, all of which will share the same tag/stamp/buildid when they finally get submitted to CDash. Now you can split the running of build phases and test phases for the same dashboard row into multiple scripts.
Before this commit, the value of PATH at cmake time was put into the eclipse
project file. The problem with this is that this will be lost the first time
cmake is rerun from an build inside eclipse which was started without the
environment externally already set.
This patch now:
-adds the env.var to the cache if it is not already in the cache
-reuses the variable from the cache if it is in the cache, but not in the env.
-uses the variable from the cache if it contains the whole content of the
current env.var (e.g. if it is the full PATH plus the MSVC dirs)
Also store INTEL_LICENSE_FILE in the project file if an Intel compiler is used.
Alex
The Eclipse and KDevelop generators set the VERBOSE environment variable to
TRUE in the project files, because they must be able to "see" the full
command lines and errors, otherwise they can't parse the errors. But the
VERBOSE env.var. also enables cmakes own verbose output, which can be quite
long. This commit introduces an environment variable CMAKE_NO_VERBOSE, which
when set disables cmake's verbose output also when VERBOSE is set. This
env.var is now set by both the Eclipse and the KDevelop generators.
Alex
Previously we produced commit times formatted like
1261403774 -0500
which is what the Git plumbing prints. Now we use a human-readable
format like
2009-12-21 15:28:06 -0500
which is still easy to machine-parse.
Previously we escaped quotes in <UpdateCommand>...</UpdateCommand>
values using '"'. This is not necessary because the value is in
xml CDATA and not an xml attribute.
A Subversion revision is unique across the entire repository, but work
trees typically correspond only to a subdirectory below the root path.
In order to specify the version of the source code that was tested,
CTest now submits a <SVNPath> element in Update.xml that specifies the
directory of the repository that corresponds to the work tree. In
combination with the revision number this uniquely specifies the tested
source. See issue #7541.
We teach CTest to report in a <Revision> element the revision of the
source tree that was tested. This makes sense for all modern VCS tools
because they version the whole tree. We simply omit this element for
CVS because it only versions files. See issue #7541.
The SharedForward header contains a preprocessor table mapping from
platform to equivalents for ldd and LD_LIBRARY_PATH. This commit fixes
the table preprocessor directives to guarantee at most one platform.
This generalizes the commit "Fix compilation of VTK on debian/sparc".
The TestSharedForward executable and TestDynload module do not actually
link to a KWSys library, but it is nice to build them after the
libraries just like all other test binaries.
This also works around a universal binary bug in Xcode 2.x. It forgets
to create the output directory for the executable before linking it. We
avoid the problem by putting the library in the directory first.
CMake has a special case for the "make install" target when building
CMake itself. We use the just-built CMake to install itself since an
existing CMake installation cannot replace itself (at least on Windows).
We simplify the code that computes the location of the CMake binary by
taking advantage of existing generator support for target lookup. This
will make it robust to any changes in CMake's own CMakeLists.txt files
in the future.
Some fixes for including Qt frameworks.
Remove extra "QtGui.framework" so its not Contents/Frameworks/QtGui.framework/QtGui.framwork/... anymore.
Also include QtGui Resource folder, so a Cocoa/Qt based cmake-gui app works.
CTest filters the output from tools and tests to ensure that the XML
build/test result documents it generates have valid characters.
Previously we just converted all non-ASCII bytes into XML-escaped
Unicode characters of the corresponding index. This does not preserve
tool output encoded in UTF-8.
We now assume UTF-8 output from tools and implement decoding as
specified in RFC 3629. Valid characters are preserved, possibly with
XML escaping. Invalid byte sequences and characters are converted to
human-readable hex values with distinguishing tags. See issue #10003.
We re-arrange EXECUTABLE_OUTPUT_PATH settings to avoid putting utility
and test executables in the 'bin' directory of the build tree. This
makes the directory look like that in the installation tree, except that
on multi-configuration generators we still use a per-config
subdirectory.
KWSys should not set variables outside its namespace. It can honor the
EXECUTABLE_OUTPUT_PATH set by a host project, but tere is no need for it
to set a default in the host project cache.
The DumpDocumentation executable and some supporting code and tests were
completely unused by CMake. Generation of documentation is done by the
individual executables with --help* options. In this commit we simply
remove the unused code, executable, and test.
The Intel Fortran plugin to VS defines VFFortranCompilerTool as the
compiler tool. This commit fixes generated projects to use that tool
for per-source settings instead of VCCLCompilerTool. We were already
using it for target-wide compiler settings.
In order to kill process trees we need to list all processes to find
those whose parent we are killing. We implement process listing on
OpenSolaris by using "ps -ef" and parsing the resulting format:
UID PID PPID C STIME TTY TIME CMD
%*s %d %d %*[^\n]\n
In order to kill process trees we need to list all processes to find
those whose parent we are killing. We implement process listing on QNX
using "ps -Af" and parsing the resulting format:
UID PID PPID C STIME TTY TIME CMD
%*d %d %d %*[^\n]\n
We enumerate processes to identify those whose parent is being killed so
that we can recursively kill the children. Enumeration uses the
Process32(First|Next) windows API functions, which accept PROCESSENTRY32
objects to be filled. This commit corrects the declaration of the entry
structure to account for its size on 64-bit Windows.
On UNIX systems we kill a tree of processes by performing a DFS walk of
the tree. We send SIGSTOP to each process encountered, recursively
handle its children, and then send SIGKILL.
We once used the above approach in the past, but it was removed by the
commit "Do not send both SIGSTOP and SIGKILL when killing a process".
The commit was meant to work-around an OS X 10.3 bug in which the child
would not always honor SIGKILL after SIGSTOP. At the time we wrongly
assumed that the process tree remains intact after SIGKILL and before
the child is reaped. In fact the grandchildren may be re-parented to
ppid=1 even before the child is reaped, which causes the DFS walk to
miss them.
The Watcom tools do their own command-line parsing and do not accept
double-quotes. Instead we single-quote the target output name when
invoking wlink and other Watcom tools. This fixes support for spaces in
the target output directory path when it is not under the build tree.
We create CMake Policy CMP0015 to make link_directories() treat relative
paths with respect to the source tree while retaining compatibility.
This makes it consistent with include_directories() and other commands.
Changes based on patch from Alex. See issue #9697.
In CTest command-driven script mode we support starting without a source
tree. Previously the ctest_start() command would do some initialization
but could not do anything that required CTestConfig.cmake from the input
source tree. Later, ctest_update() would run CTEST_CHECKOUT_COMMAND to
create the source tree, and then re-initialize everything. This
delayed-initialization approach led to many complicated cases of which
only some worked. For example, the second initialization only worked
correctly in Nightly mode and simply failed for Experimental and
Continuous builds.
A simpler solution is to run CTEST_CHECKOUT_COMMAND during ctest_start()
and then have a single initialization path. In principle this change in
behavior could break scripts that set the checkout command after
ctest_start() but before ctest_update(). However, the convention we've
always followed has been to set all variables before ctest_start().
See issue #9450.
We make the cmCTest::Initialize method private since it is only called
from inside the class implementation. We also combine the two boolean
arguments into one since they both meant the same thing.
We suppress Intel warning 1572 because the cases where we do equality
tests are valid. Since this project does not do numerical computations
we need not worry about real instances against which this warning
protects.
-use CMAKE_EXECUTABLE_FORMAT and CMAKE_SYSTEM_NAME to decide which binary
parsers to load (ELF/Mach O/PE)
-use CMAKE_(C|CXX)_COMPILER_ID to load the respective compiler error parser
-remove EclipseToolchainType, which was a mixture between compiler and operating system
Alex
The commit "Enable loose loop constructs in KWSys" set the minimum
required CMake version to 2.4.5. This regressed the setting of CMP0003,
so we restore it in this commit.
The FundamentalType header needs to know type sizes at preprocessing
time. This commit teaches it to avoid using CHECK_TYPE_SIZE because the
macro does not work for types whose size varies across architectuers in
Mac OS X universal binaries. Fortunately the Mac compilers provide just
enough information to detect the needed type sizes during preprocessing.
We now use preprocessor macros instead of configuration tests whenever
they are available. As a side effect this reduces the number of
try-compiles needed with GCC.
See issue #9913.
This macro helps KWSys perform try-compile tests that extract 'INFO'
strings out of compiled binaries. It works for CMake 2.6 and above.
On CMake 2.4 it always returns an empty list of information values,
so this should be used only as an optimization until 2.6 is required.
In KWSys IOStream we need to detect whether 'long long' exists but we do
not need its size. We avoid using CHECK_TYPE_SIZE because it does not
work for types whose size varies across architectuers in Mac OS X
universal binaries. See issue #9913.
The list of libraries to be linked into the current target must be
specified using windows slashes to that UNC paths such as
\\server\share\somelibrary.lib
work correctly. See issue #9917.
VS 10 provides $(Configuration) and $(ConfigurationName) but only the
former is documented so we prefer it. This also makes CMAKE_CFG_INTDIR
consistent with its documentation. See issue #9916.
The commit "Fix get_filename_component ABSOLUTE mode" broke REALPATH
treatment of relative paths because it stopped storing the absolute path
in local variable 'filename'. This commit fixes the call to GetRealPath
to use the proper local variable and adds a test.
The ctest subdirs command now checks the relative path first, and if that does not exist, also checks if the given path was absolute. Thanks vodall for the patch.
Previously we silently ignored such calls and set nothing. The commit
"Initialize directory scope with closure of parent" inroduced a bad test
for the top scope. This commit fixes the test to avoid dereferencing a
null pointer, and adds a warning when the case is encountered.
This allows for a built in bzip and zip capability, so external tools
will not be needed for these packagers. The cmake -E tar xf should be
able to handle all compression types now as well.
We create per-configuration target properties to specify ARCHIVE,
LIBRARY, and RUNTIME output directories. The properties override the
generic properties for the <CONFIG> configuration:
ARCHIVE_OUTPUT_DIRECTORY -> ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>
LIBRARY_OUTPUT_DIRECTORY -> LIBRARY_OUTPUT_DIRECTORY_<CONFIG>
RUNTIME_OUTPUT_DIRECTORY -> RUNTIME_OUTPUT_DIRECTORY_<CONFIG>
For multi-configuration generators, the per-configuration subdirectory
normally appended to the generic output directory is not added to the
configuration-specific property values. This allows projects to set the
exact location at which binaries will be placed for each configuration.
See issue #9163.
VS 6 forgets to create the output directory for a static library if it
differs from the intermediate files directory. We work around this VS
bug by creating a pre-link event on the library target to make the
directory.
This commit removes use of configuration-less cmTarget::GetDirectory()
by the VS 6 generator (except for compatibility with user templates).
We replace OUTPUT_DIRECTORY_<CONFIG> tokens in the templates using the
per-configuration result of cmTarget::GetDirectory(config).
The try_compile() command's COPY_FILE option should not try to actually
copy the file if it cannot be found. Some C runtime library's fopen
cannot handle an empty file name.
Previously the Xcode generator set SYMROOT to be the target output
directory. This told Xcode to put the "<proj>.build" directory in the
output path too.
This commit sets SYMROOT, CONFIGURATION_BUILD_DIR, and OBJROOT to put
intermediate files in the build directory corresponding to the source
directory that created each target. This is more consistent with the VS
IDE generators. Now only the build output files (actual targets) go to
the target output directory.
The commit "modified the if command to address bug 9123 some" changed
the if() command behavior with respect to named boolean constants. It
introduced policy CMP0012 to provide compatibility. However, it also
changed behavior with respect to numbers (like '2') but did not cover
the change with the policy. Also, the behavior it created for numbers
is confusing ('2' is false).
This commit teaches if() to recognize numbers again, and treats them
like the C language does in terms of boolean conversion. We also fix
the CMP0012 check to trigger in all cases where the result of boolean
coersion differs from that produced by CMake 2.6.4.
The if() command reports its arguments at the beginning of some error
messages. Originally it reported the un-expanded form of the arguments
because in ancient CMake versions no context information was available.
Now it is more useful to see the real arguments, which may be mentioned
in the main error message. Since full context information is now
available, users can refer back to the source if they need to see the
unexpanded form of the arguments.
For example, the code
set(regex "++")
if("x" MATCHES "${regex}")
endif()
now produces the message
if given arguments:
"x" "MATCHES" "++"
Regular expression "++" cannot compile
instead of
if given arguments
"x" MATCHES "${regex}"
Regular expression "++" cannot compile
The commit "Set version info for shared libs on OSX" taught the Xcode
generator to honor VERSION and SOVERSION properties. However, it also
set version '1.0.0' as the default when no version property is set,
which is inconsistent with the Makefiles generator. This commit fixes
the default to '0.0.0' for consistency.
See issue #9773.
The reverted commit attempted to preserve the "../" PREFIX work-around
for avoiding per-config build directories in the VS IDE generators.
However, the original reporter has concluded that a "../" PREFIX no
longer works everywhere in VS 10 project files anyway. Rather than set
OutputPath, this commit restores the $(OutDir)$(TargetName)$(TargetExt)
default.
See issue #9768.
This commit fixes the cmparseMSBuildXML.py script to generate correct
flag table entries for booleans with optional value. These flags use
two entries: the first should ignore the value and enable the option,
and the second should use the value if given. Previously the first
entry did not recognize flags with values.
In particular this fixes flags like /MP4, but the change corrects
matching of some other flags too. See issue #9771.
This commit teaches the VS 10 generator to detect the -D_UNICODE option
in preprocessor definitions and set the CharacterSet attribute to the
value 'Unicode'. This was already done for other VS IDE versions.
See issue #9769
The default $(OutDir)$(TargetName)$(TargetExt) for this value works in
most cases because we set the three properties. However, if the target
property PREFIX contains a path component (not documented but happens to
work in other VS generators) we drop it from TargetName and do not put
it in OutDir either. This commit corrects the resulting path by setting
the OutputPath property explicitly with the full path.
See issue #9768.