summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentVariables.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Refactor generation of shared library flagsStephen Kelly2012-06-121-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | CMAKE_SHARED_LIBRARY_<lang>_FLAGS has flags on various platforms for a variety of purposes that are correlated with shared libraries but not exclusive to them. Refactor generation of these flags to use new purpose-specific platform variables CMAKE_<lang>_COMPILE_OPTIONS_DLL CMAKE_<lang>_COMPILE_OPTIONS_PIC CMAKE_<lang>_COMPILE_OPTIONS_PIE Activate the DLL flags specifically for shared libraries. Add a new POSITION_INDEPENDENT_CODE target property to activate PIC/PIE flags, and default to true for shared libraries to preserve default behavior. Initialize the new property from CMAKE_POSITION_INDEPENDENT_CODE to allow easy global configuration in projects. Although the default behavior is unchanged by this refactoring, the new approach ignores CMAKE_SHARED_LIBRARY_<lang>_FLAGS completely. We must leave it set in case projects reference the value. Furthermore, if a project modifies CMAKE_SHARED_LIBRARY_<lang>_FLAGS it expects the new value to be used. Add policy CMP0018 to handle compatibility with projects that modify this platform variable. Add a PositionIndependentCode test on platforms where we can get meaningful results.
* Merge topic 'CPackNSIS-warnDESTDIRandABSOLUTE'David Cole2012-05-241-0/+30
|\ | | | | | | | | | | | | | | 4986d52 Use CPACK_xxx and CMAKE_xxx in a consistent way. f90223c Fix KWStyle warning 47f0dbd CPack add necessary check to detect/warns/error on ABSOLUTE DESTINATION 6ba055b CPack add easy possibility to warn about CPACK_SET_DESTDIR
| * Use CPACK_xxx and CMAKE_xxx in a consistent way.Eric NOULARD2012-05-201-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMAKE_xxx vars are now used in the CMake-generated cmake_install.cmake script while CPACK_xxx equivalent vars are used from within CPack. CPack is responsible for getting/forwarding definitions of CPACK_xxxx var corresponding to CMAKE_xxxx when invoking CMake-generated install scripts. As a consequence: CMAKE_ABSOLUTE_DESTINATION_FILES CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION may be used from outside CPack as well. e.g. cmake -DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=1 -P cmake_install.cmake works as expected.
* | -add docs for ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}Alex Neundorf2012-05-141-0/+10
|/ | | | Alex
* Merge topic 'skip-install-rpath'David Cole2012-03-061-1/+17
|\ | | | | | | | | 635bf50 Add an option to skip RPATH during installation.
| * Add an option to skip RPATH during installation.Stephen Kelly2012-03-051-1/+17
| |
* | Add default initializers for WIN32_EXECUTABLE and MACOSX_BUNDLEStephen Kelly2012-03-051-0/+16
| | | | | | | | | | | | | | | | | | | | This allows downstreams to use set(CMAKE_WIN32_EXECUTABLE ON) set(CMAKE_MACOSX_BUNDLE ON) to create executables with the WIN32_EXECUTABLE and MACOSX_BUNDLE properties set on by default.
* | Merge topic 'find_package-improve-messages'David Cole2012-03-021-0/+20
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eeaaffc find_package: Test error and warning messages in failure cases 52dffb9 Merge branch 'test-CMakeCommands' into find_package-improve-messages d365104 find_package: Optionally warn when implicitly using Config mode 31ead5f find_package: Reject mixed use of MODULE- and CONFIG-only options 6d83083 find_package: mention requested version number in error message 9c39bbd find_package: add CONFIG mode keyword alias for NO_MODULE f310f67 find_package: add MODULE mode to use only Find-modules 7d67dcf find_package: improve error message when no Find module is present 978d89b find_package: rename NoModule to UseFindModules
| * | find_package: Optionally warn when implicitly using Config modeBrad King2012-02-281-0/+20
| |/ | | | | | | | | | | | | | | | | | | | | Define variable CMAKE_FIND_PACKAGE_WARN_NO_MODULE for use by a project that wants to use an explicit mode in every call to find_package in order to generate more specific failure messages. Word the warning using the new CONFIG and MODULE mode keywords when the minimum required version of CMake is new enough to have them. Otherwise word the warning using the old NO_MODULE mode keyword. Inspired-by: Alex Neundorf <neundorf@kde.org>
* | Fix typo in documentationYury G. Kudryashov2012-02-271-1/+1
|/
* Add whitespace after '.' in CMAKE_SKIP_RPATH docs.Stephen Kelly2012-01-311-1/+1
|
* Merge topic 'compiler-version'David Cole2012-01-171-0/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0df1942 Detect SGI MIPSpro compiler version with its id a5e892c Document compiler version macro formats used for detection d7c6f41 Detect HP compiler version with its id 3dd9fa9 Detect SunPro compiler version with its id c198730 Detect Watcom compiler version with its id 5899b98 Detect Clang compiler version with its id b8cfa65 Detect PGI compiler version with its id 6dae666 Detect IBM XL compiler version with its id 4080d55 Detect Borland compiler version with its id 2cc205a Detect Intel compiler version with its id (#11937) a6d83cc Detect MSVC compiler version with its id a662855 Detect GNU compiler version with its id (#6251) fa7141f Add framework to detect compiler version with its id (#12408)
| * Add framework to detect compiler version with its id (#12408)Brad King2011-12-071-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach CMakePlatformId.h to construct an "INFO:compiler_version[]" string literal from macros COMPILER_VERSION_(MAJOR|MINOR|PATCH|TWEAK) to be defined in CMake(C|CXX)CompilerId.(c|cpp) for each compiler. Provide conversion macros DEC() and HEX() to decode decimal or hex digits from integer values. Parse the version out of the compiler id binary along with the other INFO values already present. Store the result in variable CMAKE_<LANG>_COMPILER_VERSION in the format "major[.minor[.patch[.tweak]]]". Save the value persistently in CMake(C|CXX)Compiler.cmake in the build tree. Document the variable for internal use since we do not set it everywhere yet. Report the compiler version on the compiler id result line e.g. The C compiler identification is GNU 4.5.2 Report CMAKE_(C|CXX)_COMPILER_(ID|VERSION) in SystemInformation test.
* | automoc: default to strict mode, use CMAKE_AUTOMOC_RELAXED_MODEAlex Neundorf2011-12-131-5/+4
| | | | | | | | | | | | | | | | | | automoc now defaults to strict mode, also with Qt4, i.e. it behaves as the documentation says by default. I also inverted the switch CMAKE_AUTOMOC_STRICT_MODE to CMAKE_AUTOMOC_RELAXED_MODE. Docs and test adapted accordingly. Alex
* | Merge branch 'master' into AutomocIncludedDotMocFileHandlingDavid Cole2011-12-071-0/+20
|\ \ | | | | | | | | | | | | Conflicts: Source/cmTarget.cxx
| * | Add CMAKE_GNUtoMS option to convert GNU .dll.a to MS .libBrad King2011-12-051-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach the Windows-GNU.cmake platform file to look for Visual Studio tools matching the target ABI. Add an extra step to the link command for shared libraries and executables that export symbols and on which a new GNUtoMS property is set (initialized by the CMAKE_GNUtoMS option). Tell the GNU linker to output a module definition (.def) file listing exported symbols in addition to the GNU-format import library (.dll.a). Pass the .def file to the MS "lib" tool to construct a MS-format DLL import library (.lib). Teach the install(TARGETS) command to install the MS import library next to the GNU one. Teach the install(EXPORT) and export() command to set the IMPORTED_IMPLIB property pointing at the import library to use the import library matching the tools in the importing project.
| * | Load platform files that need to know the ABI when possibleBrad King2011-12-051-0/+2
| |/ | | | | | | | | | | | | | | Load platform files named in CMAKE_<lang>_ABI_FILES for each language once the ABI sizeof(void*) is known. During the first configuration this is after the test for working compiler and ABI detection checks. During later configurations the ABI information is immediately available because it has been saved in CMake<lang>Compiler.cmake.
| * Merge topic 'AddMocOptionsToAutomoc'David Cole2011-11-081-0/+9
| |\ | | | | | | | | | | | | | | | 2c648ab add documentation for the AUTOMOC_MOC_OPTIONS property 52719a1 automoc: fix #12541, support moc options
| | * add documentation for the AUTOMOC_MOC_OPTIONS propertyAlex Neundorf2011-11-011-0/+9
| | | | | | | | | | | | Alex
* | | automoc: add documentation for CMAKE_AUTOMOC_STRICT_MODEAlex Neundorf2011-12-061-0/+14
|/ / | | | | | | Alex
* | Fix old reference to CMAKE_MAKE_PROGRAM inside CMAKE_BUILD_TOOL doc.Eric NOULARD2011-10-301-1/+1
|/
* Initialize LINK_INTERFACE_LIBRARIES target property with a variableStephen Kelly2011-10-241-1/+8
| | | | | | | | | | | Define variable CMAKE_LINK_INTERFACE_LIBRARIES to initialize the value of this property when a target is created. This allows authors to write set(CMAKE_LINK_INTERFACE_LIBRARIES "") to disable transitive linking to implementation dependencies of shared libraries on platforms where it is possible.
* Fortran: Add support for free- and fixed-form flagsBrad King2011-08-311-0/+9
| | | | | | | Define a "Fortran_FORMAT" target and source file property. Initialize the target property from a "CMAKE_Fortran_FORMAT" variable. Interpret values "FIXED" and "FREE" to indicate the source file format. Append corresponding flags to the compiler command line.
* Add documentation for AUTOMOC, add initialization via CMAKE_AUTOMOCAlex Neundorf2011-08-161-0/+9
| | | | Alex
* Documentation: WIN32 not defined on Cygwin (#12334)Brad King2011-07-291-1/+1
| | | | | | Since commit 85c0a69a (Cygwin: Do not define 'WIN32', 2010-12-17) WIN32 is not defined on Cygwin. Update documentation of the WIN32 variable accordingly.
* Add documentation for the CMAKE_DISABLE_FIND_PACKAGE_<Name> switchAlex Neundorf2011-06-231-0/+14
| | | | Alex
* Teach find_(library|package) about Linux multiarch (#12037)Brad King2011-06-081-0/+20
| | | | | | | | | | | | | Implement support for multiarch as specified here: http://wiki.debian.org/Multiarch https://wiki.ubuntu.com/MultiarchSpec Detect the <arch> part of <prefix>/lib/<arch> from the implicit library search path from each compiler to set CMAKE_<lang>_LIBRARY_ARCHITECTURE. Define CMAKE_LIBRARY_ARCHITECTURE using one of these values (they should all be the same). Teach the find_library and find_package commands to search <prefix>/lib/<arch> whenever they would search <prefix>/lib.
* Fix case typo in CMAKE_BUILD_TYPE docs (#12148)Brad King2011-05-031-1/+1
| | | | Reported-by: Stephen Kelly <steveire@gmail.com>
* Merge topic 'include-flags-response-file'Brad King2011-03-221-0/+2
|\ | | | | | | | | | | | | | | 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
| * Optionally pass include directories with response filesBrad King2011-03-171-0/+2
| | | | | | | | | | | | 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.
* | Merge topic 'fix-2828-more-info-in-script-mode'Brad King2011-02-221-0/+24
|\ \ | |/ |/| | | | | | | | | 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)
| * Add CMAKE_ARGC and CMAKE_ARGV0..N-1 variables (#2828)David Cole2011-02-031-0/+16
| | | | | | | | For now, these variables are only available in -P script mode.
| * Add CMAKE_SCRIPT_MODE_FILE variable (#2828)David Cole2011-02-021-0/+8
| | | | | | | | | | New CMake variable is set when processing a -P script file, but not when configuring a project.
* | Fix documentation of MSVC_VERSION (#11833)Brad King2011-02-101-2/+8
|/ | | | | Previously the example version number was wrong. Instead list all the known versions with correct numbers.
* Merge topic 'outdir-CMAKE_USER_MAKE_RULES_OVERRIDE'Brad King2011-01-261-14/+27
|\ | | | | | | | | | | 5792d3a Always place try_compile executables predictably (#11724) a5300f1 Clarify CMAKE_USER_MAKE_RULES_OVERRIDE documentation (#11724)
| * Clarify CMAKE_USER_MAKE_RULES_OVERRIDE documentation (#11724)Brad King2011-01-201-14/+27
| | | | | | | | | | | | 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.
* | Document CMAKE_TRY_COMPILE_CONFIGURATION variableBrad King2011-01-171-0/+8
| | | | | | | | | | Also reference it from try_compile and try_run since it affects those commands.
* | Allow users to specify defaults for unset policiesBrad King2011-01-041-0/+19
| | | | | | | | | | | | | | | | | | | | 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.
* | Create Fortran info variables for .mod behaviorBrad King2010-11-121-0/+23
| | | | | | | | | | | | Define CMAKE_Fortran_MODDIR_DEFAULT and CMAKE_Fortran_MODOUT_FLAG variables to help some Fortran compilers generate .mod files in the current working directory.
* | Add automatic variable CMAKE_CURRENT_LIST_DIR(dir of CMAKE_CURRENT_LIST_FILE)Alex Neundorf2010-09-281-0/+19
| | | | | | | | | | | | Comes with a simple test and docs. Alex
* | Remove trailing whitespaceAlex Neundorf2010-09-281-47/+48
| | | | | | | | Alex
* | Teach find_* commands to ignore some pathsTodd Gamblin2010-08-131-1/+33
|/ | | | | | | | 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.
* Merge branch 'tru64-make-includes'Brad King2010-06-151-0/+2
|\
| * Tru64: Use full-path include directives in Makefiles (#10569)Brad King2010-06-141-0/+2
| | | | | | | | | | | | | | | | 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.
* | Merge branch 'mingw-response-files'Brad King2010-06-151-0/+2
|\ \ | |/ |/|
| * Use platform variable for response file flagBrad King2010-03-111-0/+2
| | | | | | | | | | | | | | | | 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.
* | Merge branch 'version'Brad King2010-05-171-3/+13
|\ \
| * | Report commit hash in CMake development versionsBrad King2010-04-231-2/+4
| | | | | | | | | | | | | | | | | | 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>".
| * | New version scheme to support branchy workflowBrad King2010-04-231-3/+11
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | -(minor) fix documentation for CMAKE_LIBRARY_PATH (#10291)Alex Neundorf2010-05-081-1/+1
|/ | | | Alex