Commit Graph

12874 Commits

Author SHA1 Message Date
Brad King b23b1800a5 ENH: Teach separate_arguments() to parse commands
This adds UNIX_COMMAND and WINDOWS_COMMAND modes to the command.
These modes parse unix- and windows-style command lines.
2009-07-14 10:15:47 -04:00
Brad King 7a907f87f8 STYLE: Factor cmComputeLinkInformation constructor
This factors some code out of the constructor into a new method
cmComputeLinkInformation::LoadImplicitLinkInfo for readability.
2009-07-14 10:14:52 -04:00
Brad King d60608c858 STYLE: Factor CollectOriginalDirectories code
This factors code out of cmOrderDirectories::CollectOriginalDirectories
into cmOrderDirectories::AddOriginalDirectories.  Later a new call will
be added, and this is more readable anyway.
2009-07-14 10:14:41 -04:00
Brad King b44413f9f8 COMP: Shorten ExportImport test command lines
The ExportImport test drives its Export and Import projects using the
same compiler and flags.  This converts the ctest --build-and-test
command lines to use an initial cache file instead of passing all
settings on the command line.

We need a shorter command line to pass through VS 6 on Win98.
This approach reduces duplicate code anyway.
2009-07-14 08:38:24 -04:00
KWSys Robot 4d2dd55b9c STYLE: Nightly Date Stamp 2009-07-14 00:01:10 -04:00
Brad King b3e8fd3e9b BUG: Parse escapes in single-quoted unix arguments
This fixes KWSys's unix-style command-line parsing to interpret
backslash escapes inside single-quoted strings.
2009-07-13 17:35:08 -04:00
Brad King 57e14a4f97 COMP: Include <malloc.h> for 'free' on QNX 2009-07-13 17:08:38 -04:00
Bill Hoffman 11d42b3e8f ENH: almost all tests passing in vs 10, commit fixes preprocess and starts vs external project 2009-07-13 16:58:24 -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 18e639d48a ENH: Provide unix-sytle command line parsing
Add System_Parse_CommandForUnix to the KWSys System interface as a
utility to parse a unix-style command line.  Move the existing
implementation out of ProcessUNIX.  Add a flags argument reserved for
future use in providing additional behavior.
2009-07-13 16:22:14 -04:00
Brad King de6f88d06f ENH: Create Fortran ABI detection framework
This invokes CMakeDetermineCompilerABI.cmake for Fortran at the same
place it is already done for C and CXX.
2009-07-13 11:24:01 -04:00
Brad King a03bb5a28f ENH: Check tarball filename in ep_add
This teaches the ExternalProject module to check the download URL file
name.  If it is not a tarball (.tar, .tgz, .tar.gz) it is an error
because UntarFile does not yet understand other archive formats.
2009-07-13 10:46:32 -04:00
Brad King 87434fc38f BUG: Teach UntarFile to delete dir on error
When tarball extraction fails we should still cleanup the temporary
extraction directory.  Otherwise the next attempt will create a new
directory and the first one will never be removed.
2009-07-13 10:46:20 -04:00
Brad King 82c081ba35 BUG: Fix rpath-link flag for SunPro C++ on Linux
This teaches Modules/Platform/Linux-SunPro-CXX.cmake the -rpath-link flag.  The
SunPro C++ compiler does not have a '-Wl,' option, so we just pass the flag
directly.

This problem was exposed by the ExportImport test now that it links an
executable through the C++ compiler with the -rpath-link flag.
2009-07-13 10:40:15 -04:00
Brad King 61367c69d7 COMP: Fix ExportImport testLib6 on VS6
The compiler does not support multiple source files differing only by
extension in one target.  This renames the C source file in the test.
2009-07-13 09:20:36 -04:00
KWSys Robot 44eeda9a04 STYLE: Nightly Date Stamp 2009-07-13 00:01:04 -04:00
Alexander Neundorf 0429853f1b BUG: disable the test for now, will make it work correctly later
Alex
2009-07-12 14:52:31 -04:00
Alexander Neundorf 7048373296 STYLE: don't load CMakeDetermineSystem and CMakeSystemSpecific directly from
cmCTestScriptHandler, but have it load the new script CTestScriptMode.cmake
-> that makes it more flexible, also add a simple test that the system name
has been determined correctly

