summaryrefslogtreecommitdiffstats
path: root/Source/cmIfCommand.h
Commit message (Collapse)AuthorAgeFilesLines
* If: Introduce policy CMP0054 - don't dereference quoted variables in if()Nils Gladitz2014-09-111-0/+4
|
* If: Extract cmConditionEvaluator from if() implementationNils Gladitz2014-09-111-12/+0
|
* Remove extra semicolons from C++ code.Stephen Kelly2014-04-031-1/+1
| | | | | Clang based tools running over the code complain about these, but clang has a fixit for removing them.
* stringapi: Command namesBen Boeckel2014-03-081-1/+1
|
* stringapi: Use strings for variable namesBen Boeckel2014-03-081-1/+1
| | | | Variable names are always generated by CMake and should never be NULL.
* Drop builtin command documentationBrad King2013-10-161-177/+0
| | | | | Drop all GetTerseDocumentation and GetFullDocumentation methods from commands. The command documentation is now in Help/command/*.rst files.
* if: Document that plain 'NOTFOUND' is a false constantBrad King2012-10-051-1/+1
| | | | | | Previously we only mentioned the '-NOTFOUND' suffix. Reported-by: Nils Gladitz <gladitz@sci-vis.de>
* CMake: Clarify the documentation for if(f1 IS_NEWER_THAN f2)David Cole2012-08-151-1/+6
| | | | | | | | | | ...comparison operator in the IF command. In the event of a tie, we intentionally return "true" so that dependent build operations are guaranteed to occur until one file is definitively newer than the other file. A tie means we're not sure, so return true to be on the safe side.
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-9/+9
| | | | | | | | | | | | | | | | | Our Git commit hooks disallow modification or addition of lines with trailing whitespace. Wipe out all remnants of trailing whitespace everywhere except third-party code. Run the following shell code: git ls-files -z -- \ bootstrap doxygen.config '*.readme' \ '*.c' '*.cmake' '*.cpp' '*.cxx' \ '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \ '*.mm' '*.pike' '*.py' '*.txt' '*.vim' | egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' | egrep -z -v '^(Modules/CPack\..*\.in)' | xargs -0 sed -i 's/ \+$//'
* if: Document that macro arguments are not variables (#13393)Brad King2012-07-111-0/+1
| | | | | | | | | | | | | | A common mistake is to write macro(foo arg) if(arg) endif() endmacro() and expect if() to treat "arg" as a variable. The documentation of the macro() command already states that arguments are not variables, but users writing the if() command may not look at the macro() docs. Add a note to the if() documentation.
* Merge branch 'add-const-qualifiers' into doxygen-fixesBrad King2012-03-011-4/+4
|\ | | | | | | | | Conflicts: Source/cmPropertyDefinition.h
| * Add 'const' qualifier to some cmCommand membersYury G. Kudryashov2012-02-291-4/+4
| | | | | | | | | | Use const_cast for the special case in cmFindBase where GetFullDocumentation calls GenerateDocumentation.
* | doxygen: remove a few commentsYury G. Kudryashov2012-02-291-10/+1
|/ | | | | These comments were either wrong or non-informative. Replace some of them by brief comments
* Clarify auto-dereference cases in if() command (#11701)Brad King2011-01-171-20/+14
| | | | | | Show "<variable|string>" explicitly in if() case documentation whenever auto-dereferencing occurs. Reference its presence from the explanation at the bottom.
* Replace misleading example in the if() documentation (#10773)Brad King2011-01-141-34/+25
| | | | | | | | | | | | | | Remove the example explained by the misleading phrase "CMake will treat it as if you wrote". This was originally added by commit a73071ca (modified the if command to address bug 9123 some, 2009-06-12). Later related information elsewhere in the documentation was corrected and made precise by commit cb185d93 (Fix if() command and CMP0012 OLD/NEW behavior, 2009-10-27) but the misleading example was not corrected. Replace the example with a correct one that more directly covers the case that typically surprises newcomers. Avoid recommending a "correct" way to write code because this behavior is always specific to each case. Also update the main documentation of the behavior to be more explicit.
* Fix if() command and CMP0012 OLD/NEW behaviorBrad King2009-10-271-10/+18
| | | | | | | | | | | | | | 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.
* Add IS_SYMLINK test to if commandBrad King2009-10-211-0/+3
|
* Convert CMake to OSI-approved BSD LicenseBrad King2009-09-281-14/+9
| | | | | | | This converts the CMake license to a pure 3-clause OSI-approved BSD License. We drop the previous license clause requiring modified versions to be plainly marked. We also update the CMake copyright to cover the full development time range.
* Clarify documentation for if.Bill Hoffman2009-09-141-1/+1
|
* ENH: clean up some help textKen Martin2009-06-121-4/+4
|
* ENH: modified the if command to address bug 9123 someKen Martin2009-06-121-4/+67
|
* ENH: fix styleKen Martin2009-02-161-6/+8
|
* ENH: fix documentation and add docs on parenthetical expressionsKen Martin2009-02-121-5/+12
|
* ENH: Better error message for unclosed blocksBrad King2009-01-211-1/+0
| | | | | | This centralizes construction of the error message for an unclosed logical block (if, foreach, etc.). We record the line at which each block is opened so it can be reported in the error message.
* ENH: Refactor function blocker deletionBrad King2009-01-201-2/+1
| | | | | | | | | When a function blocker decides to remove itself we previously removed it at every return point from the C++ scope in which its removal is needed. This teaches function blockers to transfer ownership of themselves from cmMakefile to an automatic variable for deletion on return. Since this removes blockers before they replay their commands, we no longer need to avoid running blockers on their own commands.
* ENH: Add version comparison to if() commandBrad King2008-09-101-0/+5
| | | | | | Provide VERSION_LESS, VERSION_EQUAL, and VERSION_GREATER operators in the if() command. This simplifies component-wise comparison of version numbers in the form "major[.minor[.patch[.tweak]]]".
* ENH: Add if(TARGET) commandBrad King2008-08-201-0/+2
| | | | | | | | | | It is useful to be able to test if a target has been created. Often targets are created only inside conditions. Rather than storing the result of the condition manually for testing by other parts of the project, it is much easier for the other parts to just test for the target's existence. This will also be useful when find-modules start reporting results with IMPORTED targets and projects want to test if a certain target is available.
* BUG: fix memory leak and cleanup error string codeKen Martin2008-06-281-1/+1
|
* ENH: Add "if(POLICY policy-id)" option for IF command.Brad King2008-03-201-0/+3
| | | | | | | | | | | - This will help projects support multiple CMake versions. - In order to set a policy when using a newer CMake but still working with an older CMake one may write if(POLICY CMP1234) cmake_policy(SET CMP1234 NEW) endif(POLICY CMP1234) - Note that since CMake 2.4 does not have if(POLICY) supporting it will also require using "if(COMMAND cmake_policy)"
* STYLE: document that if(COMMAND) works also for macros and functionsAlexander Neundorf2008-02-101-1/+2
| | | | Alex
* ENH: add return and break support to cmake, also change basic command ↵Ken Martin2008-01-231-4/+10
| | | | invocation signature to be able to return extra informaiton via the cmExecutionStatus class
* ENH: make commands lower case by defaultKen Martin2007-10-101-36/+36
|
* ENH: also store the group matches from IF( MATCHES) in CMAKE_MATCH_(0..9)Alexander Neundorf2007-08-291-1/+1
| | | | Alex
* ENH: add IF(IS_ABSOLUTE path), so no regex matching is required in the cmake ↵Alexander Neundorf2007-06-061-0/+2
| | | | | | scripts Alex
* STYLE: improve IF documentation to cover elseifKen Martin2007-01-261-2/+8
|
* ENH: fix a warning and a nice fix to the IF commandKen Martin2006-12-121-1/+2
|
* ENH: Remove old IF(FILE_IS_NEWER) syntax. It was never in a release anyway.Brad King2006-10-231-1/+0
|
* ENH: Patch from Alex to provide nicer syntax for FILE_IS_NEWER. Using name ↵Brad King2006-10-231-0/+1
| | | | IS_NEWER_THAN so old syntax will continue to work.
* ENH: added elseifKen Martin2006-09-221-1/+2
|
* ENH: Patch from Alex for adding IF(FILE_IS_NEWER). I also added a test.Brad King2006-08-251-0/+4
|
* ENH: Clarified documentation of EXISTS and IS_DIRECTORY modes.Brad King2006-06-261-2/+4
|
* BUG: Patch from Miguel A. Figueroa-Villanueva for fixing documentation.Brad King2006-06-121-3/+3
|
* STYLE: fix line lengthKen Martin2006-05-111-3/+3
|
* BUG: Fixed missing false values in documentation of IF command.Brad King2006-04-181-2/+4
|
* ENH: added some new functionalityKen Martin2006-03-221-1/+3
|
* STYLE: some m_ to this-> cleanupKen Martin2006-03-151-2/+2
|
* STYLE: fix docsKen Martin2005-11-161-1/+1
|
* STYLE: fix the docsKen Martin2005-05-241-4/+2
|
* ENH: big change that includes immediate subdir support, removing the notion ↵Ken Martin2005-03-181-6/+0
| | | | of inherited commands, makefiles no longer read in the parent makefiles but instead inherit thier parent makefiles current settings
* BUG: When regular expression failes to compile, produce error: Fixes part of ↵Andy Cedilnik2004-08-031-2/+3
| | | | Bug #1025 - CMake silently ignores regular expression failure