summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.h
Commit message (Collapse)AuthorAgeFilesLines
* Rename the IncludeDirectoriesEntry to be more generic.Stephen Kelly2013-02-121-5/+2
|
* Process generator expressions for 'system' include directories.Stephen Kelly2013-02-071-1/+1
| | | | | | | | | | Since commit 08cb4fa4 (Process generator expressions in the INCLUDE_DIRECTORIES property., 2012-09-18), it is possible to use generator expressions with the include_directories command. As that command can also have a SYSTEM argument, ensure that the result of using that argument with generator expressions gives a sane result.
* Only output includes once after the start of 'generate-time' when debugging.Stephen Kelly2013-01-211-0/+6
| | | | | | During configure-time, GetIncludeDirectories may be called too, for example if using the export() command. As the content can be different, it should be output each time then.
* Store includes from the same include_directories call together.Stephen Kelly2013-01-211-2/+3
| | | | | | Otherwise, we get a separate IncludeDirectoriesEntry for each include, and that causes unnecessary and confusing splitting in the output when debugging the INCLUDE_DIRECTORIES property.
* Keep track of INCLUDE_DIRECTORIES as a vector of structs.Stephen Kelly2013-01-031-0/+10
| | | | | The struct can keep track of where the include came from, which gives us proper backtraces.
* Add policy CMP0019 to skip include/link variable re-expansionBrad King2012-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Historically CMake has always expanded ${} variable references in the values given to include_directories(), link_directories(), and link_libraries(). This has been unnecessary since general ${} evaluation syntax was added to the language a LONG time ago, but has remained for compatibility with VERY early CMake versions. For a long time the re-expansion was a lightweight operation because it was only processed once at the directory level and the fast-path of cmMakefile::ExpandVariablesInString was usually taken because values did not have any '$' in them. Then commit d899eb71 (Call ExpandVariablesInString for each target's INCLUDE_DIRECTORIES, 2012-02-22) made the operation a bit heavier because the expansion is now needed on a per-target basis. In the future we will support generator expressions in INCLUDE_DIRECTORIES with $<> syntax, so the fast-path in cmMakefile::ExpandVariablesInString will no longer be taken and re-expansion will be very expensive. Add policy CMP0019 to skip the re-expansion altogether in NEW behavior. In OLD behavior perform the expansion but improve the fast-path heuristic to match ${} but not $<>. If the policy is not set then warn if expansion actually does anything. We expect this to be encountered very rarely in practice.
* GenEx: Add an accessor for imported targets in a makefile.Stephen Kelly2012-10-221-0/+4
|
* Add convenience for getting a cmGeneratorTarget to use.Stephen Kelly2012-09-191-0/+1
|
* Store cmGeneratorTargets with the makefile.Stephen Kelly2012-09-191-0/+12
|
* Ninja: suppress cmcldeps only for source file signature try_compilesPeter Kümmel2012-09-051-0/+2
|
* Print any evaluated 'elseif'/'else' commands in trace mode (#13220)Brian Helba2012-05-161-0/+5
| | | | | | In trace mode ('--trace'), any 'elseif' or 'else' commands that are evaluated as part of a conditional block will be printed. Previously, only the opening 'if' command of a conditional block was printed.
* Merge topic 'module-no-soname'David Cole2012-05-011-0/+3
|\ | | | | | | | | | | fdb3f87 Test NO_SONAME property (#13155) e1409ac Support building shared libraries or modules without soname (#13155)
| * Support building shared libraries or modules without soname (#13155)Modestas Vainius2012-04-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a boolean target property NO_SONAME which may be used to disable soname for the specified shared library or module even if the platform supports it. This property should be useful for private shared libraries or various plugins which live in private directories and have not been designed to be found or loaded globally. Replace references to <CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG> and hard-coded -install_name flags with a conditional <SONAME_FLAG> which is expanded to the value of the CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG definition as long as soname supports is enabled for the target in question. Keep expanding CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG in rules in case third party projects still use it. Such projects would not yet use NO_SONAME so the adjacent <TARGET_SONAME> will always be expanded. Make <TARGET_INSTALLNAME_DIR> NO_SONAME aware as well. Since -install_name is soname on OS X, this should not be a problem if this variable is expanded only if soname is enabled. The Ninja generator performs rule variable substitution only once globally per rule to put its own placeholders. Final substitution is performed by ninja at build time. Therefore we cannot conditionally replace the soname placeholders on a per-target basis. Rather than omitting $SONAME from rules.ninja, simply do not write its contents for targets which have NO_SONAME. Since 3 variables are affected by NO_SONAME ($SONAME, $SONAME_FLAG, $INSTALLNAME_DIR), set them only if soname is enabled.
* | Cleanup custom command .rule file internal handlingBrad King2012-04-181-14/+16
|/ | | | | | | | Teach cmMakefile::AddCustomCommandToOutput to return the cmSourceFile instance to which the custom command is attached. Use the return value instead of separately adding a .rule extension and searching for the source. Mark CMake-generated .rule files explicitly with a property instead of trusting the file extension.
* Merge topic 'target-include-directories'David Cole2012-03-081-19/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d662dff Fix shadowed variable warning on dashboard results f66e735 Fix compiler warning reported on older Borland dashboard. d90eed4 Fix compiler error reported on older Borland dashboard. 8233636 Update the documentation regarding INCLUDE_DIRECTORIES. d899eb7 Call ExpandVariablesInString for each target's INCLUDE_DIRECTORIES c21db87 Make search paths ordered and unique 22021f0 Remove cmMakefile::GetIncludeDirectories 9106b56 Extract and use the INCLUDE_DIRECTORIES target properties. 840509b Keep the INCLUDE_DIRECTORIES target property up to date. a4d5f7b Add API to get the ordered includes for a target. 8adaee2 CMake: Eliminate cmMakefile::IncludeDirectories 7620932 Remove include flags memoization. 97a5faa Make it safe to call this method without creating duplicates. edd5303 Refactor GetIncludeFlags to take includes instead of fetching them
| * Remove cmMakefile::GetIncludeDirectoriesDavid Cole2012-02-221-5/+0
| | | | | | | | | | After making the changes to use the new target level INCLUDE_DIRECTORIES property, there are no more callers of this method.
| * CMake: Eliminate cmMakefile::IncludeDirectoriesDavid Cole2012-02-221-15/+2
| | | | | | | | Instead, re-implement it in terms of the directory property INCLUDE_DIRECTORIES.
* | Rename UsedCommands to FinalPassCommandsYury G. Kudryashov2012-02-291-7/+1
|/ | | | | When I read 'UsedCommands' I thought that it holds all commands used in the file, not only those that have FinalPass().
* Optionally allow IMPORTED targets to be globally visibleBrad King2012-01-251-1/+2
| | | | | | | | | | | | Consider the case motivating commit e01cce28 (Allow add_dependencies() on imported targets, 2010-11-19). An imported target references a file generated at build time by a custom target on which it depends. Had the file been built directly using add_library or add_executable its target name would have been visible globally. Therefore the imported target representing the file should be globally visible also. Teach the IMPORTED signature of add_(executable|library) to accept a new "GLOBAL" option to make the imported target visible globally.
* Add NEWLINE_STYLE option to configure_file (#3957)Peter Kuemmel2011-11-281-1/+4
|
* Doxygen: Fix warnings.Nicolas Despres2011-10-231-2/+2
|
* Remove trailing white-spaces.Nicolas Despres2011-10-231-72/+72
|
* Add AUTOMOC to the add_library() commandAlex Neundorf2011-08-141-1/+1
| | | | Alex
* Fix #12342: Add APPEND_STRING option to set_property()Alex Neundorf2011-07-151-1/+1
| | | | | | | | | set_property() has APPEND, which creates a list. E.g. when appending to COMPILE_FLAGS a string is needed, not a list. With the APPEND_STRING option the value is append as string, not as list. Alex
* Add CMAKE_ARGC and CMAKE_ARGV0..N-1 variables (#2828)David Cole2011-02-031-0/+5
| | | | For now, these variables are only available in -P script mode.
* Add CMAKE_SCRIPT_MODE_FILE variable (#2828)David Cole2011-02-021-1/+6
| | | | | New CMake variable is set when processing a -P script file, but not when configuring a project.
* Merge branch 'cmake-guiRememberAdvancedCheckbox' into dev/strict-modeBrad King2010-12-171-1/+5
|\ | | | | | | | | Conflicts: Source/QtDialog/CMakeSetupDialog.cxx
| * No CMAKE_CONFIGURATION_TYPES in single-config generators (#10202)Brad King2010-09-081-1/+5
| | | | | | | | | | | | Factor out reading of CMAKE_CONFIGURATION_TYPES and CMAKE_BUILD_TYPE into cmMakefile::GetConfigurations. Read the former only in multi-config generators.
* | Factor out the checks for unused variablesBen Boeckel2010-09-221-0/+2
| |
* | Remove VarRemoved code since it's been supercededBen Boeckel2010-09-161-4/+0
| |
* | Rework CheckVariableForUnused usageBen Boeckel2010-09-161-1/+1
| |
* | Add method to allow variables to be marked as usedBen Boeckel2010-09-151-0/+2
| |
* | Factor out checks for unused variablesBen Boeckel2010-09-141-1/+4
| |
* | Add a flag to warn about system filesBen Boeckel2010-09-011-0/+1
| |
* | Rename flags again and use variablewatch for cliBen Boeckel2010-09-011-1/+0
| |
* | Rename find-unused to warn-unusedBen Boeckel2010-09-011-1/+1
| |
* | Detect unused variablesBen Boeckel2010-09-011-0/+6
| |
* | Complete strict-mode checks for uninitialized varsBen Boeckel2010-09-011-0/+2
| |
* | Add a warning when variables are used uninitialized.Bill Hoffman2010-09-011-0/+4
|/
* Remove unused cmData and cmMakefile::DataMapBrad King2010-04-261-8/+0
| | | | | | | | | These were implementation details of the unused methods cmMakefile::RegisterData cmMakefile::LookupData We simply remove the methods, members, and class cmData.
* Remove CMake Policy CMP0015 until it is revisedBrad King2009-10-081-5/+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.
* Introduce "build feature" lookup frameworkBrad King2009-10-021-0/+2
| | | | | | | 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/+3
| | | | 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.
* Create CMake Policy CMP0015 to fix set(CACHE)Brad King2009-09-101-0/+5
| | | | | | | | 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-2/+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).
* No /fast targets in try_compile project modeBrad King2009-08-041-0/+1
| | | | | | | | 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: Improve dynamic variable scope implementationBrad King2009-07-221-4/+2
| | | | | | | | | | | | 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: Create CMP0013 to disallow duplicate dirsBrad King2009-06-171-0/+2
| | | | | | | | | | | | 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: Refactor generation of CTestTestfile contentBrad King2009-03-161-2/+7
| | | | | | | | | 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).