Commit Graph

70 Commits

Author SHA1 Message Date
Brad King d7d71ebda3 Fix case typo in CMAKE_BUILD_TYPE docs (#12148)
Reported-by: Stephen Kelly <steveire@gmail.com>
2011-05-03 12:49:41 -04:00
Brad King 1c3233a850 Merge topic 'include-flags-response-file'
86cb17b Pass include directories with response files to GNU on Windows
9a0b9bc Optionally pass include directories with response files
6e8a67f Generate target-wide flags before individual build rules
d099546 Factor old-style -D flags out from -I flag generation
2011-03-22 14:45:44 -04:00
Brad King 9a0b9bc8b7 Optionally pass include directories with response files
Create platform option CMAKE_<lang>_USE_RESPONSE_FILE_FOR_INCLUDES to
enable use of response files for passing the list of include directories
to compiler command lines.
2011-03-17 17:56:13 -04:00
Brad King 6250c7324f Merge topic 'fix-2828-more-info-in-script-mode'
a58ace6 Fix KWStyle line-too-long complaint (#2828)
106958c Add CMAKE_ARGC and CMAKE_ARGV0..N-1 variables (#2828)
94d1684 Add CMAKE_SCRIPT_MODE_FILE variable (#2828)
2011-02-22 14:32:48 -05:00
Brad King 5cdd05bc68 Fix documentation of MSVC_VERSION (#11833)
Previously the example version number was wrong.  Instead list all the
known versions with correct numbers.
2011-02-10 08:20:33 -05:00
David Cole 106958c047 Add CMAKE_ARGC and CMAKE_ARGV0..N-1 variables (#2828)
For now, these variables are only available in -P script mode.
2011-02-02 21:19:01 -05:00
David Cole 94d1684a8f Add CMAKE_SCRIPT_MODE_FILE variable (#2828)
New CMake variable is set when processing a -P script file,
but not when configuring a project.
2011-02-02 18:18:14 -05:00
Brad King 7f37eac6dd Merge topic 'outdir-CMAKE_USER_MAKE_RULES_OVERRIDE'
5792d3a Always place try_compile executables predictably (#11724)
a5300f1 Clarify CMAKE_USER_MAKE_RULES_OVERRIDE documentation (#11724)
2011-01-26 15:24:44 -05:00
Brad King a5300f1d45 Clarify CMAKE_USER_MAKE_RULES_OVERRIDE documentation (#11724)
This variable was introduced to help authors override CMake's default
platform information before any of it is cached.  State this clearly in
the documentation.  Explicitly discourage use for other purposes.
2011-01-20 07:35:00 -05:00
Brad King 052c2ae1aa Document CMAKE_TRY_COMPILE_CONFIGURATION variable
Also reference it from try_compile and try_run since it affects those
commands.
2011-01-17 17:23:15 -05:00
Brad King a364daf1fd Allow users to specify defaults for unset policies
Check CMAKE_POLICY_DEFAULT_CMP<NNNN> for a default when policy CMP<NNNN>
would otherwise be left unset.  This allows users to set policies on the
command line when the project does not set them.  One may do this to
quiet warnings or test whether a project will build with new behavior
without modifying code.  There may also be cases when users want to
build an existing project release using new behavior for policies
unknown to the project at the time of the release.
2011-01-04 07:46:10 -05:00
Brad King 34e1ac2489 Create Fortran info variables for .mod behavior
Define CMAKE_Fortran_MODDIR_DEFAULT and CMAKE_Fortran_MODOUT_FLAG
variables to help some Fortran compilers generate .mod files in the
current working directory.
2010-11-12 09:03:49 -05:00
Alex Neundorf 41e4f1a210 Add automatic variable CMAKE_CURRENT_LIST_DIR(dir of CMAKE_CURRENT_LIST_FILE)
Comes with a simple test and docs.

Alex
2010-09-28 22:10:47 +02:00
Alex Neundorf f9fc79cac5 Remove trailing whitespace
Alex
2010-09-28 21:44:22 +02:00
Todd Gamblin 1221581aa8 Teach find_* commands to ignore some paths
Add platform configuration variable CMAKE_SYSTEM_IGNORE_PATH and user
configuration variable CMAKE_IGNORE_PATH.  These specify a set of
directories that will be ignored by all the find commands.  Update
FindPackageTest so that several cases will fail without a functioning
CMAKE_IGNORE_PATH.
2010-08-13 11:53:28 -04:00
Brad King 5444bd6ca3 Merge branch 'tru64-make-includes' 2010-06-15 14:03:26 -04:00
Brad King d9b2da139d Merge branch 'mingw-response-files' 2010-06-15 13:58:58 -04:00
Brad King c592df8377 Tru64: Use full-path include directives in Makefiles (#10569)
Tru64's make(1) resolves relative paths in "include" directives with
respect to the includer.  This is inconsistent with all other known make
tools.  Note that this make tool treats the path literally so we cannot
use our standard FULL path code which escapes spaces.  Instead qualify
the paths with $(CMAKE_BINARY_DIR) to avoid the problem.
2010-06-14 13:06:39 -04:00
Brad King 3ebb41d58a Merge branch 'version' 2010-05-17 13:34:29 -04:00
Alex Neundorf 555b8fcab5 -(minor) fix documentation for CMAKE_LIBRARY_PATH (#10291)
Alex
2010-05-08 09:12:57 +02:00
Brad King 0328379411 Report commit hash in CMake development versions
For builds from Git repositories, add "-g<commit>" to the end of the
version number.  If the source tree is modified, append "-dirty".
For builds from CVS checkouts, add "-cvs-<branch>".
2010-04-23 10:01:49 -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
Brad King f9268c9c81 Use platform variable for response file flag
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.
2010-03-11 09:43:33 -05:00
Brad King 282ba89558 Clarify CMAKE_MODULE_PATH documentation
Reword the documentation to make it clear that the variable can be a
list of directories.
2010-02-18 12:05:51 -05:00
Brad King 9daa4a6c3f Remove CMAKE_SHARED_MODULE_RUNTIME_${lang}_FLAG
This platform configuration variable is unused.  Modules are built using
the value of CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG.
2009-12-02 15:17:32 -05:00
Alexander Neundorf 679c1422b4 -document CMAKE_EXTRA_GENERATOR
Alex
2009-11-21 19:07:03 -05:00
Brad King 2117143103 Document CMAKE_CURRENT_LIST_FILE more precisely
There is confusion whether the file "currently being processed" inside a
function or macro is the file containing the definition or not.  This
commit explicitly describes the behavior.  See issue #9646.
2009-10-02 13:22:13 -04:00
Brad King e55bbab88b Teach Xcode generator to set XCODE_VERSION
We set the variable 'XCODE_VERSION' in the CMake language to the Xcode
version string (e.g. "3.1.2").  Platform config files may use it later.
2009-09-23 08:48:39 -04:00
Bill Hoffman 1554265aa6 Remove CMakeSetup. Long live cmake-gui, start building Qt now. 2009-09-03 17:01:07 -04:00
Ken Martin f686dbecb6 some white space fixes for the book 2009-09-03 15:29:29 -04:00
Brad King 5a4797ad80 Document CMAKE_<LANG>_COMPILER_LOADED variable 2009-08-20 16:21:48 -04:00
Brad King fcab87c9f8 Do not always propagate linker language preference
The commit "Consider link dependencies for link language" taught CMake
to propagate linker language preference from languages compiled into
libraries linked by a target.  It turns out this should only be done for
some languages, such as C++, because normally the language of the
program entry point (main) should be used.

We introduce variable CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES to tell
CMake whether a language should propagate its linker preference across
targets.  Currently it is true only for C++.
2009-07-30 10:59:37 -04:00
Brad King 07ea19ad1f ENH: Implicit link info for C, CXX, and Fortran
This teaches CMake to detect implicit link information for C, C++, and
Fortran compilers.  We detect the implicit linker search directories and
implicit linker options for UNIX-like environments using verbose output
from compiler front-ends.  We store results in new variables called

  CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES
  CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES

The implicit libraries can contain linker flags as well as library
names.
2009-07-23 10:07:25 -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 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 0e5df2a7bc BUG: Fix documentation of CMAKE_CFG_INTDIR
The documentation of this variable was out-dated and misleading.
See issue #9219.
2009-06-30 09:05:26 -04:00
Alexander Neundorf e03c366466 STYLE: document CMAKE_SKIP_INSTALL_ALL_DEPENDENCY variable
Alex
2009-06-27 11:17:37 -04:00
Brad King 42c4a1d71f ENH: Document variable CMAKE_NO_BUILTIN_CHRPATH
This adds documentation for the variable which was previously missing.
See issue #9130.
2009-06-10 14:11:20 -04:00
Brad King d2b108150f BUG: Recognize .so shared libraries on HP-UX
HP-UX uses both .sl and .so as extensions for shared libraries.  This
teaches CMake to recognize .so shared libraries so they are treated
properly during link dependency analysis.
2009-06-03 15:08:30 -04:00
Brad King ee43a12178 ENH: Make CMAKE_<LANG>_SIZEOF_DATA_PTR public
The variable was previously documented for internal-use only.  This
officially documents it for general use by projects.
2009-05-14 09:27:32 -04:00
Alexander Neundorf fdd93f0cbe STYLE: document CMAKE_INCLUDE_CURRENT_DIR
Alex
2009-05-09 17:25:21 -04:00
Alexander Neundorf bc9703b695 STYLE: fix typos in the docs
Alex
2009-04-19 12:48:30 -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
Brad King cb788e8f6d ENH: Re-enable system include dir suppression
This creates variable CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES to
specify implicit include directories on a per-language basis.  This
replaces the previous platform-wide variable.  It is necessary to
avoid explicit specification of -I/usr/include on some compilers
(such as HP aCC) because:

  1.) It may break ordering among system include directories defined
      internally by the compiler, thus getting wrong system headers.
  2.) It tells the compiler to treat the system include directory
      as a user include directory, enabling warnings in the headers.

See issue #8598.
2009-02-25 11:44:46 -05:00
Brad King f04fed206f ENH: Clarify docs of old *_OUTPUT_PATH vars
This clarifies the documentation of EXECUTABLE_OUTPUT_PATH and
LIBRARY_OUTPUT_PATH to sound less like deprecation.
2009-02-20 14:03:41 -05:00
Brad King 35e391c93b ENH: Provide variable CMAKE_VERSION
This creates the variable CMAKE_VERSION containing the full version of
cmake in "major.minor.patch" format.  It is particularly useful with the
component-wise version comparison provided by the if() command.
2009-01-15 08:57:44 -05:00
Brad King 004cdfe6ff ENH: Document variable CMAKE_PATCH_VERSION
This adds documentation of CMAKE_PATCH_VERSION to the generated
variables documentation.
2009-01-15 08:57:17 -05:00
Alexander Neundorf 0f38be1561 STYLE: document CMAKE_COLOR_MAKEFILE (#7878)
Alex
2009-01-10 08:16:39 -05:00
Brad King e4325e7d9c BUG: Fix <CONFIG>_POSTFIX property/variable docs
The CMAKE_<CONFIG>_POSTFIX variable and <CONFIG>_POSTFIX property were
not documented.  This updates the CMAKE_DEBUG_POSTFIX and DEBUG_POSTFIX
documentation to refer to the more general variable/property.  It also
clarifies that the variable is used as the property default only for
non-executable targets.  See issue #7868.
2008-12-15 13:30:09 -05:00
Brad King 990c6b0b90 ENH: Allow custom limit on object file path length
Some native build tools, particularly those for cross compiling, may
have a limit on the length of the full path to an object file name that
is lower than the platform otherwise supports.  This change allows the
limit to be set by the project toolchain file through the variable
CMAKE_OBJECT_PATH_MAX.
2008-08-21 09:54:36 -04:00