Commit Graph

239 Commits

Author SHA1 Message Date
Brad King 28805109bc cmStandardIncludes: Include cmIML/INT.h for portable integer types
Also teach the bootstrap script to configure the needed headers.
2014-02-10 15:31:40 -05:00
Stephen Kelly 23d3d38a31 CMakeLists: Generate the cmCommands.cxx file.
Define the list of commands in the CMakeLists.txt file. List the
sources in the CMakeLib target, but mark them as HEADER_FILE_ONLY.
This has the effect that IDEs will show the files, though they
will not be built again.

Add a cmCommandsForBootstrap.cxx file for bootstrapping purposes.

Rename the cmExportLibraryDependencies file to match the common
pattern.
2014-02-09 22:02:37 +01:00
Rolf Eike Beer b22a0f15de bootstrap: improve ld flag for Linux/HPPA builds
Follow up commit ca63bb10 (bootstrap: try better workaround for builds
on Linux/HPPA, 2013-09-12) with an improved ld flag.

Suggested-by: Guy Martin
2014-01-15 10:06:07 -05:00
Brad King 2ba2c435f6 bootstrap: Add KWSys Encoding and FStream
Run the KWSYS_STL_HAS_WSTRING platform test and configure the result.
Configure the Encoding and FStream header files and build the sources.
On Windows, build EncodingC.c with KWSYS_ENCODING_DEFAULT_CODEPAGE=CP_ACP.
2013-11-25 12:46:09 -05:00
Brad King 993b685676 bootstrap: Parse Copyright.txt instead of duplicating notice
Use 'grep' to extract the copyright notice from Copyright.txt instead of
duplicating it in the bootstrap script.
2013-11-12 16:22:52 -05:00
Brad King 1093deebd0 Shorten CMake version used in install destinations
Since commit c9a5f34b (Cleanup use of CMake version in install
destinations, 2013-09-26) we use the full CMake version in default
install destinations.  For rapidly changing versions of the form

 <major>.<minor>.<patch>.<date>-g<commit>[-dirty]

used by developers this is too granular.  Instead use just

 <major>.<minor>.<patch>

as the version for default install destinations.  This will still
be granular enough for unique directories in releases.

On Cygwin continue to use the full ${CMake_VERSION} as was the case
prior to the above-mentioned commit.
2013-10-25 09:01:37 -04:00
Brad King 6384f1683a Merge topic 'remove-cmake-i-wizard'
a8226e9 cmake: Drop support for "-i" wizard mode
2013-10-22 09:07:14 -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 a8226e91d7 cmake: Drop support for "-i" wizard mode
Tell users to pass cache values with the -D option on the command line
or use cmake-gui or ccmake.
2013-10-18 13:32:39 -04:00
Brad King bfe07aa97e Build Help documentation during CMake build using Sphinx
Add a Utilities/Sphinx directory to hold CMake build code to run the
Sphinx (sphinx-doc.org) documentation generation tool.  Create a
CMakeLists.txt file there capable of building either as a subdirectory
of the main CMake build, or as a standalone documentation build.

Add cache options SPHINX_MAN and SPHINX_HTML to select output formats
and SPHINX_EXECUTABLE to specify the sphinx-build executable.  Add
bootstrap options --sphix-man and --sphinx-html to select output formats
and --sphinx-build=<sb> to specify the sphinx-build executable.

Create a "conf.py.in" file to configure_file into "conf.py" to tell
sphinx-build how to build our documents.  Create a "cmake.py" Sphinx
extension module defining:

* The "cmake-module" directive used in Help/module/*.rst files to
  scan .rst markup from the corresponding Modules/*.cmake file.

* A Sphinx domain called "cmake" defining documentation object types
  for CMake Help/<type> directories: command, generator, manual,
  module, policy, prop_*, and variable.  Add a "role" for each type
  to perform cross-references.  Teach the roles to treat "<XYZ>"
  as placeholders instead of explicit targets if not preceded by
  a space.  Add cmake domain directives to define command and
  variable objects explicitly in .rst file content.  This will
  allow modules to define their own commands and variables and
  have them indexed and linkable.

* A Sphinx document transform that converts Help/<type>/*.rst documents
  into cmake domain objects of the corresponding <type> and adds index
  entries for them.  This will automatically index all CMake documentation
  objects and provide cross-reference targets for them with no special
  markup in the .rst files.
2013-10-16 09:22:37 -04:00
Brad King 399e9c46d8 Drop builtin property documentation
Drop all DefineProperty calls for non-chained properties.  Drop the
documentation from the chained ones.  The documentation for all
properties is now in Help/prop_*/*.rst files.
2013-10-16 09:22:36 -04:00
Brad King 80a3273b5e Drop all documentation formatters except Usage
We now need only the Usage formatter to support command-line options
that print basic usage, and the supporting indented=>preformatted markup
processor to support CMake message formatting.  Drop all other
documentation formatters and move the remaining code up into the top
cmDocumentationFormatter class.
2013-10-16 09:22:35 -04:00
Brad King c9a5f34bd7 Cleanup use of CMake version in install destinations
Factor the CMAKE_DATA_DIR, CMAKE_DOC_DIR, and CMAKE_MAN_DIR selection
out of CMakeLists.txt and into a Source/CMakeInstallDestinations.cmake
script.  Load the script from the original location of the code.

