summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | Factor out checks for unused variablesBen Boeckel2010-09-141-17/+32
| | | | | |
| * | | | | Use built-ins for readability and maintainabilityBen Boeckel2010-09-081-4/+4
| | | | | |
| * | | | | Push the initialize and unused states when copyingBen Boeckel2010-09-071-0/+2
| | | | | |
| * | | | | Fix detection of system filesBen Boeckel2010-09-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of looking to see if the file is under CMAKE_ROOT, check to see if it is instead under the source or binary directories in use.
| * | | | | Run the unused variables check on the final passBen Boeckel2010-09-021-0/+2
| | | | | |
| * | | | | Add a flag to warn about system filesBen Boeckel2010-09-011-3/+11
| | | | | |
| * | | | | Rename flags again and use variablewatch for cliBen Boeckel2010-09-011-7/+0
| | | | | |
| * | | | | Default to marking things as usedBen Boeckel2010-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we don't then: cmake --warn-unused --warn-unused-all acts differently than: cmake --warn-unused-all --warn-unused
| * | | | | Rename find-unused to warn-unusedBen Boeckel2010-09-011-8/+8
| | | | | |
| * | | | | Detect unused variablesBen Boeckel2010-09-011-2/+63
| | | | | |
| * | | | | Complete strict-mode checks for uninitialized varsBen Boeckel2010-09-011-1/+34
| | | | | |
| * | | | | Add a warning when variables are used uninitialized.Bill Hoffman2010-09-011-0/+11
| | | | | |
* | | | | | Merge topic 'recursive-CMAKE_USER_MAKE_RULES_OVERRIDE'Brad King2011-01-261-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | c83a834 try_compile: Allow only languages loaded in caller (#11469)
| * | | | | | try_compile: Allow only languages loaded in caller (#11469)Brad King2011-01-241-1/+1
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During a try_compile cmGlobalGenerator::EnableLanguage uses results from the outer project. Reject attempts to enable languages in the test project that are not "ready" in the outer project. Mark a language as "ready" when all its information has been loaded and we are ready to generate build rules. This also avoids infinite recursion introduced by commit 295b5b60 (Honor CMAKE_USER_MAKE_RULES_OVERRIDE in try_compile, 2010-06-29) for projects that set CMAKE_USER_MAKE_RULES_OVERRIDE to a file that uses try_compile. The file is loaded along with the information for a given langauge so the language is not yet "ready".
* | | | | | Merge topic 'try_compile-Makefile-config'Brad King2011-01-191-0/+12
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 052c2ae Document CMAKE_TRY_COMPILE_CONFIGURATION variable 56efc60 Honor CMAKE_TRY_COMPILE_CONFIGURATION in Makefile generators (#10809)
| * | | | | | Honor CMAKE_TRY_COMPILE_CONFIGURATION in Makefile generators (#10809)Brad King2011-01-171-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously this was used only in multi-configuration generators to choose the configuration of try_compile and try_run at their build time. Teach CMake to honor the variable in single-configuration generators as the CMAKE_BUILD_TYPE.
* | | | | | | Combine duplicate COMPILE_DEFINITIONS disclaimerBrad King2011-01-171-8/+2
|/ / / / / /
* | | | | | Merge topic 'policy-CMP0017'Brad King2011-01-111-20/+85
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ce28737 Remove usage of CMAKE_CURRENT_LIST_DIR now that we have CMP0017 7db8db5 Improve documentation and messages for the new CMP0017 db44848 Prefer files from CMAKE_ROOT when including from CMAKE_ROOT 1e69c6f Merge branch 'user-policy-defaults' into policy-CMP0017 65a0a2a Merge branch 'include-command-whitespace' into policy-CMP0017
| * | | | | | Prefer files from CMAKE_ROOT when including from CMAKE_ROOTAlex Neundorf2011-01-041-20/+85
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes include() and find_package() prefer cmake files located in CMAKE_ROOT over those in CMAKE_MODULE_PATH. This makes sure that the including file gets that file included which it expects, i.e. the one from cmake with which it was tested. It only changes behaviour when such an included file exists both in CMAKE_MODULE_PATH and in CMAKE_ROOT. This comes together with a new policy CMP0017, with default behaviour it behaves as it always did, but warns. With NEW behaviour it includes the file from CMAKE_ROOT instead from CMAKE_MODULE_PATH. This fixes (if CMP0017 is set) building KDE 4.5 with cmake >= 2.8.3. Also a basic test for this policy in included.
* | | | | | Merge topic 'cygwin'Brad King2010-12-211-4/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 85c0a69 Cygwin: Do not define 'WIN32' (#10122) 62c6d2d Merge branch 'cmake_--system-information_min-version' into cygwin 72db20f Merge branch 'tests-if-CYGWIN' into cygwin 5adef16 Merge branch 'cygwin-module-prefix' into cygwin cbc3258 Merge branch 'try-compile-min-version' into cygwin
| * | | | | | Cygwin: Do not define 'WIN32' (#10122)Brad King2010-12-171-4/+6
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of Cygwin's goals is to build projects using the POSIX API with no Windows awareness. Many CMake-built projects have been written to test for UNIX and WIN32 but not CYGWIN. The preferred behavior under Cygwin in such projects is to take the UNIX path but not the WIN32 path. Unfortunately this change is BACKWARDS INCOMPATIBLE for Cygwin-aware CMake projects! Some projects that previously built under Cygwin and are Cygwin-aware when they test for WIN32 may now behave differently. Eventually these projects will need to be updated, but to help users build them in the meantime we print a warning about the change in behavior. Furthermore, one may set CMAKE_LEGACY_CYGWIN_WIN32 to request old behavior during the transition. Normally we avoid backwards incompatible changes, but we make an exception in this case for a few reasons: (1) This behavior is preferred by Cygwin's design goals. (2) A warning provides a clear path forward for everyone who may see incompatible behavior, and CMAKE_LEGACY_CYGWIN_WIN32 provides a compatibility option. The warning and compatibility option both disappear when the minimum required version of CMake in a project is sufficiently new, so this issue will simply go away over time as projects are updated to account for the change. (3) The fixes required to update projects are fairly insignificant. Furthermore, the Cygwin distribution has no releases itself so project versions that predate said fixes tend to be difficult to build anyway. (4) This change enables many CMake-built projects that did not previously build under Cygwin to work out-of-the-box. From bug #10122: "I have built over 120 different source packages with (my patched) CMake, including most of KDE4, and have found that NOT defining WIN32 on Cygwin is much more accurate." -- Yaakov Selkowitz A fully compatible change would require patches on top of these project releases for Cygwin even though they otherwise need not be aware of it. (5) Yaakov has been maintaining a fork of CMake with this change for the Cygwin Ports distribution. It works well in practice. By accepting the change in upstream CMake we avoid confusion between the versions. CMake itself builds without WIN32 defined on Cygwin. Simply disable CMAKE_LEGACY_CYGWIN_WIN32 explicitly in our own CMakeLists.txt file.
* | | | | | Merge topic 'custom-command-generator-expressions'Brad King2010-12-211-2/+3
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4499d50 Mark CustomCommand test perconfig.out as SYMBOLIC f0cdb60 Introduce "generator expression" syntax to custom commands (#11209) 4749e4c Record set of targets used in cmGeneratorExpression ef9e9de Optionally suppress errors in cmGeneratorExpression 45e1953 Factor per-config sample targets out of 'Testing' test 4091bca Factor generator expression docs out of add_test bfb7288 Record backtrace in cmCustomCommand
| * | | | | Record backtrace in cmCustomCommandBrad King2010-12-151-2/+3
| |/ / / / | | | | | | | | | | | | | | | | | | | | This will be used to report custom command errors to the user with a backtrace pointing at the add_custom_command or add_custom_target call.
* | | | | Document target_link_libraries target scope (#11058)Brad King2010-12-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The target_link_libraries command requires its first argument to be a target in the current directory. Document this and update the error message to be more specific. While at it, format the error message with a call stack.
* | | | | Fix dependency tracing of INSTALL and PACKAGE (#11598)Brad King2010-12-131-0/+6
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit e01cce28 (Allow add_dependencies() on imported targets, 2010-11-19) started using cmMakefile::FindTargetToUse to follow dependencies, including those of GLOBAL_TARGETs like INSTALL and PACKAGE. Since global targets exist in every directory, dependencies between them must be traced within each directory too. Teach FindTargetToUse to check the current directory before checking globally. For global targets this will find the local copy. For for normal targets this will be a no-op because they are globally unique.
* | | | Merge topic 'AddCMAKE_CURRENT_LIST_DIR'David Cole2010-10-191-20/+26
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | b011840 Use absolute path to FindPackageHandleStandardArgs.cmake everywhere 41e4f1a Add automatic variable CMAKE_CURRENT_LIST_DIR(dir of CMAKE_CURRENT_LIST_FILE) f9fc79c Remove trailing whitespace
| * | | Add automatic variable CMAKE_CURRENT_LIST_DIR(dir of CMAKE_CURRENT_LIST_FILE)Alex Neundorf2010-09-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Comes with a simple test and docs. Alex
| * | | Remove trailing whitespaceAlex Neundorf2010-09-281-20/+20
| | |/ | |/| | | | | | | Alex
* | | Fix for bug #11274, VS10 custom commands that create files in INTDIR fix.Bill Hoffman2010-09-291-0/+8
|/ /
* | No CMAKE_CONFIGURATION_TYPES in single-config generators (#10202)Brad King2010-09-081-10/+26
|/ | | | | | Factor out reading of CMAKE_CONFIGURATION_TYPES and CMAKE_BUILD_TYPE into cmMakefile::GetConfigurations. Read the former only in multi-config generators.
* 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
|