summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.h
Commit message (Collapse)AuthorAgeFilesLines
* ENH: Isolate policy changes in included scriptsBrad King2009-01-221-1/+2
| | | | | | | | 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: Better policies for functions and macrosBrad King2009-01-221-0/+1
| | | | | | | This teaches functions and macros to use policies recorded at creation time when they are invoked. It restores the policies as a weak policy stack entry so that any policies set by a function escape to its caller as before.
* ENH: Create notion of a 'weak' policy stack entryBrad King2009-01-221-5/+9
| | | | | | | A 'weak' poilcy stack entry responds normally to queries. However, setting a policy in a weak entry will recursively set the policy in the next entry too. This also gives the internal interface to create a weak entry the option to provide an initial PolicyMap for it.
* ENH: Create policy scope barriersBrad King2009-01-221-3/+9
| | | | | This creates a barrier mechanism to prevent user code from using cmake_policy(POP) to pop a scope it didn't push with cmake_policy(PUSH).
* ENH: Make policy push/pop methods privateBrad King2009-01-221-3/+7
| | | | | | | | This makes cmMakefile::PushPolicy and cmMakefile::PopPolicy private so that any outside place that uses them needs to use the PolicyPushPop helper in an automatic variable. We grant an exception to cmCMakePolicyCommand so it can implement cmake_policy(PUSH) and cmake_policy(POP).
* ENH: Create automatic policy push/pop helperBrad King2009-01-221-0/+12
| | | | | | This creates cmMakefile::PolicyPushPop to push and pop policy scope automatically. It also enforces balanced push/pop pairs inside the scope it handles.
* ENH: Refactor policy stack representationBrad King2009-01-221-3/+9
| | | | | | This defines PolicyMap as a public member of cmPolicies. Its previous role as a policy stack entry is now called PolicyStackEntry and represented as a class to which more information can be added later.
* ENH: Better handling of mismatched blocksBrad King2009-01-211-1/+1
| | | | | | | | | | | | | | | | If a logical block terminates with mismatching arguments we previously failed to remove the function blocker but replayed the commands anyway, which led to cases in which we failed to report the mismatch (return shortly after the ending command). The recent refactoring of function blocker deletion changed this behavior to produce an error on the ending line by not blocking the command. Furthermore, the function blocker would stay in place and complain at the end of every equal-level block of the same type. This teaches CMake to treat the begin/end commands (if/endif, etc.) as correct and just warns when the arguments mismatch. The change allows cases in which CMake 2.6.2 silently ignored a mismatch to run as before but with a warning.
* ENH: Better error message for unclosed blocksBrad King2009-01-211-2/+1
| | | | | | 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 logical block enforcementBrad King2009-01-211-1/+18
| | | | | | This uses a stack of 'barriers' to efficiently divide function blockers into groups corresponding to each input file. It simplifies detection of missing block close commands and factors it out of ReadListFile.
* ENH: Refactor function blocker deletionBrad King2009-01-201-3/+8
| | | | | | | | | 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: Improve response to bad if or elseifBrad King2009-01-201-0/+19
| | | | | | | Previously bad arguments to an if() or elseif() would cause some subsequent statements in the corresponding block to execute. This teaches CMake to stop processing commands with a fatal error. It also provides context to bad elseif() error messages.
* BUG: Enforce matching policy PUSH/POP in all filesBrad King2009-01-151-1/+1
| | | | | | The documentation of cmake_policy PUSH and POP states that they must always match. Previously we enforced this only for the top scope of each CMakeLists.txt file. This enforces the requirement for all files.
* BUG: Pop a function scope even on errorBrad King2009-01-141-0/+10
| | | | | | This uses an automatic variable to push and pop variable scope inside a function call. Previously if the function failed its scope would not be popped. This approach guarantees a balanced push/pop.
* ENH: Improve test property speed with a mapBrad King2009-01-051-2/+2
| | | | | | | Previously we stored a vector of tests to preserve their order. Property set/get operations would do a linear search for matching tests. This uses a map to efficiently look up tests while keeping the original order with a vector for test file generation.
* BUG: fix issue with -D and cache forceBill Hoffman2008-11-211-1/+2
|
* ENH: Return utility target after creationBrad King2008-10-091-6/+6
| | | | | | After creating a utility target with AddUtilityCommand, return a pointer to the cmTarget instance so the caller may further modify the target as needed.
* BUG: Skip a command if its arguments fail to parseBrad King2008-09-241-1/+1
| | | | | | | | If the arguments to a command fail to parse correctly due to a syntax error, the command should not be invoked. This avoids problems created by processing of commands with bad arguments. Even though the build system will not be generated, the command may affect files on disk that persist across CMake runs.
* ENH: Add unset() command.Brad King2008-08-251-0/+2
| | | | | | | | This introduces the unset() command to make it easy to unset CMake variables, environment variables, and CMake cache variables. Previously it was not even possible to unset ENV or CACHE variables (as in completely remove them). Changes based on patch from Philip Lowman. See issue #7507.
* ENH: Improve errors when a policy is REQUIREDBrad King2008-08-181-0/+1
| | | | | | 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.
* BUG: Fix computed directory property DEFINITIONS.Brad King2008-06-261-0/+5
| | | | | | | | | | - The property tracks the value formed by add_definitions and remove_definitions command invocations. - The string should be maintained for use in returning for the DEFINITIONS property value. - It is no longer used for any other purpose. - The DEFINITIONS property was recently documented as deprecated. - See bug #7239.
* BUG: Remove check for files written by file(WRITE) being loaded.Brad King2008-04-301-12/+0
| | | | | | | | | | | | - CMake 1.8 and below did not do the check but could get in infinite loops due to the local generate step. - CMake 2.0 added the check but failed to perform it in directories with no targets (see bug #678). - CMake 2.2 removed the local generate which fixed the problem but did not remove the check. - Between CMake 2.4 and 2.6.0rc6 the check was fixed to work even when no targets appear in a directory (see bug #6923). - Bottom line: the check is no longer needed.
* ENH: Allow policy CMP0000 to be set explicitlyBrad King2008-03-311-0/+8
| | | | | | | | - 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: Improve new error/warning message generationBrad King2008-03-131-0/+5
| | | | | | | | | | - Add cmListFileBacktrace to record stack traces - Move main IssueMessage method to the cmake class instance (make the backtrace an explicit argument) - Change cmMakefile::IssueMessage to construct a backtrace and call the cmake instance version - Record a backtrace at the point a target is created (useful later for messages issued by generators)
* ENH: add enum to IssueMessageBill Hoffman2008-03-111-5/+3
|
* ENH: New format for warning and error messagesBrad King2008-03-071-0/+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
* ENH: Improve cmake_policy command signatureBrad King2008-03-051-1/+1
| | | | | - Replace NEW and OLD modes with a SET mode for clarity - Enforce VERSION argument validity (major.minor[.patch])
* ENH: add first cut and policies still need to add the doc supportKen Martin2008-03-011-1/+24
|
* ENH: Add global property ALLOW_DUPLICATE_CUSTOM_TARGETS to help existing ↵Brad King2008-02-141-1/+2
| | | | projects that depend on having duplicate custom targets. It is allowed only for Makefile generators. See bug#6348.
* ENH: Enforce global target name uniqueness.Brad King2008-02-111-0/+5
| | | | | | | | - Error if imported target is involved in conflict - Error for non-imported target conflict unless CMAKE_BACKWARDS_COMPATIBILITY <= 2.4 - Include OUTPUT_NAME property in error message - Update add_executable and add_library command documentation
* ENH: Add cmMakefile::NeedBackwardsCompatibility method to pass through to ↵Brad King2008-02-111-0/+7
| | | | cmLocalGenerator::NeedBackwardsCompatibility for convenience.
* ENH: Updated exporting and importing of targets to support libraries and ↵Brad King2008-01-281-6/+12
| | | | | | | | | | | | | | | | | | configurations. - Created cmExportFileGenerator hierarchy to implement export file generation - Installed exports use per-config import files loaded by a central one. - Include soname of shared libraries in import information - Renamed PREFIX to NAMESPACE in INSTALL(EXPORT) and EXPORT() commands - Move addition of CMAKE_INSTALL_PREFIX to destinations to install generators - Import files compute the installation prefix relative to their location when loaded - Add mapping of importer configurations to importee configurations - Rename IMPORT targets to IMPORTED targets to distinguish from windows import libraries - Scope IMPORTED targets within directories to isolate them - Place all properties created by import files in the IMPORTED namespace - Document INSTALL(EXPORT) and EXPORT() commands. - Document IMPORTED signature of add_executable and add_library - Enable finding of imported targets in cmComputeLinkDepends
* ENH: Added cmMakefile::NeedCacheCompatibility method and support for it in ↵Brad King2008-01-241-0/+4
| | | | cmCacheManager. This will allow commands to modify their behavior when running with a cache loaded from an earlier CMake version.
* ENH: add return and break support to cmake, also change basic command ↵Ken Martin2008-01-231-6/+9
| | | | invocation signature to be able to return extra informaiton via the cmExecutionStatus class
* ENH: Converted cmMakefile DefineFlags added by ADD_DEFINITIONS command into ↵Brad King2008-01-181-0/+2
| | | | a COMPILE_DEFINITIONS directory property.
* ENH: Add AppendProperty methods for use by C++ code in CMake. Simplify ↵Brad King2008-01-171-0/+1
| | | | implementation of SET_PROPERTY command by using them.
* ENH: change raise_scope signature to be safer for returned varuablesKen Martin2008-01-031-1/+1
|
* ENH: add functions and raise scopeKen Martin2007-12-031-1/+6
|
* COMP: parent is not used anymore with this patch, since now the name isAlexander Neundorf2007-08-261-3/+2
| | | | | | given as a vector of components Alex
* BUG: fix #4057 (which had several duplicates): handle recursivew source ↵Alexander Neundorf2007-08-241-2/+10
| | | | | | groups better, i.e. multiple sourcegroups with the same end component work now Alex
* STYLE: fix line lengthsAlexander Neundorf2007-07-201-1/+3
| | | | Alex
* ENH: add OPTIONAL keyword to ENABLE_LANGUAGE, so it will be possible to doAlexander Neundorf2007-06-281-1/+1
| | | | | | | | | | | | | something like this: ENABLE_LANGUAGE(ASM-ATT) IF(CMAKE_ASM-ATT_COMPILER_WORKS) ... do assembler stufff ELSE(CMAKE_ASM-ATT_COMPILER_WORKS) ... fallback to generic C/C++ ENDIF(CMAKE_ASM-ATT_COMPILER_WORKS) Alex
* ENH: add IMPORT keyword to ADD_LIBRARY, dependencies are not yet workingAlexander Neundorf2007-06-221-1/+1
| | | | | | STYLE: fix line lengths and indentation, use enum as argument to AddLibrary() instead of int (which was initialized from a bool in some cases) Alex
* STYLE: GetProjectName() is constAlexander Neundorf2007-06-211-1/+1
| | | | Alex
* ENH: Merging changes from branch CMake-SourceFile2-b between tagsBrad King2007-06-181-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | CMake-SourceFile2-bp and CMake-SourceFile2-b-mp1 to trunk. This commit is surrounded by tags CMake-SourceFile2-b-mp1-pre and CMake-SourceFile2-b-mp1-post on the trunk. The changes re-implement cmSourceFile and the use of it to allow instances to be created much earlier. The use of cmSourceFileLocation allows locating a source file referenced by a user to be much simpler and more robust. The two SetName methods are no longer needed so some duplicate code has been removed. The strange "SourceName" stuff is gone. Code that created cmSourceFile instances on the stack and then sent them to cmMakefile::AddSource has been simplified and converted to getting cmSourceFile instances from cmMakefile. The CPluginAPI has preserved the old API through a compatibility interface. Source lists are gone. Targets now get real instances of cmSourceFile right away instead of storing a list of strings until the final pass. TraceVSDependencies has been re-written to avoid the use of SourceName. It is now called TraceDependencies since it is not just for VS. It is now implemented with a helper object which makes the code simpler.
* STYLE: minor fixesAlexander Neundorf2007-06-151-2/+2
| | | | Alex
* STYLE: remove duplicate non-const accessors GetLocalGenerator(int) andAlexander Neundorf2007-06-151-0/+4
| | | | | | | | | | | | GetLocaGenerators(cmLocalGenerators) from cmGlobalGenerator(). Now there is one const accessor which is even faster since it returns a reference (instead of copying a vector) -more const to ensure that this the returned local generators don't actually get modified -removed duplicated code in GetCTestCommand() and GetCPackCommand() -added some const accessors Alex
* BUG: More problems with cmMakefile copy-constructor. It seems the regular ↵Brad King2007-06-111-0/+1
| | | | expression class cannot be assigned but does not enforce this limitation at compile time.
* BUG: Fixed @ONLY configuration to not try to parse ${} syntax at all. This ↵Brad King2007-06-061-2/+3
| | | | fixes the original fix to bug#4393 and adds a test.
* ENH: add the IMPORT keyword to ADD_EXECUTABLE(), which generates anAlexander Neundorf2007-05-221-1/+5
| | | | | | | | | | "imported" executable target. This can then be used e.g. with ADD_CUSTOM_COMMAND() to generate stuff. It adds a second container for "imported" targets, and FindTarget() now takes an additional argument bool useImportedTargets to specify whether you also want to search in the imported targets or only in the "normal" targets. Alex