Commit Graph

585 Commits

Author SHA1 Message Date
Brad King d1526f825e Refactor internal resource location APIs and initialization
Rename cmSystemTools::FindExecutableDirectory to FindCMakeResources.
Teach it to compute the locations of cmake, ctest, cpack, ccmake, and
cmake-gui executables, and the location of CMAKE_ROOT.  Provide this
information from static cmSystemTools::Get<resource>() methods.
Refactor code that needs these locations to use the new APIs.

Teach FindCMakeResources to use the OS X system API to lookup the
executable location.  When running from the CMake build tree itself,
leave a file in the tree that FindCMakeResources can use to read the
location of the source tree.  This avoids the need to compile the source
tree location into a binary that may be installed and used without the
source tree.

Teach the QtDialog on OS X to create a "cmake-gui" symlink in the build
tree next to "cmake" and the other tools, as is already done in the
install tree for the application bundle.  This ensures a consistent set
of executables are available in one directory.
2013-11-12 08:23:35 -05:00
Brad King 4c383b52d0 cmake: Avoid '-E tar' failure to extract symlinks on Windows (#13251)
If a symlink fails to extract and the host system is Windows then report
a warning and skip the entry instead of failing.  This will allow
archives containing symbolic links to be extracted on Windows with
somewhat gracefully degraded behavior.
2013-11-01 16:52:22 -04:00
Brad King 0d8552c459 cmSystemTools: Re-order extract_tar logic
Simplify extraction message logic to be easier to follow and to write a
newline before any error messages that may be produced.  Also flip
handling of the archive_write_header return code to handle success in
the "then" case and failure in the "else" case.
2013-11-01 16:52:18 -04:00
Brad King 765d783972 cmSystemTools: Drop old RunCommand method
All calls to this method have been replaced by newer infrastructure.
Remove it and the supporting cmWin32ProcessExecution class.
2013-10-19 07:25:43 -04:00
Brad King ec6df3675e Teach --help-* options to load documentation from .rst files
Install the Help directory next to Modules to make it available in CMake
distributions.  Use cmRST to read Help .rst documents and print them as
help output.

Add options

 --help-manual-list
 --help-manual

to list available manuals or print one of them.  Implement the options

 --help-commands
 --help-modules
 --help-policies
 --help-properties
 --help-variables

by mapping to the corresponding manual page.  Implement the options

 --help-command-list
 --help-module-list
 --help-policy-list
 --help-property-list
 --help-variable-list

by globbing the available Help .rst documents of the corresponding type
and reading their titles.  Implement the options

 --help-command
 --help-module
 --help-policy
 --help-property
 --help-variable

by globbing the matching Help .rst document(s) and printing them.
2013-10-16 09:22:35 -04:00
Brad King 6e2da4a4d3 Merge topic 'passthru'
2b473d2 Add option to use stdout/stderr of original terminal in cmake --build
2013-07-31 08:48:19 -04:00
Patrick Gansterer 2b473d2eaa Add option to use stdout/stderr of original terminal in cmake --build
Pass the original file handles to the native tool when using the
--use-stderr option in the build command. This enables the
usage of advanced terminal features like colored output.
2013-07-29 08:52:54 +02:00
Clinton Stimpson 84698abb51 OS X: If necessary, use xcrun to help find otool used to query install names.
This fixes querying for @rpath install names when using Xcode without
the command line tools installed.
2013-07-26 22:38:57 -06:00
Brad King 45d2966dcc VS: Avoid leaking child process output back to IDE (#14266)
The VS IDE sets the environment variable VS_UNICODE_OUTPUT when
executing build rules in order to tell MS tools to report output through
a back door instead of through stdout/stderr.  Unset this variable so
that CMake can capture or properly redirect all output from processes it
runs even when running inside a VS IDE build environment.

This generalizes the special cases fixed by commit 80d045b0 (When
GetPrerequisites.cmake runs dumpbin while running inside the VS IDE...,
2008-05-01) and commit 44aff73d (ExternalProject: Avoid bleed-through
output when logging, 2011-01-06), so drop special handling of
VS_UNICODE_OUTPUT in those instances.
2013-07-16 13:48:10 -04:00
Brad King 357db89d27 Merge topic 'make-depends-collapse-paths'
551d334 cmDependsC: Collapse relative include paths
2013-07-02 09:03:52 -04:00
Pavel Shramov 551d3343cd cmDependsC: Collapse relative include paths
While calculating dependencies collapse sequences such as

 ../../../a/b/c/../../d/e/../../e/f

to avoid total path lengths over the Windows path length limit as much
as possible.
2013-06-26 10:14:31 -04:00
Brad King c1631efa0e Merge topic 'version-compare-genex'
e605528 Add generator expressions for version comparision.
48bb48e De-duplicate version comparison code.
2013-06-26 09:02:49 -04:00
Stephen Kelly 2331b57bec Add whitespace after colons in error messages. 2013-06-21 16:21:44 +02:00
Stephen Kelly 48bb48e114 De-duplicate version comparison code.
Extend the VersionCompare in cmSystemTools to handle 8 components,
and port the if command to use that.
2013-06-12 14:09:36 +02:00
Clinton Stimpson ff01f8b600 OS X: Improvements for getting install name of dylib.
In the case of a multi-arch dylib where none of the architectures
is the host architecture, otool -D returned multiple install names.
2013-06-05 21:31:11 -06:00
Clinton Stimpson 94e7fef226 OS X: Add RPATH support for Mac.
RPATH support is activated on targets that have the MACOSX_RPATH
property turned on.
For install time, it is also useful to set INSTALL_RPATH to help
find dependent libraries with an @rpath in their install name.

Also adding detection of rpath conflicts when using frameworks.
2013-06-03 09:42:05 -04:00
Petr Kmoch 674f918a1a cmSystemTools: Generalize TrimWhitespace to all whitespace
Modify cmSystemTools::TrimWhitespace() to remove all leading and
trailing whitespace, not just spaces.
2013-03-27 08:46:55 -04:00
Brad King 59b568e5e8 Fix cmSystemTools::RenameFile race on Windows
Since commit d46d8df0 (Re-implemented cmGeneratedFileStream to look like a
real stream and replace the destination file atomically, 2004-11-03) our
RenameFile implementation tries to deal with MoveFile not replacing
read-only files.  In order to avoid the Get/SetFileAttributes pair we used
stat to test for existence of the destination file.  This has a race in
which the destination could be created between the test for existence and
the MoveFile call.

Remove the stat call and use GetFileAttributes to detect whether the file
exists.  This shortens the race but does not eliminate it.  Use a loop to
try multiple times in case we lose the race.  While at it, drop Win9x
support and always use MoveFileEx.
2013-02-04 15:15:21 -05:00
Brad King 4046fc0104 Merge topic 'use-cmsys-auto_ptr'
ddc0520 Always use the auto_ptr from cmsys.
2012-11-27 13:34:25 -05:00
David Cole 37c34d7d7b CMake: Fix infinite loop untarring corrupt tar file
Suggested-by: Robert Maynard <robert.maynard@kitware.com>
2012-11-26 11:54:38 -05:00
Stephen Kelly ddc052052b Always use the auto_ptr from cmsys.
This is for consistency throughout cmake. The cmsys version exists
becaues uses of auto_ptr types as return types does not work with
some implementations in ancient compilers.
2012-11-21 00:56:36 +01:00
David Cole c75f404065 Merge topic 'kwsys-environ-cleanup'
e48796b KWSys: Fix SystemTools environment memory handling (#13156)
b10c5cb CTest: Simplify environment save/restore
2012-05-01 14:09:12 -04:00
David Cole fd1788294d Merge topic 'mac_environ'
a90d478 [OSX] Fixed undefined symbol when linking CMakeLib into shared library
2012-04-25 14:00:22 -04:00
Brad King b10c5cbb87 CTest: Simplify environment save/restore
Replace use of AppendEnv/RestoreEnv pairs with instances of
SaveRestoreEnvironment.  Simplify the signature of AppendEnv and use it
in place of similar loops elsewhere.  Move the RestoreEnv implementation
inside the SaveRestoreEnvironment destructor which is the only place
left that calls it.
2012-04-24 16:56:14 -04:00
Konstantin Tokarev a90d47890f [OSX] Fixed undefined symbol when linking CMakeLib into shared library 2012-03-03 19:33:35 +04:00
David Cole bada88e8e4 Merge branch 'target-include-directories' into ninja-generator 2012-02-22 16:21:48 -05:00
David Cole e65f39a59e Merge topic 'interrupt-bug-12649'
131eed6 cmake-gui: Improve interrupt granularity to fix bug 12649.
2012-02-14 16:14:35 -05:00
Peter Collingbourne 2cd36550b0 Add cmSystemTools::TrimWhitespace function 2012-02-02 23:04:38 +00:00
Clinton Stimpson 131eed6607 cmake-gui: Improve interrupt granularity to fix bug 12649.
Instead of enabling interrupt only when a progress or message callback is called, add a new callback specifically for
interrupt.  This new callback is called from GetFatalErrorOccured() so cmake-gui can immediately report interrupt status
instead of calling queuing a call to cmSystemTools::SetFatalErrorOccured() and waiting for the progress or message
callback to be called to process that queued call.
2012-01-02 11:07:43 -07:00
Brad King ffdb37a4f7 Handle libarchive API change in archive_read_data_block
The offset argument type depends on the libarchive version.
2011-12-22 10:52:03 -05:00
Brad King ed7cef5634 Factor Compute(File|String)MD5 into cmCryptoHash helper
Define an abstract API around the backend hash algorithm.  Expose
ifstream errors to HashFile callers.  Always try opening the file.
Succeed only if the end of file is reached without error.
2011-11-16 10:14:53 -05:00
Brad King a343bc1c76 RunSingleCommand: Avoid assignment in condition
Several compilers warn about this case even when an extra layer of
parenthesis surrounds the assignment.  Make the condition explicit.
2011-07-28 10:43:11 -04:00
Johan Björk 642f10066a RunSingleCommand: Add a OUTPUT_NORMAL flag.
OUTPUT_NORMAL does no processing of the output streams, it just passes
them through the same streams as they were received on.
2011-07-28 10:43:09 -04:00
Johan Björk 856a9e499f RunSingleCommand: Replace verbose boolean with enum
No behaviour change, this prepares for adding a flag to skip the merging
of output streams.
2011-07-28 10:42:03 -04:00
Brad King 4096066723 RunSingleCommand: Fix indentation 2011-07-28 10:28:52 -04:00
Brad King acd2f84cc0 cmSystemTools: Remove trailing whitespace 2011-07-28 10:23:13 -04:00
Brad King 98dc13e513 Merge topic 'xcode-source_groups-folders-issue-10039'
f09ba0f Fix style errors added by parent and grandparent
eeeeca1 XCode: Support target folders on XCode.
59ed84e Xcode: Support multiple level nesting of XCode folders (#10039)
d0a403f CMake: Move tokenize to cmSystemTools
2011-06-08 15:44:44 -04:00
Johan Björk d0a403fd99 CMake: Move tokenize to cmSystemTools 2011-06-07 10:18:54 -04:00
Brad King 3232136fc8 Merge topic 'dont-compress-memcheck-output'
0e591ed Fix type conversion warning
9c3a0b9 We will actually compress memcheck output if the server supports it.
8024c53 Dynamic analysis test output should not be compressed.
2011-06-02 11:29:09 -04:00
Zach Mullen 9c3a0b9f14 We will actually compress memcheck output if the server supports it.
This change won't be functional until the next release of CDash due to the
version comparison.
2011-05-26 14:50:07 -04:00
Brad King e51bbc14f6 Merge topic 'output-compile-lines'
cdc2b41 Fix CompileCommandOutput test build on Windows
7039d1f Fix CompileCommandOutput test for Make tools not supporting spaces
4268e3d run_compile_commands: Cast istream::get() result to char
c45c60b run_compile_commands: Avoid extra stl vector conversion
7c5be51 run_compile_commands: Avoid shadow in std::map<>::at workaround
169bb05 Provide std::map<>::at for use in run_compile_commands
4e2185c Make std::map usage more portable in language=>flags/defines maps
a7e7a04 Fix run_compile_commands build on Apple GCC 3.3
c9174c0 Fix signed/unsigned comparison in EscapeJSON
8346a28 Only offer the compile command output feature on unix systems
0e6b05f Adds a test for the compile command line output.
5674844 make compile command output optional
fe07b05 implement cxx command output
65c0c24 cache flags and defines
3f064ef refactor flags and defines
2011-05-24 14:48:14 -04:00
Brad King 3d92c8c827 Explicitly cast time value in cmSystemTools::RandomSeed
Use static_cast to avoid warnings like

 conversion to ‘unsigned int’ from ‘__time_t’ may alter its value
 conversion to ‘unsigned int’ from ‘__suseconds_t’ may alter its value

We do not care if the value is truncated because we are looking for just
32 bits anyway.
2011-05-19 07:56:04 -04:00
Brad King eb6f461fc1 VS 6: Define _WIN32_WINNT to load wincrypt.h correctly 2011-05-18 10:09:23 -04:00
Brad King c45c60b24f run_compile_commands: Avoid extra stl vector conversion
The Sun compiler does not provide the proper vector constructor to
initialize it from an iterator pair of a non-matching type.  Extend the
ParseUnixCommandLine API to provide a vector of the proper type so no
conversion is needed.
2011-05-18 09:44:28 -04:00
Brad King e1b0a11dd4 Improve string(RANDOM) default seed
The naive time(0) seed is unique only within one second.  Instead try to
read a real source of entropy and otherwise fall back to a combination
of the process id and high-resolution time.
2011-05-17 10:07:26 -04:00
Brad King f306a357b2 Merge topic 'style-line-length'
9d21281 Fix line-too-long style errors
86025d3 file(DOWNLOAD): Fix error message formatting
2010-09-14 13:19:53 -04:00
Brad King 9d21281b7d Fix line-too-long style errors 2010-09-10 14:42:09 -04:00
David Cole 666f328858 Preserve timestamps on files on tar extract.
Conversion to libarchive changed the behavior of
cmake -E tar xzf. This commit fixes that oversight.
2010-09-09 12:57:14 -04:00
Eric NOULARD 40dc97dc73 CPack Backward-compatibly enforce DESTDIR for DEB and RPM 2010-08-23 16:14:40 +02:00
Brad King cb9ea2647f Remove cmSystemTools::EscapeSpaces method
The last remaining call to this method exists only for compatibility.
Remove the method and put its implementation inline in place of the last
call.
2010-08-18 10:26:05 -04:00
Eric NOULARD b50c15915a Add ZIP archive format and LZMA compress support to libarchive-wrapper
This will be needed to use cmArchiveWrire in cmCPackArchiveGenerator
with the same feature set as before. Note that adding zip
support to libarchive-wrapper would also makes it easy to add
a new -E zip command to cmake commands.
2010-08-13 17:49:47 +02:00
Brad King 1b5b2ed3b2 Include entries for directories in tarballs (#11020)
Use libarchive through class cmArchiveWrite to implement the method
cmSystemTools::CreateTar.  The class includes entries for directories by
automatically traversing the tree on disk.
2010-08-06 11:38:14 -04:00
Brad King 3296e6ad90 Include headers from chosen libarchive (#10923)
When CMAKE_USE_SYSTEM_LIBARCHIVE is on we must include the system
libarchive headers to match the library that will be linked.
2010-08-05 17:06:10 -04:00
Brad King ff1f8d0b53 Fix or cast more integer conversions in cmake
These were revealed by GCC's -Wconversion option.  Fix types where it is
easy to do so.  Cast in cases we know the integer will not be truncated.
2010-06-29 09:52:12 -04:00
Brad King 6fc4cd8680 Fix or cast integer conversions in cmake
These were revealed by GCC's -Wconversion option.  Fix types where it is
easy to do so.  Cast in cases we know the integer will not be truncated.
2010-06-25 09:05:15 -04:00
Brad King fdb5f78705 CPack: Try harder to remove temporary dir (#10793)
Windows filesystems sometimes lock files temporarily.  Try removing the
CPack temp install folder multiple times before giving up.
2010-06-04 14:32:08 -04:00
Brad King ea62d6973b Do not list file names during 'cmake -E tar xz'
Since commit "Switch to using libarchive from libtar" (2009-10-30) the
the implementation of "tar xz" has printed all paths from the tarball as
a single line with no separator.  This fixes the logic to extract
silently as expected.
2010-05-05 14:44:36 -04:00
David Cole 10a4abddfd Add missing archive_read_finish calls to fix some of the presently reported valgrind memory leaks. 2009-12-28 13:15:19 -05:00
David Cole 4d3a387ac6 Preserve environment variables across calls to cmCTestScriptHandler::RunConfigurationScript. This will help prevent problems like we are currently experiencing (regarding CMake continuous dashboards only running once each day because the HOME environment variable is modified indirectly by a command in a called script, but affects the environment in the calling script). 2009-12-23 14:34:46 -05:00
Zach Mullen 3cb2a0ffa6 Move cURL dependent code out of CMakeLib to fix complex tests. 2009-12-22 14:37:06 -05:00
Zach Mullen 766ef1d011 Fix broken bootstrap test 2009-12-22 09:03:18 -05:00
Zach Mullen 5aad7bf2d4 Make new web api safe for bootstrap build. 2009-12-21 16:42:32 -05:00
Zach Mullen 3ff0b94055 Added functionality to allow CTest to easily access web APIs. This will be used for better communication with CDash. 2009-12-21 15:19:57 -05:00
Zach Mullen 7af553188e Added support for CTest awareness of the CDash version. This will help forward compatibility for both tools. Note that this changeset effectively makes the default to disable output compression. Now, to enable output compression, the CDASH_CTEST_VERSION must be explicity set to >= 1.6. Automated detection of the CDash version is the next step. 2009-12-21 12:27:04 -05:00
Bill Hoffman 22fb266d06 use different tar format to handle longer file names 2009-11-14 08:48:32 -05:00
Bill Hoffman 28664b96f7 Show the current file when there is a tar error 2009-11-13 16:07:42 -05:00
Bill Hoffman a875845be9 fix warning for borland 2009-11-13 07:39:10 -05:00
Bill Hoffman dc5d1edcfd Fix missing return value. 2009-11-12 10:52:32 -05:00
Bill Hoffman 79b8d61ae9 Fix for working with symlinks in tar files 2009-11-08 19:59:01 -05:00
Bill Hoffman f5fe20dc12 Fix some warnings 2009-11-08 10:34:12 -05:00
Bill Hoffman 7961c8685b go back to running stat and put size check in 2009-11-08 10:19:36 -05:00
Bill Hoffman 34ce92f151 Remove check for now so test passes on linux 2009-11-07 21:08:38 -05:00
Bill Hoffman 03cebb9a7f create a better error message 2009-11-07 20:45:34 -05:00
Bill Hoffman 3d1afdee4a add much better error checking on libarchive calls. 2009-11-07 19:35:35 -05:00
Zach Mullen a9a4814971 Fix compiler error in cmSystemTools.cxx 2009-11-05 16:14:46 -05:00
Bill Hoffman dd09d88065 Add JOM support and clean up some of the tar -E stuff 2009-11-05 15:00:15 -05:00
Zach Mullen 9f105a3f6d Fix style warning in cmsystemtools, cosmetic change to ctest code 2009-11-05 11:37:47 -05:00
Zach Mullen cdbbe00a8b Fix unused param warning resulting from libarchive API change. 2009-11-04 11:36:23 -05:00
Bill Hoffman 5f41fe03ca Fix warnings for unused variables 2009-11-03 16:50:49 -05:00
Bill Hoffman fb51d98562 Switch to using libarchive from libtar for cpack and cmake -E tar
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.
2009-10-30 13:10:56 -04:00
David Cole 43d07f6620 Fix more mismatched new[] / delete[] (eliminate invalid auto_ptr use) to correct valgrind reported memory issues. 2009-10-30 10:31:54 -04:00
David Cole ccb0cf1306 Fix warnings in CMake source code. 2009-10-02 15:30:01 -04:00
David Cole 44bcba7461 Fix warnings in CMake source code. Suppress rampant warnings emanating from Qt files. 2009-10-01 16:47:08 -04:00
Brad King 96afb12087 Convert CMake to OSI-approved BSD License
This converts the CMake license to a pure 3-clause OSI-approved BSD
License.  We drop the previous license clause requiring modified
versions to be plainly marked.  We also update the CMake copyright to
cover the full development time range.
2009-09-28 11:43:28 -04:00
Brad King b41a548d86 Add parentheses around '&&' between '||' for gcc
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.
2009-09-11 08:18:15 -04:00
Brad King 57e14a4f97 COMP: Include <malloc.h> for 'free' on QNX 2009-07-13 17:08:38 -04:00
Brad King 724275b266 COMP: Include <stdlib.h> for 'free' 2009-07-13 16:46:53 -04:00
Brad King 3dd6f36d45 ENH: Add cmSystemTools::ParseUnixCommandLine
This method is a C++ wrapper around the KWSys System library function to
parse unix-style command lines.
2009-07-13 16:22:48 -04:00
Brad King b64aadc5b0 ENH: Remove unused cmSystemTools::RemoveEscapes
The RemoveEscapes method is no longer used anywhere.  All uses of it
have been replaced by a real lexer.  We can remove the method.
2009-06-24 15:09:50 -04:00
Bill Hoffman fdff8eb300 ENH: move PutEnv to SystemTools 2009-06-05 12:01:30 -04:00
Bill Hoffman ae95f656f3 ENH: vms fix 2009-04-24 11:44:42 -04:00
Brad King efe07c4e0a COMP: Fix calls to superclass methods for Borland
The superclass of cmSystemTools is cmsys::SystemTools, which should be
referencable by just SystemTools from inside the class.  Borland C++
does not seem to support this, so we use cmSystemTools instead.
2009-04-22 09:11:06 -04:00
Brad King 13e454f8d3 BUG: Avoid infinite loop at directory tree root
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.
2009-04-21 11:37:09 -04:00
Brad King 714d2fc04b ENH: Remove obscure method from KWSys SystemTools
This removes SystemTools::FileExistsInParentDirectories from KWSys since
it is a special-purpose method that is not generally useful.
2009-04-21 11:36:59 -04:00
Brad King 1ed7f381f1 COMP: Fix BOOL to bool conversion warning
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.
2009-04-15 11:00:03 -04:00
Brad King d3363beb2f ENH: Move RenameFile to cmSystemTools
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.
2009-04-15 09:57:57 -04:00
Brad King dc13914cd6 ENH: Create cmXMLSafe to help escapes in XML
This class provides easy syntax to efficiently insert blocks of data
into XML documents with proper escapes.  It replaces the old
cmCTest::MakeXMLSafe and cmSystemTools::MakeXMLSafe methods which
allocated extra memory instead of directly streaming the data.
2009-02-05 16:31:37 -05:00
Bill Hoffman 7f92b77997 BUG: fix crash with cmd.exe shell and cmake in the path 2009-01-20 10:06:39 -05:00
David Cole 306d517e82 COMP: Using the proper type for local variables can eliminate compiler warnings. 2008-11-26 15:41:16 -05:00
David Cole ceaef94ccc ENH: Implement feature request from issue 7885. Allow setting environment variables on a per-test basis for ctest using set_test_properties ENVIRONMENT. 2008-11-26 14:38:43 -05:00
Bill Hoffman 64fc597de2 ENH: add initial support for HAIKU OS from bug# 7425 2008-09-15 17:53:28 -04:00
Bill Hoffman 1629963e7c BUG: fix for 7045, use gcc for .m 2008-08-19 15:55:10 -04:00
Brad King ae60cc235c COMP: Work-around bogus compiler warning. 2008-08-15 09:47:21 -04:00
Brad King 8063dd293e ENH: Inform user when RPATH or RUNPATH is removed 2008-08-14 09:53:26 -04:00
Brad King 485c3faea7 BUG: Update both RPATH and RUNPATH entries
During installation the RPATH and RUNPATH entries of ELF binaries are
edited to match the user specification.  Usually either one entry is
present or both entries refer to the same string literal.  In the case
that they are both present and refer to separate string literals we need
to update both.  I have never seen this case in practice, but we should
do this just in case.
2008-08-14 09:53:21 -04:00
Brad King 2a85f8289f BUG: Remove both RPATH and RUNPATH entries
Removal of the RPATH and RUNPATH from ELF binaries must work when both
entries are present.  Both entries should be removed.  Previously only
one would be removed and the other would be blanked because it pointed
at the same string which was zeroed.  This fixes gentoo bug number
224901.
2008-08-14 09:53:17 -04:00
Brad King cea66664c5 ENH: Added WOW64 key view support to KWSys SystemTools' windows registry API.
- Add an argument to registry read/write/delete methods to specify
    a 32-bit or 64-bit view.
  - Default is the bit-ness of the running program.
  - See issue #7095.
2008-05-27 14:47:00 -04:00
Brad King 757875df91 ENH: Inform user when RPATH is set during installation.
- Original patch from Alex.
  - Modified to print only when RPATH is actually set.
2008-05-27 10:22:03 -04:00
Brad King b9a5dccc8d ENH: Added RPATH methods to cmSystemTools
- RemoveRPath to remove the RPATH from a binary
  - CheckRPath to check for an existing RPATH in a binary
2008-04-14 15:02:34 -04:00
Brad King 9b8404a305 COMP: Fix new cmSystemTools file time methods on Windows. 2008-04-14 12:44:01 -04:00
Brad King 703b8c8225 ENH: Added methods to cmSystemTools to save and restore file modification times. 2008-04-14 11:43:45 -04:00
Bill Hoffman 0a61a70870 BUG: undo change as it breaks preprocess test for some reason?? 2008-04-08 17:37:13 -04:00
Bill Hoffman 5a079b151a BUG: half fix for 6688, expand registry stuff on unix just like it was not found on windows 2008-04-08 16:06:44 -04:00
Bill Hoffman cec897edc4 ENH: half fix for 6688, don't let [ count go negative 2008-04-08 16:05:23 -04:00
Brad King 871d80696b ENH: Update cmSystemTools::ChangeRPath to support replacing rpath values from the middle of the string. 2008-04-08 13:42:30 -04:00
Brad King c408760a8a ENH: Improve error message when installation file(CHRPATH) cannot change the RPATH. 2008-04-07 10:55:52 -04:00
Bill Hoffman cae34d2df3 ENH: try to fix mac symlinks to the executable 2008-03-28 14:29:29 -04:00
Brad King 34a338dcc1 ENH: In cmSystemTools::ChangeRPath check for the RUNPATH if RPATH does not exist. 2008-03-02 16:19:26 -05:00
Brad King d732de4a8a ENH: Cleanup builtin chrpath support
- Move computation of extended build-tree rpath
    to cmComputeLinkInformation
  - Only enable the extended build-tree rpath if
    the target will be installed
  - Generalize the interface of file(CHRPATH)
  - When changing the rpath on installation only
    replace the part generated by CMake because
    the native tools (ex SunCC on Linux) might have
    added their own part to the rpath
2008-03-02 14:35:23 -05:00
Brad King 32ca01bef0 COMP: Fix unused parameter warning when cmSystemTools::ChangeRPath is built without ELF support. 2008-03-01 15:16:49 -05:00
Brad King 26e58b74d1 BUG: Fix cmSystemTools::ChangeRPath to not complain if there is no RPATH entry in the file but the requested new rpath is empty. 2008-03-01 13:17:01 -05:00
Brad King 34c76d4304 ENH: Use builtin chrpath instead of relinking ELF targets
- Add cmSystemTools::ChangeRPath method
  - Add undocumented file(CHRPATH) command
  - When installing use file(CHRPATH) to change the rpath
    instead of relinking
  - Remove CMAKE_CHRPATH lookup from CMakeFindBinUtils
  - Remove CMAKE_USE_CHRPATH option since this should
    always work
2008-03-01 12:51:07 -05:00
Brad King 4c137bad6b ENH: Add ELF file parsing
- Enabled when system provides elf.h
  - Introduce cmELF class to parse ELF files
  - Use in cmSystemTools::GuessLibrarySOName to really get soname
2008-02-27 16:26:35 -05:00
Brad King 782e9f7ffe ENH: Improve linking to third-party shared libraries on soname platforms
- Reduce false positives in cases of unknown soname
  - Make library extension regular expressions match only at end of string
  - When linking to libraries in implicit dirs convert to the -l option
    only if the file name is one that can be found by the linker
    (ex. /usr/lib/libfoo.so.1 should be linked by full path)
  - Add cmSystemTools::GuessLibrarySOName to guess the soname of a
    library based on presence of a symlink
  - In cmComputeLinkInformation try to guess an soname before assuming
    that a third-party library is built without an soname
  - In cmOrderDirectories guess the soname of shared libraries in cases
    it is otherwise unknown
2008-02-21 13:58:41 -05:00
Brad King 386a6ebf25 COMP: Need to return a value from fake MD5 method under bootstrap. 2008-01-25 08:11:04 -05:00
Brad King f1c5b50cb7 COMP: Cannot do MD5 from KWSys during CMake bootstrap. 2008-01-24 16:11:06 -05:00
Brad King 1dec54489a ENH: Add cmSystemTools::ComputeStringMD5 method. 2008-01-24 14:41:18 -05:00
Bill Hoffman b479c6a8a9 ENH: add ability to have manifest files and incremental linking with make and nmake 2008-01-01 15:13:41 -05:00
Brad King 73704ede42 ENH: Enabled color printing of "Scanning dependencies of target ..." message. 2007-12-19 17:15:41 -05:00
Brad King 9f61e2a235 ENH: Centralized and globalized computation of CMake program locations. This eliminates startup paths that failed to produce this information. 2007-12-13 17:56:50 -05:00
Brad King e684c35295 STYLE: Fixed line-too-long. 2007-10-08 10:05:42 -04:00
Brad King 5df777edd7 COMP: Added inadvertantly removed include. 2007-10-08 10:03:37 -04:00
Brad King 71400cad02 COMP: Simplified include file logic. The windows.h header should be included for all compilers on windows. 2007-10-07 16:22:16 -04:00
Ken Martin adffd10cce COMP: fix to compile on VS 8 2007-10-05 15:51:01 -04:00
Brad King 23c6b90080 BUG: Fix call to SetFileTime to set it on the proper file. 2007-10-05 10:03:16 -04:00
Brad King a2b2742543 ENH: During file installation treat the source file as a dependency of the installed file. Install the file only if the destination is older than the source. Set the file times on the installed file to match those of the source file. This should greatly improve the speed of repeated installations because it removes the comparison of file contents. This addresses bug#3349. 2007-10-05 09:46:28 -04:00
Bill Hoffman 887699184a COMP: remove warnings 2007-09-27 14:44:11 -04:00
Bill Hoffman 9c3ffe2474 BUG: fix problem with stdout and stderr not showing up in ms dos shells 2007-09-25 10:57:49 -04:00
Bill Hoffman 150805258a ENH: add new machines 2007-09-24 13:21:25 -04:00
Bill Hoffman c190756e24 ENH: fix warning 2007-09-17 11:17:38 -04:00
Bill Hoffman 66a094a9eb ENH: opps 2007-09-11 12:23:59 -04:00
Bill Hoffman f262298bb0 ENH: fix 2 ctest issues, do not use the build type of ctest to look for config types, do not inherit pipes in child procs for ctest so it can kill them 2007-09-11 11:21:36 -04:00
Alexander Neundorf f13c3eef83 COMP: patch from Mathieu: fix warning about unused variables in bootstrap
mode

Alex
2007-08-14 10:27:34 -04:00
Bill Hoffman c693a23a7d ENH: use gnu tar for cygwin 2007-07-30 22:51:21 -04:00
Alexander Neundorf e69958c3cf BUG: fix bootstrapping, md5sum disabled in bootstrapping mode
Alex
2007-07-16 15:10:40 -04:00
Alexander Neundorf 5bb94ce166 ENH: apply patch from Mathieu, add argument -E md5sum to compute md5sums of
files, compatible to md5sum output

Alex
2007-07-16 10:54:32 -04:00
Brad King 9bfe711ef1 BUG: Fix ExpandListArgument when the string ends in a backslash. 2007-05-17 11:27:46 -04:00
Brad King e01cdf2065 ENH: Added kwsys SystemTools::CreateSymlink and SystemTools::ReadSymlink. 2007-03-12 13:50:28 -04:00
Brad King 91c2b84a92 ENH: Added ConvertToOutputSlashes method to convert slashes with the same policy as ConvertToOutputPath but without escaping. 2007-03-08 11:49:26 -05:00
Brad King d37577d9e0 STYLE: Removing unused methods ConvertToShellPath and EscapeForUnixShell. 2007-03-08 09:48:17 -05:00