Alex
2009-07-12 04:51:51 -04:00
KWSys Robot 2a750cacd6 STYLE: Nightly Date Stamp 2009-07-12 00:01:03 -04:00
Alexander Neundorf 46f99c6565 STYLE: move the code for writing the initial cache into its own separate
function, makes the long ProcessHandler() a little bit shorter

Alex
2009-07-11 16:30:18 -04:00
Alexander Neundorf a605bd5225 STYLE: rename InitCache to InitialCache, since it contains the contents for
the initial cache and is not e.g. a flag which shows whether the cache
should be initialized

Alex
2009-07-11 16:27:28 -04:00
Brad King f888a0efaf ENH: Export and import link interface languages
Now that languages are part of the link interface of a target we need to
export/import the information.  A new IMPORTED_LINK_INTERFACE_LANGUAGES
property and per-config IMPORTED_LINK_INTERFACE_LANGUAGES_<CONFIG>
property specify the information for imported targets.  The export() and
install(EXPORT) commands automatically set the properties.
2009-07-11 10:12:05 -04:00
Brad King 3621e073a8 ENH: Test export/import of link interface languages
This extends the ExportImport test.  The Export project creates a C++
static library and exports it.  Then the Import project links the
library into a C executable.  On most platforms the executable will link
only if the C++ linker is chosen correctly.
2009-07-11 10:10:51 -04:00
Bill Hoffman 28b1912aa3 ENH: add group support and fix borland error 2009-07-11 00:05:20 -04:00
KWSys Robot 2e22b70aa2 STYLE: Nightly Date Stamp 2009-07-11 00:01:04 -04:00
Brad King a232dbe8d2 BUG: Fix Xcode linker language
Xcode does not seem to support direct requests for using the linker for
a particular language.  It always infers the linker using the languages
in the source files.  When no user source files compile with target's
linker language we add one to help Xcode pick the linker.

A typical use case is when a C executable links to a C++ archive.  The
executable has no C++ source files but we need to use the C++ linker.
2009-07-10 16:51:44 -04:00
Brad King bb2228ea1a ENH: Update LINKER_LANGUAGE and HAS_CXX docs
This updates the documentation of these properties to account for the
new automatic linker language computation.
2009-07-10 13:53:48 -04:00
Brad King 22b96543e5 ENH: Test transitive link languages
This test creates a C executable that links to a C++ static library.  On
most platforms the executable will not link unless the C++ linker is
chosen correctly.
2009-07-10 13:53:38 -04:00
Brad King 19792bf30e ENH: Consider link dependencies for link language
This teaches cmTarget to account for the languages compiled into link
dependencies when determining the linker language for its target.

We list the languages compiled into a static archive in its link
interface.  Any target linking to it knows that the runtime libraries
for the static archive's languages must be available at link time.  For
now this affects only the linker language selection, but later it will
allow CMake to automatically list the language runtime libraries.
2009-07-10 13:53:28 -04:00
Brad King ea00bb990b COMP: Fix cmCTestHG for old HP compiler
The compiler does not have a fully compliant std::string.
2009-07-10 13:08:54 -04:00
Bill Hoffman a4dff91c35 ENH: change so rules show up in GUI, must be windows path 2009-07-10 12:26:39 -04:00
Brad King d4d467dbd5 ENH: Teach CTest to handle Mercurial repositories
This creates cmCTestHG to drive CTest Update handling on hg-based work
trees.  Currently we always update to the head of the remote tracking
branch (hg pull), so the nightly start time is ignored for Nightly
builds.  A later change will address this.