Cache the destination values as empty strings so we know if the user
sets them explicitly.  If not, then compute defaults based on the
platform and full CMake version string.  By not caching the versioned
defaults, we can change them in a single build tree as the version
changes.

Remove duplication of the install destination defaults from the
bootstrap script.  Cache empty defaults there too.  Parse from the CMake
code the default values to report in the help output.  Keep the CMake
code in a structured format to make this reliable.
2013-10-15 10:46:54 -04:00
Brad King 82578d995a bootstrap: Report -rc# in --version output 2013-10-15 10:46:53 -04:00
Brad King c04995b46e cmake: Split -E command implementation into separate source file
Move the cmake::ExecuteCMakeCommand static method and all the static
methods it calls out of the 'cmake' class to a separate 'cmcmd' class.
Build the latter as part of the main cmake executable with cmakemain.cxx
and not in CMakeLib.  Drop unused header includes from "cmake.cxx".

By moving this implementation out of cmake.cxx we avoid carrying it
around in all the executables that use class 'cmake'.  It is needed only
for the main "cmake -E" functionality.
2013-10-03 17:30:28 -04:00
Rolf Eike Beer ca63bb1001 bootstrap: try better workaround for builds on Linux/HPPA
The workaround currently present works fine without -O or with -O1, but fails
with -Os or -O2 and higher. Using -O2 is common e.g. in Gentoo, as resulting in
bugs like this:

https://bugs.gentoo.org/473276

Prevent the workaround for higher optimization levels to make bootstrapping
more likely to succeed.

