summaryrefslogtreecommitdiffstats
path: root/Source/cmPolicies.cxx
Commit message (Collapse)AuthorAgeFilesLines
* New CMP0016 for deciding whether an unknown target in TLL() is an error.Alex Neundorf2010-08-281-0/+8
| | | | | | | | When set to OLD, target_link_libraries() silently accepts if it is called with only one argument and this one argument is not a target. When set to NEW, this is an error. By default it is a warning now. Alex
* Remove trailing whitespaceAlex Neundorf2010-08-281-23/+24
| | | | Alex
* Teach CMake Policies about tweak version componentBrad King2010-04-231-28/+51
| | | | | | | | Add the [.tweak] version component throughout the policy implementation. Document all components for the cmake_policy(VERSION) command. Record the tweak level in which each policy was introduced (0 for all current policies). In generated documentation we report the tweak level only if it is not zero. This preserves existing documentation.
* Teach link_directories to recognize relative pathsBrad King2009-11-241-0/+15
| | | | | | | | We create CMake Policy CMP0015 to make link_directories() treat relative paths with respect to the source tree while retaining compatibility. This makes it consistent with include_directories() and other commands. Changes based on patch from Alex. See issue #9697.
* Fix if() command and CMP0012 OLD/NEW behaviorBrad King2009-10-271-10/+15
| | | | | | | | | | | | | | The commit "modified the if command to address bug 9123 some" changed the if() command behavior with respect to named boolean constants. It introduced policy CMP0012 to provide compatibility. However, it also changed behavior with respect to numbers (like '2') but did not cover the change with the policy. Also, the behavior it created for numbers is confusing ('2' is false). This commit teaches if() to recognize numbers again, and treats them like the C language does in terms of boolean conversion. We also fix the CMP0012 check to trigger in all cases where the result of boolean coersion differs from that produced by CMake 2.6.4.
* Remove CMake Policy CMP0015 until it is revisedBrad King2009-10-081-31/+0
| | | | | | | | | | | | | | | | | | | | We revert commit "Create CMake Policy CMP0015 to fix set(CACHE)" because the NEW behavior of the policy breaks a valid use case: # CMakeLists.txt option(BUILD_SHARED_LIBS "..." ON) add_library(mylib ...) set(BUILD_SHARED_LIBS OFF) # we want only mylib to be shared add_subdirectory(ThirdParty) # ThirdParty/CMakeLists.txt option(BUILD_SHARED_LIBS "..." ON) # uh, oh, with NEW behavior this dir uses shared libs!!! We'll re-introduce the policy later with a different change in behavior to resolve the motivating case, which was more subtle but less common. See issue #9008.
* Clarify documentation and message for CMP0012Brad King2009-10-021-1/+3
| | | | | | | This commit re-words the warning message produced for CMP0012 to avoid the word 'you' since often the person reading the message is not the author of the code. We also add an example of the bad OLD behavior to the policy documentation.
* Fix documentation of CMP0012 and CMP0013 versionsBrad King2009-10-021-4/+4
| | | | | | These policies were originally developed during the 2.7.x series and intended for 2.6.5. There was never a 2.6.5 release, so we should refer to 2.8.0 instead.
* Policies 14 and 15 will be first released in 2.8.0Brad King2009-09-251-2/+2
| | | | | | | CMake policies CMP0014 and CMP0015 were implemented in the development series version 2.7.x but will be first released in 2.8.0. Now that the development version number is higher than that (2.9.x) we can update their version of introduction to the actual release number.
* Document full version number with policy defaultBrad King2009-09-251-2/+1
| | | | | | In CMake Policy documentation we specify the default behavior for the current version of CMake. This commit fixes that version by reporting the full version number instead of just major and minor.
* Add parentheses around '&&' between '||' for gccBrad King2009-09-111-1/+1
| | | | | | | The GNU compiler warns about possible operator precedence mistakes and asks for explicit parentheses (-Wparentheses). We add the parentheses to silence the warning. This also fixes one real logic error in the find_package() implementation by correcting expression evaluation order.
* Create CMake Policy CMP0015 to fix set(CACHE)Brad King2009-09-101-0/+31
| | | | | | | | The set(CACHE) and option() commands should always expose the cache value. Previously we failed to expose the value when it was already set if a local variable definition hid it. When set to NEW, this policy tells the commands to always remove the local variable definition to expose the cache value. See issue #9008.
* Create CMP0014 to require CMakeLists.txt filesBrad King2009-09-031-0/+12
| | | | | | Until now CMake accidentally accepted add_subdirectory() and subdirs() calls referring to directories that do not contain a CMakeLists.txt file. We introduce CMake Policy CMP0014 to make this case an error.
* Fix typo in REQUIRED_ALWAYS policy error messageBrad King2009-09-031-1/+1
|
* ENH: Improve CMP0012 doc and message formattingBrad King2009-06-171-1/+2
| | | | | | | | This fixes the CMP0012 description to have a one-line summary in the 'brief' section and the rest of the explanation in the 'full' section. It makes the warning message shorter and improves formatting of the policy documentation, especially in the HTML pages. The convention is already used by all other policies.
* ENH: Create CMP0013 to disallow duplicate dirsBrad King2009-06-171-0/+17
| | | | | | | | | | | | In CMake 2.6.3 and below we silently accepted duplicate build directories whose build files would then conflict. At first this was considured purely a bug that confused beginners but would not be used in a real project. In CMake 2.6.4 we explicitly made it an error. However, some real projects took advantage of this as a "feature" and got lucky that the subtle build errors it can cause did not occur. Therefore we need a policy to deal with the case more gracefully. See issue #9173.
* COMP: fix line lengthKen Martin2009-06-151-5/+6
|
* ENH: clean up some help textKen Martin2009-06-121-4/+4
|
* ENH: modified the if command to address bug 9123 someKen Martin2009-06-121-0/+13
|
* ENH: Isolate policy changes in included scriptsBrad King2009-01-221-0/+20
| | | | | | | | Isolation of policy changes inside scripts is important for protecting the including context. This teaches include() and find_package() to imply a cmake_policy(PUSH) and cmake_policy(POP) around the scripts they load, with a NO_POLICY_SCOPE option to disable the behavior. This also creates CMake Policy CMP0011 to provide compatibility. See issue #8192.
* ENH: Improve argument parsing error messagesBrad King2008-09-241-0/+12
| | | | | | | | | | | | | | Previously error messages produced by parsing of command argument variable references, such as bad $KEY{VAR} syntax or a bad escape sequence, did not provide good context information. Errors parsing arguments inside macro invocations gave no context at all. Furthermore, some errors such as a missing close curly "${VAR" would be reported but build files would still be generated. These changes teach CMake to report errors with good context information for all command argument parsing problems. Policy CMP0010 is introduced so that existing projects that built despite such errors will continue to work.
* ENH: Improve FILE GLOB_RECURSE handling of symlinks with a new CMake policy. ↵David Cole2008-09-111-1/+17
| | | | CMP0009 establishes NEW default behavior of not recursing through symlinks. OLD default behavior or explicit FOLLOW_SYMLINKS argument to FILE GLOB_RECURSE will still recurse through symlinks.
* ENH: Improve errors when a policy is REQUIREDBrad King2008-08-181-95/+57
| | | | | | In the future some policies may be set to REQUIRED_IF_USED or REQUIRED_ALWAYS. This change clarifies the error messages users receive when violating the requirements.
* ENH: Support full-path libs w/out valid names.Brad King2008-07-231-0/+26
| | | | | | | | This change introduces policy CMP0008 to decide how to treat full path libraries that do not appear to be valid library file names. Such libraries worked by accident in the VS IDE and Xcode generators with CMake 2.4 and below. We support them in CMake 2.6 by introducing this policy. See policy documentation added by this change for details.
* ENH: fix list command with empty elementsBill Hoffman2008-04-211-0/+12
|
* BUG: Fix compatibility with CMake 2.4 for installation of MACOSX_BUNDLE targetsBrad King2008-04-141-0/+18
| | | | | | - Add policy CMP0006 to decide whether to use compatibility - OLD behavior is to fall back to RUNTIME rules - NEW behavior is to produce an error
* ENH: Allow policy CMP0000 to be set explicitlyBrad King2008-03-311-1/+9
| | | | | | | | - Message for missing cmake_minimum_required is not issued until the end of processing the top CMakeLists.txt file - During processing a cmake_policy command may set behavior - OLD behavior is to silently ignore the problem - NEW behavior is to issue an error instead of a warning
* ENH: Cleanup policy version interface presented to user.Brad King2008-03-241-0/+24
| | | | | | | - In cmake_minimum_required do not set policy version if current CMake is too old - In cmPolicies::ApplyPolicyVersion report error if version is too new or cannot be parsed
* ENH: Yet another attempt at warning for CMP0003.Brad King2008-03-211-1/+4
| | | | | | | - Give example code to avoid the warning - Make explanation more consise - Explicitly state this is for compatibility - Issue the warning for at most one target
* ENH: Improve warning about specifying a cmake versionBrad King2008-03-191-39/+39
| | | | | | | | | | - Update policy CMP0000 to require use of the command cmake_minimum_required and not cmake_policy so there is only one way to avoid it. - Explicitly specify the line users should add. - Reference policy CMP0000 only at the end. - Fix policy CMP0000 documentation to not suggest use of the cmake_policy command.
* ENH: Clarify documentation of policy CMP0000 and its relationship with ↵Brad King2008-03-131-7/+14
| | | | cmake_minimum_required.
* ENH: Add policy CMP0005 to decide whether add_definitions should escape defs.Brad King2008-03-131-0/+21
|
* ENH: Add policy CMP_0004 to require library names to have no leading or ↵Brad King2008-03-131-0/+16
| | | | trailing whitespace. Replace previous check of CMAKE_BACKWARDS_COMPATIBILITY against version 2.4 with the policy.
* ENH: Convert CMAKE_LINK_OLD_PATHS to policy CMP0003.Brad King2008-03-131-0/+61
| | | | | | | | | - 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
* ENH: Reduce whitespace in policy warning/error messages.Brad King2008-03-131-2/+2
|
* ENH: change CMP_ to CMPKen Martin2008-03-131-4/+4
|
* ENH: add enum to IssueMessageBill Hoffman2008-03-111-3/+3
|
* ENH: Cleanup policy generic documentation. Cleanup some policy ↵Brad King2008-03-081-35/+31
| | | | error/warning messages.
* ENH: Finish creating, documenting, and enforcing policy CMP_0002.Brad King2008-03-071-2/+17
|
* ENH: Improve handling of old-style compatibility.Brad King2008-03-071-49/+37
| | | | | | | | | | | | | | | | | | | - Remove CMP_0001 (no slash in target name) and restore old CMAKE_BACKWARDS_COMPATIBILITY check for it - Replace all checks of CMAKE_BACKWARDS_COMPATIBILITY with cmLocalGenerator::NeedBackwardsCompatibility calls - Create new CMP_0001 to determine whether or not CMAKE_BACKWARDS_COMPATIBILITY is used. (old = use, new = ignore) - Show CMAKE_BACKWARDS_COMPATIBILITY in cache only when CMP_0001 is set to OLD or WARN - Update documentation of cmake_policy and cmake_minimum_required to indicate their relationship and the 2.4 version boundary - When no cmake policy version is set in top level makefile implicitly call cmake_policy(VERSION 2.4) which restores CMAKE_BACKWARDS_COMPATIBILITY and other 2.4 compatibility - Fix tests MakeClean and Preprocess to call cmake_policy(VERSION 2.6) because they depend on new policies
* ENH: clean up some policy stuff and interactions with ↵Ken Martin2008-03-071-0/+24
| | | | CMAKE_BACKWARDS_COMPATIBILITY and CMAKE_MINIMUM_REQUIRED
* ENH: New format for warning and error messagesBrad King2008-03-071-18/+17
| | | | | | | | | | | | | - Add cmMakefile methods IssueError and IssueWarning - Maintain an explicit call stack in cmMakefile - Include context/call-stack info in messages - Nested errors now unwind the call stack - Use new mechanism for policy warnings and errors - Improve policy error message - Include cmExecutionStatus pointer in call stack so that errors deeper in the C++ stack under a command invocation will become errors for the command
* BUG: change in handling of cmake_minimum_requiredKen Martin2008-03-061-1/+1
|
* BUG: change the handling of CMAKE_MINIMUM_REQUIRED and ↵Ken Martin2008-03-061-26/+40
| | | | BACKWARDS_COMPATIBILITY and extend the documentaiton quite a bit
* ENH: Fix policy warning message to not give wrong code as example.Brad King2008-03-051-13/+8
|
* BUG: Require policy version to specify at least major.minor. Do not store ↵Brad King2008-03-051-3/+8
| | | | CMAKE_BACKWARDS_COMPATIBILITY with an invalid version value.
* BUG: Fix parsing of policy version number in cmPolicies.Brad King2008-03-051-18/+3
|
* BUG: some fixes, still a few to goKen Martin2008-03-051-2/+13
|
* ENH: more policy changesKen Martin2008-03-041-1/+15
|
* ENH: add --help-policies and --help-policy command line optionsKen Martin2008-03-041-0/+20
|