Commit Graph

114 Commits

Author SHA1 Message Date
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
Alexander Neundorf 0b27f1f766 STYLE: fix #7146, add documentation for
CMAKE[_SYSTEM]_(LIBRARY|PROGRAM|INCLUDE|PREFIX)_PATH variables
-moved CMAKE_CROSSCOMPILING from "Variables that modify behaviour" to
"variables that Provide Information", since it should be used only for
testing whether we are currently in cross compiling mode, not for switching
between the modes.

Alex
2008-07-20 17:14:00 -04:00
Brad King d46ff28ac9 ENH: Convert CMAKE_LINK_OLD_PATHS to policy CMP0003.
- Policy is WARN by default so projects will build
    as they did in 2.4 without user intervention
  - Remove CMAKE_LINK_OLD_PATHS variable since it was
    never in a release and the policy supercedes it
  - Report target creation backtrace in warning message
    since policy should be set by that point
2008-03-13 16:23:18 -04:00
Brad King d5f7ea6b74 BUG: Fix typo in documentation of LIBRARY_OUTPUT_PATH. 2008-03-04 09:40:38 -05:00
Brad King dfe2ea6406 ENH: Handle large object file lists on some platforms
- Use a response file when enabled by
    CMAKE_<LANG>_USE_RESPONSE_FILE_FOR_OBJECTS
  - Enable for C and CXX with cl (MSVC)
  - Enable for Fortran with ifort (Intel Fortran)
2008-02-27 17:10:45 -05:00
Brad King a7e287975c ENH: Update documentation of EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH to reference their replacements. 2008-02-11 20:13:21 -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 2cff26fa52 ENH: Support linking to shared libs with dependent libs
- Split IMPORTED_LINK_LIBRARIES into two parts:
      IMPORTED_LINK_INTERFACE_LIBRARIES
      IMPORTED_LINK_DEPENDENT_LIBRARIES
  - Add CMAKE_DEPENDENT_SHARED_LIBRARY_MODE to select behavior
  - Set mode to LINK for Darwin (fixes universal binary problem)
  - Update ExportImport test to account for changes
2008-01-31 15:45:31 -05:00
Brad King 66e0b4212f ENH: Added build rule variables CMAKE_<LANG>_ARCHIVE_CREATE, CMAKE_<LANG>_ARCHIVE_APPEND, and CMAKE_<LANG>_ARCHIVE_FINISH to support creation of static archive libraries out of a large number of objects. See bug #6284. 2008-01-29 20:46:25 -05:00
Brad King f27379e3f7 ENH: Added CMAKE_LINK_OLD_PATHS compatibility mode for linker search paths. 2008-01-23 15:22:38 -05:00
Brad King 09af624dee BUG: Fix generation of Watcom link lines.
- Work-around bug in Watcom command line parsing for spaces in paths.
  - Add 'library' option before libraries specified by file path.
2008-01-23 13:30:55 -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 a28b197b11 ENH: Generalize the check for sizeof void* to detect more ABI information. 2008-01-21 18:30:17 -05:00
Brad King b2e8c07af8 ENH: Implemented Fortran module output directory and search path flags. 2007-12-30 16:11:38 -05:00
Brad King 082fb6cc26 STYLE: Fixed line-too-long for undocumented variable entries. 2007-11-10 08:14:13 -05:00
Ken Martin 433a914910 ENH: different way of testing properties 2007-11-06 14:16:00 -05:00
Ken Martin 379e65de57 ENH: minor fix 2007-10-31 13:57:51 -04:00
Ken Martin 9ddb45f085 ENH: added documentation for more variables 2007-10-31 13:38:47 -04:00
Ken Martin 712758dfc3 STYLE: fix some long lines 2007-10-23 10:08:26 -04:00
Ken Martin 6cdf032505 ENH: change to make the documentation class more generic, about halfway there, also provides secitons for Variables now 2007-10-22 12:49:09 -04:00
Bill Hoffman 5c4eadba23 ENH: add docs for variables 2007-10-18 09:10:42 -04:00