This is still a workaround as ld still keeps crashing in some situations.
2013-09-12 20:59:11 +02:00
Brad King df62f64db7 Clean up install rules of CMake itself (#14371)
Ensure CMAKE_DATA_DIR, CMAKE_DOC_DIR, and CMAKE_MAN_DIR are always
relative paths in CMake code, and set defaults accordingly.  Use the
install() command instead of install_files() and install_targets().
This is more modern and also avoids stripping of the first character
from user-specified destinations.

While at it, fix the default destinations reported in the bootstrap
help.
2013-08-26 11:54:07 -04:00
Brad King bf5a5bc8b4 bootstrap: Do not suppress CMAKE_OSX_SYSROOT if CFLAGS have -isysroot (#14324)
Revert commit a1c032b9 (bootstrap: Suppress CMAKE_OSX_SYSROOT if CFLAGS
have -isysroot, 2012-09-21).  If MACOSX_DEPLOYMENT_TARGET is set then
CMAKE_OSX_DEPLOYMENT_TARGET will be set and Darwin.cmake will complain
if no CMAKE_OSX_SYSROOT is set.  Just allow both -isysroot flags to
appear.  The one generated by CMAKE_OSX_SYSROOT appears after and
overrides the one from CFLAGS/CXXFLAGS.
2013-08-02 16:01:01 -04:00
Brad King b9f4383f69 Split cmBootstrapCommands.cxx into two sources
The single translation unit has grown too large for some compilers.
Split it into cmBootstrapCommands1.cxx and cmBootstrapCommands2.cxx.
2013-06-14 08:35:52 -04:00
Brad King 9d38db531d bootstrap: Compile KWSys SystemTools with UTIME(S|NSAT) values
The parent commit merged a change to KWSys that adds preprocessor
definitions for KWSYS_CXX_HAS_UTIMENSAT and KWSYS_CXX_HAS_UTIMES to the
command line for compiling SystemTools.  For bootstrapping we do not
need sub-1s timestamps so just define them to 0 for now.
2013-06-03 10:36:00 -04:00
Stephen Kelly 1c0597c25b Add a new Export generator for IMPORTED targets.
This is to be used during try_compile using LINK_LIBRARIES in the
srcfile signature and, in the future, TARGETS in the binary dir
signature.
2013-02-22 08:35:38 -05:00
Rolf Eike Beer ed96d9a605 bootstrap: use better defaults for Haiku
These values are patched into that file by Haiku since 2.8.1.
2013-01-07 21:09:18 +01:00
Brad King 2c24ca9219 Remove references to KWSys Process Win9x support
The KWSys "EncodeExecutable" and "ProcessFwd9x" executables were dropped
from KWSys along with Win9x Process support.  Drop references from the
rest of the CMake build rules.
2012-12-19 09:07:41 -05:00
Brad King 43d3a6d49e Merge topic 'copyright-year'
a4ae88b Update programmatically-reported copyright year (#13638)
2012-11-06 14:13:05 -05:00
Brad King a4ae88bdb2 Update programmatically-reported copyright year (#13638)
Update the copyright year reported by 'bootstrap' and in the generated
documentation to report 2012.
2012-11-05 08:44:03 -05:00
Rolf Eike Beer e496c54021 Linux/PA-RISC: Link with --unique=.text.* to help binutils
There is a binutils bug that leads to errors like this:

/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.6.3/../../../../hppa2.0-unknown-linux-gnu/bin/ld: libCMakeLib.a(cmTarget.cxx.o)(.text+0x12084): cannot reach 00001d28__ZNSspLEPKc@@GLIBCXX_3.4+0, recompile with -ffunction-sections
/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.6.3/../../../../hppa2.0-unknown-linux-gnu/bin/ld: libCMakeLib.a(cmTarget.cxx.o)(.text+0x12084): cannot handle R_PARISC_PCREL17F for std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator+=(char const*)@@GLIBCXX_3.4
/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.6.3/../../../../hppa2.0-unknown-linux-gnu/bin/ld: final link failed: Bad value

Until someone finds out what needs to be fixed in binutils this allows anyone
to compile a working CMake even in debug mode.
2012-10-31 16:28:51 -04:00
Brad King 49c7b649f9 Merge topic 'export-sets'
80112da Merge topic 'AutomocUseTargetProperties' into export-sets
955b966 exports: add a test for exporting dependent targets
6f50a04 exports: define a CMAKE_FIND_PACKAGE_NAME var set by find_package()
0cfd055 exports: move the handling of missing targets into subclasses
190f2c8 exports: fix build with MSVC6
8b5f448 exports: first try at error handling if a target is missing
87f4c01 exports: accept a missing target if it is exported exactly once
999061a exports: store pointers to all installations of each export set
64b3a6c exports: cmGlobalGenerator::ExportSets destructor will clear it
81cdab5 exports: Hold an ExportSet pointer in cm*Export*Generator
5c898fb exports: Add cmExportSetMap class
d13ec1a exports: Create class cmExportSet
4e2347c exports: Rename cmGlobalGenerator::AddTargetToExport{s,}
e846e70 exports: Remove cmTargetExport constructor
81c66c8 exports: Move cmTargetExport to a dedicated header file
ae4ab62 find_package: add support for a <package>_NOT_FOUND_MESSAGE variable
...
2012-10-01 14:05:35 -04:00
Alex Neundorf 80112da54e Merge topic 'AutomocUseTargetProperties' into export-sets
Conflicts:
	Source/cmGlobalGenerator.h
2012-09-30 10:27:44 -04:00
Brad King 103d99338a Merge topic 'generator-expression-target-properties'
083de7e Process generator expressions in the COMPILE_DEFINITIONS target property.
08cb4fa Process generator expressions in the INCLUDE_DIRECTORIES property.
0ef091d Early return if there is no target.
eb250cd Add a self-reference check for target properties.
7e80747 Add API to check that dependent target properties form a DAG.
239ac84 Add a generator expression for target properties.
e028381 Extend the generator expression language with more logic.
b8e61d6 Refactor GetCompileDefinitions a bit.
2c2b25b Return a std::string from GetCompileDefinitions.
b7e48e0 Add an AppendDefines std::string overload.
9a16087 Convert paths in INCLUDE_DIRECTORIES property to Unix slashes.
4557c8d Don't prepend a path before generator expressions in include_directories.
c6abc41 Add include guard for cmGeneratorExpression.
0ff4e3f Port remaining code to GetCompileDefinitions().
f178d53 Fix indentation in the code blocks generator.
2012-09-28 17:15:03 -04:00
Yury G. Kudryashov 5c898fbd99 exports: Add cmExportSetMap class
This is a map<string, cmExportSet *> with overloaded operator[] and destructor.
2012-09-28 09:21:39 -04:00
Yury G. Kudryashov d13ec1ac31 exports: Create class cmExportSet
Replace direct use of 'std::vector<cmTargetExport const*>' with a
dedicated class.
2012-09-28 09:21:39 -04:00
Stephen Kelly 7e807472d2 Add API to check that dependent target properties form a DAG.
Initially this will only be used to check for self-references, but
can be extended to check for cycles when chaining properties of other
targets.
2012-09-28 08:49:21 -04:00
Brad King a1c032b994 bootstrap: Suppress CMAKE_OSX_SYSROOT if CFLAGS have -isysroot
In order to bootstrap on OS X with Xcode without the command line tools
one must add -isysroot to CFLAGS and CXXFLAGS.  In this case the flags
will make it into the configured CMake.  Set CMAKE_OSX_SYSROOT to empty
in the initial cache to prevent CMake from adding -isysroot again.
2012-09-21 10:06:00 -04:00
Stephen Kelly f1eacf0e07 cmGeneratorExpression: Re-write for multi-stage evaluation
The expressions may be parsed and then cached and evaluated multiple
times.  They are evaluated lazily so that literals such as ',' can be
treated as universal parameter separators, and can be processed from
results without appearing literally, and without interfering with the
parsing/evaluation of the entire expression.
2012-09-18 17:02:23 -04:00
Brad King 7195aca54f Make platform information files specific to the CMake version
At the top of a build tree we configure inside the CMakeFiles directory
files such as "CMakeSystem.cmake" and "CMake<lang>Compiler.cmake" to
save information detected about the system and compilers in use.  The
method of detection and the exact results store varies across CMake
versions as things improve.  This leads to problems when loading files
configured by a different version of CMake.  Previously we ignored such
existing files only if the major.minor part of the CMake version
component changed, and depended on the CMakeCache.txt to tell us the
last version of CMake that wrote the files.  This led to problems if the
user deletes the CMakeCache.txt or we add required information to the
files in a patch-level release of CMake (still a "feature point" release
by modern CMake versioning convention).

Ensure that we always have version-consistent platform information files
by storing them in a subdirectory named with the CMake version.  Every
version of CMake will do its own system and compiler identification
checks even when a build tree has already been configured by another
version of CMake.  Stored results will not clobber those from other
versions of CMake which may be run again on the same tree in the future.
Loaded results will match what the system and language modules expect.

Rename the undocumented variable CMAKE_PLATFORM_ROOT_BIN to
CMAKE_PLATFORM_INFO_DIR to clarify its purpose.  The new variable points
at the version-specific directory while the old variable did not.
2012-08-24 10:52:23 -04:00
Kitware Robot 77543bde41 Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code:

cmake --help-command-list |
grep -v "cmake version" |
while read c; do
    echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Peter Kümmel 9f7dc83917 Ninja: also bootstrap ninja files 2012-07-20 11:08:36 +02:00
Nicolas Despres a1b803349b Re-factor OS X bundle and framework generation. 2012-07-17 14:03:07 +02:00
Nicolas Despres 3ba74ad9d5 Remove trailing white-spaces. 2012-07-17 14:03:06 +02:00
David Cole 73cb20187c Merge topic 'bootstrap-old-sh'
e5dc768 bootstrap: Port back to old shells (#13199)
2012-05-29 15:36:47 -04:00
Brad King e5dc76894a bootstrap: Port back to old shells (#13199)
Since commit f39e82c9 (bootstrap: Re-implement command line option
processing, 2011-12-16) bootstrap uses POSIX shell expressions of the
form "${x#y}" to remove prefix pattern 'y' from the vaule of 'x'.
Although this is allowed by POSIX old shells on some platforms do not
support it.  Revert to using 'sed' to work with old shells.
2012-05-08 09:52:39 -04:00
Brad King e48796b26b KWSys: Fix SystemTools environment memory handling (#13156)
The SystemTools::PutEnv function tries to provide the "putenv" API
without leaking memory.  However, the kwsysDeletingCharVector singleton
frees memory that may still be referenced by the environment table,
having been placed there by putenv.  If any static destruction or
processing by an external tool happens after the singleton is destroyed
and accesses the environment it will read invalid memory.

Replace use of putenv with setenv/unsetenv when available.  The latter
manage internal copies of the values passed instead of referencing the
original memory.  When setenv/unsetenv are not available use putenv with
a singleton that removes its values from the environment before freeing
their memory.  This requires an "unputenv" implementation.  On at least
some platforms it must be written in terms of "putenv" because other
APIs are not available and direct modification of the "environ" global
is not safe (e.g. on Windows there is interaction with "wenviron").
Fortunately either putenv("A=") or putenv("A") will remove "A" from the
environment on these platforms.  On other platforms fall back to direct
manipulation of "environ".

Also add UnPutEnv to the API and add a test for the behavior of both.
2012-04-27 08:13:52 -04:00
Brad King 0c7029c642 Refactor CMake version handling
Move the CMake version number components out of "CMakeLists.txt" into
dedicated file "Source/CMakeVersion.cmake".  Set the TWEAK level to the
date explicitly.  Add a "Source/CMakeVersion.bash" script to update the
date, thus replacing KWSys DateStamp for CMake.  Teach the bootstrap
script to extract the version components from their new location.
2012-04-20 11:25:55 -04:00
Brad King 11d9b21126 Add cmGeneratorTarget to represent a target during generation
Some per-target information and logic is common to all generators.
Some of that information is currently stored in cmTarget but that
should be reserved for the configure step.  Create a class to hold
per-target information for generators.  On construction classify
sources from the target and store them in separate members.  This
classification is already implemented separately in each generator.
2012-03-09 15:16:02 -05:00
Brad King 5cd879c4e7 bootstrap: Convert MSYS paths to Windows format (#13001)
We set CMAKE_PREFIX_PATH from the --prefix= option.  The calling shell
might not translate "/c/..." to "c:/..." paths but we need to store
Windows paths in CMake cache variables.  Pass the specified path through
the MSYS shell in a form it will convert to a Windows path using the
MSYS fstab.

Some MSYS bash implementations leave trailing space on the command line
to 'cmd /c echo ...' after quoting the message.  The Windows echo tool
preserves both the quotes and the trailing space.  Use a sed expression
that strips quotes and trailing spaces after the end quote.
2012-03-01 10:09:05 -05:00
Brad King c19868b256 bootstrap: Forward options after '--' to cmake
Provide an interface simpler than --init= to set cache values during
bootstrap builds.  For example:

 ./bootstrap --system-zlib -- -DZLIB_ROOT=/opt/zlib

will configure CMake with a system zlib library and initialize ZLIB_ROOT
in the cache for use by FindZLIB.
2011-12-16 11:33:24 -05:00
Brad King f39e82c9d5 bootstrap: Re-implement command line option processing
Use POSIX shell features to shorten and simplify bootstrap command-line
option processing.
2011-12-16 11:32:45 -05:00
Brad King dbf05f75c3 bootstrap: Update copyright year in version report 2011-12-16 09:43:39 -05:00
Brad King be6502c502 bootstrap: Include cmNewLineStyle in build
The cmNewLineStyle class is needed by cmMakefile.
2011-11-29 07:56:28 -05:00
Sean McBride 0037dcb6af Removed most usage of Carbon in favour of CoreFoundation 2011-01-31 18:21:20 -05:00
Nicolas Despres 3cba29d220 bootstrap: Add --enable-ccache option (#11707)
This option tells bootstrap to hand CMake

  CC="ccache $CC"
  CXX="ccache $CXX"

so that the CMake build tree after bootstrapping uses ccache.
2011-01-17 08:57:38 -05:00
Brad King 144a82ca7e bootstrap: --verbose implies verbose Makefiles (#11708)
Suggested-by: Nicolas Despres <nicolas.despres@gmail.com>
2011-01-17 08:44:04 -05:00
Brad King bace6500a3 bootstrap: Clarify --init flag documentation (#11431) 2011-01-10 09:38:42 -05:00
Brad King 60d72b56ed bootstrap: Granular system library selection (#11431)
This adds the ability for packagers to specify that some libraries
should use system versions and others should use the CMake versions.

This allows a bit of flexibility and means Homebrew (an OSX package
manager) no longer has to continue to patch the CMake build process.

Inspired-by: Mike McQuaid <mike@mikemcquaid.com>
2011-01-10 09:32:09 -05:00
Brad King 542b517449 Factor out common custom command generator
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.
2010-12-08 17:29:20 -05:00
Brad King c7aa38ff39 bootstrap: Honor CFLAGS during "make" test (#10545) 2010-09-10 11:39:43 -04:00
Brad King 2ad2c2d7a5 bootstrap: Detect known C/C++ compiler toolchains
Look for a C/C++ compiler pair from known toolchains on some platforms.
This makes it less likely that mismatched compilers will be found.
Check only if the environment variables CC and CXX are both empty.
2010-06-30 10:50:28 -04:00
Brad King f20d091a2c Tru64: Place cmOStringStream vtable uniquely (#10541)
GCC places the vtable in the object implementing the first non-pure,
non-inline virtual method.  Since the symbol is not weak on Tru64, make
the location unique by putting the destructor in a single object file.
2010-06-10 15:22:40 -04:00
Brad King 5bfffd6f29 New version scheme to support branchy workflow
Prepare to switch to the workflow described by "git help workflows".  In
this workflow, the "master" branch is always used to integrate topics
ready for release.  Brand new work merges into a "next" branch instead.
We need a new versioning scheme to work this way because the version on
"master" must always increase.

We no longer use an even/odd minor number to distinguish releases from
development versions.  Since we still support cvs checkout of our source
tree we cannot depend on "git describe" to compute a version number
based on the history graph.  We can use the CCYYMMDD nightly date stamp
to get a monotonically increasing version component.

The new version format is "major.minor.patch.(tweak|date)".  Releases
use a tweak level in the half-open range [0,20000000), which is smaller
than any current or future date.  For tweak=0 we do not show the tweak
component, leaving the format "major.minor.patch" for most releases.
Development versions use date=CCYYMMDD for the tweak level.  The
major.minor.patch part of development versions on "master" always
matches the most recent release.

For example, a first-parent traversal of "master" might see

        v2.8.1      2.8.1.20100422    v2.8.2
           |              |              |
  ----o----o----o----o----o----o----o----o----

Since the date appears in the tweak component, the next release can
increment the patch level (or any more significant component) to be
greater than any version leading to it.  Topic branches not ready for
release are published only on "next" so we know that all versions on
master lead between two releases.
2010-04-23 09:44:23 -04:00
Bill Hoffman 78d505031f Fix for bug #10544, make check was sent to the wrong log file 2010-04-13 09:28:16 -04:00
Bill Hoffman 21a59bdc4d Fix double bootstrap build for in source builds 2009-11-10 08:09:54 -05:00
Brad King f40406ed6b Fix default install prefix on Haiku
Since Haiku does not have /usr (and therefore /usr/local), this commit
changes the default install prefix to the equivalent directory of
/boot/common.

See issue #9607.
2009-09-30 08:31:53 -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 28531d1707 Simplify bootstrap script source dir detection
This teaches the bootstrap shell script to detect the CMake source
directory from which it is executed using a simpler idiom.
2009-09-25 10:48:24 -04:00
Bill Hoffman 25cf2f4352 Make sure KWSYS_DO_NOT_CLEAN_PUTENV is defined at bootstrap time for cmake in the bootstrap script. 2009-09-22 16:12:40 -04:00
Brad King c2ee27c535 Test KWSYS_IOS_HAVE_BINARY during bootstrap
We need to do this KWSys configuration test in the CMake bootstrap
script to create a proper cmsys/Configure.hxx file.  This fixes the
bootstrap script which was broken by the addition of the test to KWSys.
2009-08-31 13:25:40 -04:00
Brad King d2e1f2b4d6 Introduce "generator expressions" to add_test()
This introduces a new syntax called "generator expressions" to the test
COMMAND option of the add_test(NAME) command mode.  These expressions
have a syntax like $<TARGET_FILE:mytarget> and are evaluated during
build system generation.  This syntax allows per-configuration target
output files to be referenced in test commands and arguments.
2009-08-11 09:54:56 -04:00
Brad King fd10589995 ENH: Improve dynamic variable scope implementation
Previously each new variable scope (subdirectory or function call) in
the CMake language created a complete copy of the key->value definition
map.  This avoids the copy using transitive lookups up the scope stack.
Results of queries answered by parents are stored locally to maintain
locality of reference.

The class cmDefinitions replaces cmMakefile::DefinitionsMap, and is
aware of its enclosing scope.  Each scope stores only the definitions
set (or unset!) inside it relative to the enclosing scope.
2009-07-22 14:22:45 -04:00
Brad King 7797237629 BUG: Fix bootstrap for Debian Almquist Shell
The Debian Almquist Shell (dash) provides minimal POSIX compliance
instead of the power of bash.  It converts literal '\n' to a real
newline even in a single-quoted string.  This works around the problem
by avoiding the literal.  We can no longer use HEREDOC.
2009-06-10 13:39:40 -04:00
Brad King 653262ef17 ENH: Make bootstrap script work on VMS bash
A few sweeping changes were needed:

  - Avoid use of HEREDOC, which does not seem to work.
  - Avoid extra '.' in paths by using '_cmk' and '_tmp'
    instead of '.cmk' and '.tmp'.
2009-06-10 13:04:25 -04:00
Brad King 776e21d1c7 COMP: Avoid String.c inclusion by Compaq templates
The Compaq compiler (on VMS) includes 'String.c' in source files that
use the stl string while looking for template definitions.  This was the
true cause of double-inclusion of the 'kwsysPrivate.h' header.  We work
around the problem by conditionally compiling the entire source file on
a condition only true when really building the source.
2009-06-10 11:46:06 -04:00
Brad King a6bc1c34b1 ENH: Auto-import symbols for cygwin executables
This enables the --enable-auto-import linker flag on Cygwin when linking
executables.  It works with the old gcc 3.x compiler and is necessary
for the new gcc 4.x compiler.  See issue #9071.
2009-05-27 11:33:37 -04:00
Brad King 66d69f864a ENH: Refactor generation of CTestTestfile content
This moves code which generates ADD_TEST and SET_TESTS_PROPERTIES calls
into CTestTestfile.cmake files out of cmLocalGenerator and into a
cmTestGenerator class.  This will allow more advanced generation without
cluttering cmLocalGenerator.  The cmTestGenerator class derives from
cmScriptGenerator to get support for per-configuration script
generation (not yet enabled).
2009-03-16 10:40:46 -04:00
Brad King e67f5138b8 ENH: Refactor cmInstallGenerator for re-use
A new cmScriptGenerator base class factors out the non-install-specific
part of cmInstallGenerator.  This will be useful for other generators
that want per-configuration functionality.
2009-03-16 10:39:56 -04:00
Brad King 98c51ff6dc ENH: Overhaul CMake version numbering
This moves the version numbers into an isolated configured header so
that not all of CMake needs to rebuild when the version changes.

Previously we had spaces, dashes and/or the word 'patch' randomly chosen
before the patch number.  Now we always report version numbers in the
traditional format "<major>.<minor>.<patch>[-rc<rc>]".

We still use odd minor numbers for development versions.  Now we also
use the CCYYMMDD date as the patch number of development versions, thus
allowing tests for exact CMake versions.
2009-03-05 15:17:07 -05:00
Bill Hoffman 64fc597de2 ENH: add initial support for HAIKU OS from bug# 7425 2008-09-15 17:53:28 -04:00
Brad King 22f12322bb COMP: Fix bootstrap build after using cmDocumentationFormatterText in cmMakefile. 2008-03-07 16:26:29 -05:00
Ken Martin d49ef18f8a ENH: add first cut and policies still need to add the doc support 2008-03-01 15:20:35 -05:00
Brad King fd37a6ec3d ENH: Better linker search path computation.
- Use linker search path -L.. -lfoo for lib w/out soname
    when platform sets CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME
  - Rename cmOrderRuntimeDirectories to cmOrderDirectories
    and generalize it for both soname constraints and link
    library constraints
  - Use cmOrderDirectories to order -L directories based
    on all needed constraints
  - Avoid processing implicit link directories
  - For CMAKE_OLD_LINK_PATHS add constraints from libs
    producing them to produce old ordering
2008-02-21 11:41:11 -05:00
Bill Hoffman 22927ede1e ENH: support for cpack and install of cmake-gui as mac app bundle 2008-02-16 13:05:03 -05:00
Brad King ad95a57509 ENH: Add option to bootstrap script to enable Qt dialog.
- Add --qt-gui and --no-qt-gui options
  - Add --qt-qmake=<qmake> option to help locate Qt
  - Build more commands during bootstrap to help FindQt4.cmake:
    MATH, GET_DIRECTORY_PROPERTY, EXECUTE_PROCESS,
    SEPARATE_ARGUMENTS
  - Bootstrapping with the cmake-gui is now possible in MSys
2008-02-13 14:47:03 -05:00
Brad King 4987e17f46 ENH: Improve link line generation for static library cycles.
- Move Tarjan algorithm from cmComputeTargetDepends
    into its own class cmComputeComponentGraph
  - Use cmComputeComponentGraph to identify the component DAG
    of link dependencies in cmComputeLinkDepends
  - Emit non-trivial component members more than once but always
    in a contiguous group on the link line
2008-02-07 16:14:05 -05:00
Brad King 523ddedac5 ENH: Analyze inter-target dependencies to safely fix cycles
- Cycles may be formed among static libraries
  - Native build system should not have cycles in target deps
  - Create cmComputeTargetDepends to analyze dependencies
  - Identify conneced components and use them to fix deps
  - Diagnose cycles containing non-STATIC targets
  - Add debug mode property GLOBAL_DEPENDS_DEBUG_MODE
  - Use results in cmGlobalGenerator as target direct depends
2008-02-05 23:10:41 -05:00
Brad King 82fcaebe28 ENH: Pass dependent library search path to linker on some platforms.
- Move runtime path ordering out of cmComputeLinkInformation
    into its own class cmOrderRuntimeDirectories.
  - Create an instance of cmOrderRuntimeDirectories for runtime
    path ordering and another instance for dependent library
    path ordering.
  - Replace CMAKE_DEPENDENT_SHARED_LIBRARY_MODE with explicit
    CMAKE_LINK_DEPENDENT_LIBRARY_FILES boolean.
  - Create CMAKE_LINK_DEPENDENT_LIBRARY_DIRS boolean.
  - Create variables to specify -rpath-link flags:
      CMAKE_SHARED_LIBRARY_RPATH_LINK_<LANG>_FLAG
      CMAKE_EXECUTABLE_RPATH_LINK_<LANG>_FLAG
  - Enable -rpath-link flag on Linux and QNX.
  - Documentation and error message updates
2008-02-01 08:56:00 -05:00
Brad King 8f97980615 COMP: Use kwsys to get STL set_intersection algorithm. 2008-01-27 15:09:58 -05:00
Brad King 99b97dece8 ENH: Created cmComputeLinkDepends to compute link dependencies.
- This will be useful for imported library dependencies
  - Replaces old cmTarget analyze-lib-depends stuff for linking
  - Formalizes graph construction and dump
  - Explicitly represents dependency inferral sets
  - Use BFS of initial dependencies to preserve order
2008-01-27 13:42:49 -05:00
Brad King 02c3b71b2f BUG: Do not have variable and function of the same name. Old shells do not likeit. 2008-01-23 17:43:08 -05:00
Brad King 96fd5909d9 ENH: Implement linking with paths to library files instead of -L and -l separation. See bug #3832
- This is purely an implementation improvement.  No interface has changed.
  - Create cmComputeLinkInformation class
  - Move and re-implement logic from:
      cmLocalGenerator::ComputeLinkInformation
      cmOrderLinkDirectories
  - Link libraries to targets with their full path (if it is known)
  - Dirs specified with link_directories command still added with -L
  - Make link type specific to library names without paths
    (name libfoo.a without path becomes -Wl,-Bstatic -lfoo)
  - Make directory ordering specific to a runtime path computation feature
    (look for conflicting SONAMEs instead of library names)
  - Implement proper rpath support on HP-UX and AIX.
2008-01-22 09:13:04 -05:00
Brad King c6a7d55127 COMP: The find_package command needs more of kwsys. Added String.h, String.c, and auto_ptr.hxx to bootstrapping kwsys. 2008-01-17 10:35:32 -05:00
Brad King 0ea6a8d1a4 ENH: Simplified CMake version information using KWSys DateStamp feature. Reduced duplicate code in bootstrap script. 2007-11-14 21:17:53 -05:00
Bill Hoffman d88b30a742 ENH: add new file 2007-10-18 09:39:02 -04:00
Brad King 35936433e1 ENH: Merging changes from branch CMake-SourceFile2-b between tags
CMake-SourceFile2-bp and CMake-SourceFile2-b-mp1 to trunk.  This
commit is surrounded by tags CMake-SourceFile2-b-mp1-pre and
CMake-SourceFile2-b-mp1-post on the trunk.

The changes re-implement cmSourceFile and the use of it to allow
instances to be created much earlier.  The use of cmSourceFileLocation
allows locating a source file referenced by a user to be much simpler
and more robust.  The two SetName methods are no longer needed so some
duplicate code has been removed.  The strange "SourceName" stuff is
gone.  Code that created cmSourceFile instances on the stack and then
sent them to cmMakefile::AddSource has been simplified and converted
to getting cmSourceFile instances from cmMakefile.  The CPluginAPI has
preserved the old API through a compatibility interface.

Source lists are gone.  Targets now get real instances of cmSourceFile
right away instead of storing a list of strings until the final pass.

TraceVSDependencies has been re-written to avoid the use of
SourceName.  It is now called TraceDependencies since it is not just
for VS.  It is now implemented with a helper object which makes the
code simpler.
2007-06-18 11:59:23 -04:00
Andy Cedilnik 310ca5795a ENH: Fix copyright year 2007-04-04 13:41:12 -04:00
Ken Martin 21d9f9a8f1 COMP: fix bootstrap maybe 2006-12-07 10:48:11 -05:00
Bill Hoffman 0c381a2ce8 ENH: fix bootstrap for mac 2006-12-05 08:47:06 -05:00
Bill Hoffman 3a32cec969 ENH: merge in changes for beos support 2006-12-04 17:26:41 -05:00
Bill Hoffman b56a60d01e ENH: fix errors for unix builds 2006-11-29 17:45:55 -05:00
Brad King 6ff05e3946 ENH: Adding option to use system-installed third-party libraries. This addresses bug#3653. 2006-10-19 15:17:58 -04:00
Brad King 6c19d3a862 ENH: Renamed kwsysPlatformCxxTests to kwsysPlatformTests and generalized it for multiple language tests (C and CXX). 2006-10-04 17:24:36 -04:00
Brad King f0050269ea ENH: Added System component of kwsys. 2006-09-21 13:47:54 -04:00