See issue #7879.  Patch from Emmanuel Christophe.  I modified the patch
slightly for code style, to finish up some parsing details, and to fix
the test.
2009-07-10 11:08:05 -04:00
Brad King c0e8c0f5aa ENH: New OutputParser::Process() signature
This overload accepts a null-terminated string instead of requiring a
length.  It is useful to pass some fake process output before and after
the real process output.
2009-07-10 11:07:27 -04:00
David Cole f673294a36 COMP: Mask out shadowed declaration warnings that always follow already masked Utilities/cmtar warnings. 2009-07-10 09:53:50 -04:00
Bill Hoffman 5c4208f50e ENH: only 5 failing tests for VS 10 2009-07-10 09:12:39 -04:00
Brad King 3199db4794 STYLE: Nightly Date Stamp 2009-07-10 00:01:06 -04:00
Brad King 5692fa2ecb COMP: More KWSys SharedForward pointer const-ness
This adds another cast to avoid pointer conversion warnings.
Unfortunately C does not recognize implicit conversions that add
cv-qualifiers as well as C++ does.
2009-07-09 14:15:35 -04:00
Brad King d2e94dfc63 STYLE: Nightly Date Stamp 2009-07-09 00:01:04 -04:00
David Cole 02c9633433 COMP: Eliminate "conversion may change sign of result" warnings by using size_t where appropriate. (Missed one warning with last commit: add a cast to md5_word_t.) 2009-07-08 16:18:19 -04:00
David Cole 80d32d96f3 COMP: Eliminate "conversion may change sign of result" warnings by using size_t where appropriate. 2009-07-08 16:15:21 -04:00
Brad King 6028f3a4c7 COMP: Fix KWSys SharedForward sign conversion
This uses size_t where necessary to avoid size_t/int conversion
warnings.
2009-07-08 15:09:16 -04:00
Brad King 4c0bbe3828 COMP: Fix KWSys SharedForward pointer const-ness
This adds const-ness and casts where necessary to avoid pointer
conversion warnings.
2009-07-08 15:09:10 -04:00
David Cole f1b3142a2e COMP: Suppress warnings from the Utilities/cmtar code in dashboard results. 2009-07-08 14:43:43 -04:00
Brad King 99e432508e BUG: Use link language for target name computation
The commit "Do not compute link language for LOCATION" was wrong.  The
variables

  CMAKE_STATIC_LIBRARY_PREFIX_Java
  CMAKE_STATIC_LIBRARY_SUFFIX_Java

are used for building Java .jar files.  This commit re-enables the
feature and documents the variables:

  CMAKE_EXECUTABLE_SUFFIX_<LANG>
  CMAKE_IMPORT_LIBRARY_PREFIX_<LANG>
  CMAKE_IMPORT_LIBRARY_SUFFIX_<LANG>
  CMAKE_SHARED_LIBRARY_PREFIX_<LANG>
  CMAKE_SHARED_LIBRARY_SUFFIX_<LANG>
  CMAKE_SHARED_MODULE_PREFIX_<LANG>
  CMAKE_SHARED_MODULE_SUFFIX_<LANG>
  CMAKE_STATIC_LIBRARY_PREFIX_<LANG>
  CMAKE_STATIC_LIBRARY_SUFFIX_<LANG>

Instead of making separate, repetitive entries for the _<LANG> variable
documentation, we just mention the per-language name in the text of the
platform-wide variable documentation.  Internally we keep undocumented
definitions of these properties to satisfy CMAKE_STRICT mode.
2009-07-08 14:33:08 -04:00
Brad King 173448d988 ENH: Pass config to cmTarget::GetLinkerLanguage
This passes the build configuration to most GetLinkerLanguage calls.  In
the future the linker language will account for targets linked in each
configuration.
2009-07-08 13:04:04 -04:00
Brad King a3a046643a ENH: Pass config to cmTarget RPATH install methods
This passes the build configuration to cmTarget methods IsChrpathUsed
and NeedRelinkBeforeInstall.  Later these methods will use the value.
2009-07-08 13:03:47 -04:00
Brad King 6ef56f7778 ENH: Use fixed header file type mapping for Xcode
This simplifies computation of the lastKnownFileType attribute for
header files in Xcode projects.  We now use a fixed mapping from
header file extension to attribute value.  The value is just a hint to
the Xcode editor, so computing the target linker language is overkill.
2009-07-08 13:03:34 -04:00
Brad King 2b5d97419f ENH: Do not compute link language for LOCATION
The LOCATION property requires the full file name of a target to be
computed.  Previously we computed the linker language for a target to
look up variables such as CMAKE_SHARED_LIBRARY_SUFFIX_<LANG>.  This led
to locating all the source files immediately instead of delaying the
search to generation time.  In the future even more computation will be
needed to get the linker language, so it is better to avoid it.

The _<LANG> versions of these variables are undocumented, not set in any
platform file we provide, and do not produce hits in google.  This
change just removes the unused feature outright.
2009-07-08 13:03:22 -04:00
Brad King 7c67524dfa ENH: Introduce cmTarget::LinkImplementation API
The new method centralizes loops that process raw OriginalLinkLibraries
to extract the link implementation (libraries linked into the target)
for each configuration.  Results are computed on demand and then cached.
This simplifies link interface computation because the default case
trivially copies the link implementation.
2009-07-08 12:04:48 -04:00