summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'version'Brad King2010-05-171-5/+3
|\
| * New version scheme to support branchy workflowBrad King2010-04-231-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Remove unused cmData and cmMakefile::DataMapBrad King2010-04-261-57/+0
|/ | | | | | | | | These were implementation details of the unused methods cmMakefile::RegisterData cmMakefile::LookupData We simply remove the methods, members, and class cmData.
* Warn on set(PARENT_SCOPE) at top scopeBrad King2009-11-021-2/+8
| | | | | | | Previously we silently ignored such calls and set nothing. The commit "Initialize directory scope with closure of parent" inroduced a bad test for the top scope. This commit fixes the test to avoid dereferencing a null pointer, and adds a warning when the case is encountered.
* Remove CMake Policy CMP0015 until it is revisedBrad King2009-10-081-51/+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.
* Do not collapse path of NOTFOUND valuesBrad King2009-10-071-1/+4
| | | | | | | | In cmMakefile::AddCacheDefinition we collapse paths specified in PATH or FILEPATH cache entries originally specified on the command line with UNINITALIZED type. This commit fixes the logic to avoid collapsing <var>-NOTFOUND and other false values. The change allows other CMake code to force a NOTFOUND value on an entry with UNINITALIZED type.
* Create explicit cmTarget::FinishConfigure stepBrad King2009-10-051-1/+1
| | | | | | | This method is called during ConfigureFinalPass on every target. It gives each target a chance to do some final processing after it is known that no more commands will affect it. Currently we just call the old AnalyzeLibDependencies that used to be called directly.
* Create INTERPROCEDURAL_OPTIMIZATION build featureBrad King2009-10-021-0/+13
| | | | | | | | This commit creates target and directory properties to enable the Intel interprocedural optimization support on Linux. Enabling it adds the compiler option '-ipo' and uses 'xiar' to create archives. See issue #9615.
* Introduce "build feature" lookup frameworkBrad King2009-10-021-0/+25
| | | | | | | This creates cmTarget::GetFeature and cmMakefile::GetFeature methods to query "build feature" properties. These methods handle local-to-global scope and per-configuration property lookup. Specific build features will be defined later.
* Create cmMakefile::PlatformIs64Bit helper methodBrad King2009-09-301-0/+9
| | | | This method centralizes tests for whether CMAKE_SIZEOF_VOID_P is 8.
* 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.
* Remove old check for duplicate subdirectoriesBrad King2009-09-171-15/+0
| | | | | | | | | In cmMakefile::AddSubDirectory we were checking for addition of the same source directory multiple times. However, the check code was incorrect because it compared pointers instetad of pointed-to strings. Since the check was written, a better check was added right after it to enforce unique binary directories (in which case duplicate sources are fine). This commit simply removes the old-style check code.
* Initialize directory scope with closure of parentBrad King2009-09-161-2/+10
| | | | | | | | | | | | | The commit "Improve dynamic variable scope implementation" optimized function scopes using an efficient parent scope pointer. However, the parent scope used to initialize a new directory might not exist later (like add_subdirectory called inside a function of the parent scope). This caused CMake to crash when following the dangling pointer to the original parent scope. We fix the problem in this commit by always computing the closure of the parent scope at directory initialization time so that no parent scope pointer is needed. See issue #9538.
* Create CMake Policy CMP0015 to fix set(CACHE)Brad King2009-09-101-0/+51
| | | | | | | | 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.
* Remove barely-used cmMakefile::AddCacheDefinitionBrad King2009-09-101-17/+0
| | | | | | | | The boolean overload of this method was used only to implement option(). We re-implement option() in terms of the main method and removes the now-unused signature. This removes some duplicate code that had already fallen behind on changes (it was not removing the local definition instead of setting it).
* Record backtrace for every add_test commandBrad King2009-08-111-2/+1
| | | | | | We teach cmTest to hold a backtrace for the add_test command that created it. This will be used later to report context for errors at generate time.
* No /fast targets in try_compile project modeBrad King2009-08-041-0/+2
| | | | | | | | The try_compile command builds the cmTryCompileExec executable using the cmTryCompileExec/fast target with Makefile generators in order to save time since dependencies are not needed. However, in project mode the command builds an entire source tree that may have dependencies. Therefore we can use the /fast target approach only in one-source mode.
* ENH: Keep only FinalPass commands in memoryBrad King2009-07-241-1/+1
| | | | | | In cmMakefile we save all invoked commands so that FinalPass can be called on them later. Most commands have no final pass, so we should keep only the few that do.
* ENH: Improve dynamic variable scope implementationBrad King2009-07-221-91/+41
| | | | | | | | | | | | Previously each new variable scope (subdirectory or function call) in the CMake language created a complete copy of the key->value definition map. This avoids the copy using transitive lookups up the scope stack. Results of queries answered by parents are stored locally to maintain locality of reference. The class cmDefinitions replaces cmMakefile::DefinitionsMap, and is aware of its enclosing scope. Each scope stores only the definitions set (or unset!) inside it relative to the enclosing scope.
* ENH: make sure GUIDs for filters are cachedBill Hoffman2009-07-171-11/+29
|
* ENH: add group support and fix borland errorBill Hoffman2009-07-111-1/+1
|
* ENH: first pass at VS 10, can bootstrap CMake, but many tests still failBill Hoffman2009-06-251-2/+2
|
* ENH: Clarify COMPILE_DEFINITIONS separator in docsBrad King2009-06-241-1/+2
| | | | | The COMPILE_DEFINITIONS properties are semicolon-separated lists. Make this clear in the documentation. See issue #9199.
* ENH: Create CMP0013 to disallow duplicate dirsBrad King2009-06-171-10/+49
| | | | | | | | | | | | 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.
* ENH: Support more preprocessor values in VS6Brad King2009-04-241-2/+3
| | | | | | | | | Previously we rejected all preprocessor definition values containing spaces for the VS6 IDE generator. In fact VS6 does support spaces but not in combination with '"', '$', or ';', and only if we use the sytnax '-DNAME="value with spaces"' instead of '-D"NAME=value with spaces"'. Now we support all definition values that do not have one of these invalid pairs. See issue #8779.
* ENH: Support preprocessor def values in VS6Brad King2009-03-231-3/+3
| | | | | | | | | The add_definitions() command and COMPILE_DEFINITIONS dir/tgt/src properties support preprocessor definitions with values. Previously values were not supported in the VS6 generator even though the native tool supports them. It is only values with spaces that VS6 does not support. This enables support and instead complains only for values with spaces. See issue #8779.
* ENH: Refactor generation of CTestTestfile contentBrad King2009-03-161-8/+8
| | | | | | | | | This moves code which generates ADD_TEST and SET_TESTS_PROPERTIES calls into CTestTestfile.cmake files out of cmLocalGenerator and into a cmTestGenerator class. This will allow more advanced generation without cluttering cmLocalGenerator. The cmTestGenerator class derives from cmScriptGenerator to get support for per-configuration script generation (not yet enabled).
* ENH: Enforce unique binary directoriesBrad King2009-02-271-0/+15
| | | | | | The second argument of add_subdirectory must name a unique binary directory or the build files will clobber each other. This enforces uniqueness with an error message.
* ENH: Define RULE_LAUNCH_* propertiesBrad King2009-02-101-0/+19
| | | | | | | This defines global, directory, and target properties RULE_LAUNCH_COMPILE, RULE_LAUNCH_LINK, and RULE_LAUNCH_CUSTOM. Their values specify 'launcher' command lines which are prefixed to compile, link, and custom build rules by Makefile generators.
* ENH: More robust property lookupBrad King2009-02-021-0/+4
| | | | | | This teaches cmMakefile::GetProperty and cmake::GetProperty methods to return NULL when the property name is NULL, making them more robust and consistent with the behavior of cmTarget::GetProperty.
* ENH: Isolate policy changes in included scriptsBrad King2009-01-221-5/+102
| | | | | | | | 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/+12
| | | | | | | 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-6/+13
| | | | | | | 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-41/+69
| | | | | 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: Create automatic policy push/pop helperBrad King2009-01-221-0/+29
| | | | | | 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-4/+3
| | | | | | 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-2/+15
| | | | | | | | | | | | | | | | 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-1/+20
| | | | | | 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-39/+68
| | | | | | 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-4/+4
| | | | | | | | | 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-20/+0
| | | | | | | 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: fix crash with empty propertiesBill Hoffman2009-01-181-2/+8
|
* BUG: Enforce matching policy PUSH/POP in all filesBrad King2009-01-151-13/+18
| | | | | | 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.
* ENH: Provide variable CMAKE_VERSIONBrad King2009-01-151-0/+5
| | | | | | This creates the variable CMAKE_VERSION containing the full version of cmake in "major.minor.patch" format. It is particularly useful with the component-wise version comparison provided by the if() command.
* ENH: Improve test property speed with a mapBrad King2009-01-051-17/+14
| | | | | | | 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-2/+8
|
* BUG: Finish fix to old DEFINITIONS propertyBrad King2008-10-091-0/+2
| | | | | | | The cmMakefile::DefineFlagsOrig ivar was created to help preserve the old DEFINITIONS property behavior now that definitions are moved from DefineFlags to the COMPILE_DEFINITIONS directory property. This fixes propagation of the original value into subdirectories.
* ENH: Return utility target after creationBrad King2008-10-091-6/+8
| | | | | | After creating a utility target with AddUtilityCommand, return a pointer to the cmTarget instance so the caller may further modify the target as needed.
* STYLE: fix line length stuff for KWStyleBill Hoffman2008-10-011-1/+2
|
* BUG: Skip a command if its arguments fail to parseBrad King2008-09-241-1/+2
| | | | | | | | 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.