summaryrefslogtreecommitdiffstats
path: root/Source/cmPolicies.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* ENH: revert dumb changeKen Martin2008-03-021-21/+21
|
* COMP: fix compile errors on vs6 and a warningKen Martin2008-03-021-21/+21
|
* STYLE: fix some line lengthsKen Martin2008-03-011-9/+10
|
* ENH: just getting somethng checked in, still work to doKen Martin2008-02-291-0/+410