summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'revise-compiler-id-policies' into releaseBrad King2014-04-021-0/+16
|\
| * Do not warn by default when policy CMP0025 or CMP0047 is not setBrad King2014-04-021-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These policies are triggered by the use of a particular compiler rather than outdated CMake code in a project. Avoid warning in every project that enables a language by not displaying the policy warning by default. Add variable CMAKE_POLICY_WARNING_CMP<NNNN> to control the warning explicitly; otherwise enable the warning with --debug-output or --trace. This breaks with strict policy convention because it does not provide developers with any warning about the behavior change by default. Existing projects will continue to build without a warning or change in behavior. When a developer changes the minimum required version of CMake in a project to a sufficiently high value (3.0), the project will suddenly get the new compiler id and may break, but at least the breakage comes with a change to the project rather than the version of CMake used to build it. Breaking strict policy convention is worthwhile in this case because very few projects will be affected by the behavior change but every project would have to see the warning if it were enabled by default.
* | Policies: omit warnings about unset policies when they are actually set to NEWNils Gladitz2014-03-311-3/+3
|/
* Disallow INTERFACE libraries with add_custom_command(TARGET).Stephen Kelly2014-03-191-0/+8
| | | | Don't attempt to trace their dependencies.
* cmMakefile: Return containers by const reference.Stephen Kelly2014-02-021-3/+3
| | | | They are not implicitly shared.
* cmMakefile: Fix minor indentation inconsistency.Stephen Kelly2014-02-021-4/+4
|
* cmMakefile: Make ConfigureString const.Stephen Kelly2014-01-221-1/+1
|
* cmMakefile: Make FindSourceGroup const.Stephen Kelly2014-01-221-5/+5
| | | | | Return a pointer instead of a reference. This allows making the accessor const with the least impact.
* cmMakefile: Trivially constify some methods.Stephen Kelly2014-01-221-22/+25
|
* cmMakefile: Consify custom command API.Stephen Kelly2014-01-221-1/+1
|
* cmMakefile: Constify policies accessors.Stephen Kelly2014-01-221-4/+4
|
* cmCacheManager: Consify version accessors.Stephen Kelly2014-01-221-2/+2
|
* cmSourceGroup: Fix method name capitalization.Stephen Kelly2014-01-221-2/+2
| | | | Adhere to the dominant style.
* cmMakefile: Constify some cmSourceGroup related code.Stephen Kelly2014-01-221-5/+6
|
* cmMakefile: Make GetProperty const.Stephen Kelly2014-01-221-8/+9
|
* Allow projects to specify extra inputs to CMakeBrad King2014-01-211-0/+24
| | | | | | | Define a new 'CMAKE_CONFIGURE_DEPENDS' directory property that projects can use to specify input files to the CMake configuration process. Extend the RunCMake.Configure test to verify that the build system re-runs CMake when this input changes.
* cmMakefile: make some methods take const std::string& instead of const char*Rolf Eike Beer2014-01-161-7/+11
| | | | | | | | Most callers already have a std::string, on which they called c_str() to pass it into these methods, which internally converted it back to std::string. Pass a std::string directly to these methods now, avoiding all these conversions. Those methods that only pass in a const char* will get the conversion to std::string now only once.
* cmTarget: Deprecate COMPILE_DEFINITIONS_ properties with a policy.Stephen Kelly2014-01-081-13/+15
|
* Merge topic 'unicode-fstream'Brad King2014-01-071-3/+3
|\ | | | | | | | | 5730710 Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.
| * Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.Clinton Stimpson2014-01-071-3/+3
| | | | | | | | | | Also use SystemTools::Fopen() instead of fopen(). This is to eventually support utf-8 filenames.
* | cmTarget: Don't update IMPORTED target compilation propertiesStephen Kelly2014-01-041-1/+1
|/ | | | | | The include_directories() and add_compile_options() commands should not append to the corresponding target property for IMPORTED targets. This is already the case for add_definitions().
* INTERFACE_LIBRARY: Avoid codepaths which set unneeded properties.Stephen Kelly2013-11-251-0/+8
| | | | | | | | | | | | | As an INTERFACE_LIBRARY has no direct link dependencies, we can short-circuit in cmGeneratorExpressionEvaluator and in cmGlobalGenerator::CheckLocalGenerators. As they do not generate any output directly, any generate- or install- related code acn also be short-circuited. Many of the local generators already do this. Because only INTERFACE related properties make sense on INTERFACE_LIBRARY targets, avoid setting other properties, for example via defaults.
* Merge topic 'use-generator-target'Brad King2013-11-221-2/+5
|\ | | | | | | | | aa29e64 Add a null check to the generator target accessor.
| * Add a null check to the generator target accessor.Stephen Kelly2013-11-211-2/+5
| |
* | Add policy CMP0040 to disallow custom commands on missing targetsNils Gladitz2013-11-211-23/+50
| |
* | cmMakefile: Make FindTarget const.Stephen Kelly2013-11-191-6/+4
| |
* | cmTarget: Make custom command accessors API const.Stephen Kelly2013-11-191-3/+3
|/ | | | Add specific mutators instead of providing non-const refs.
* Refactor internal resource location APIs and initializationBrad King2013-11-121-1/+0
| | | | | | | | | | | | | | | | | | | | Rename cmSystemTools::FindExecutableDirectory to FindCMakeResources. Teach it to compute the locations of cmake, ctest, cpack, ccmake, and cmake-gui executables, and the location of CMAKE_ROOT. Provide this information from static cmSystemTools::Get<resource>() methods. Refactor code that needs these locations to use the new APIs. Teach FindCMakeResources to use the OS X system API to lookup the executable location. When running from the CMake build tree itself, leave a file in the tree that FindCMakeResources can use to read the location of the source tree. This avoids the need to compile the source tree location into a binary that may be installed and used without the source tree. Teach the QtDialog on OS X to create a "cmake-gui" symlink in the build tree next to "cmake" and the other tools, as is already done in the install tree for the application bundle. This ensures a consistent set of executables are available in one directory.
* Merge topic 'Qt-auto-generators'Brad King2013-10-281-0/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9c87d9c Add automatic rcc invocation for Qt. 84218e1 Add automatic uic invocation for Qt. 94a0ca6 Record which files are skipped by automoc. 18fb758 Run the main executable created in the autogen tests. e485ba1 Rename the QtAutomoc tests to QtAutogen. 7ce65c3 Add extra checks for the AUTOMOC target property. 32771fc Update output messages for generic use. f371ab5 Rename RunAutomoc to RunAutogen. 85b3d6e Extract an SetupAutoMocTarget method. ca124a1 Rename the AutomocInfo.cmake file to be more generic. a342c9f Move some makefile definitions up away from moc-specific code. 98632ef Add the AUTOGEN_TARGETS_FOLDER and obsolete AUTOMOC_TARGETS_FOLDER. 63378ba Rename some variables to reflect broader scope. 97f1aa3 Rename method to reflect generic use. 4abb111 Rename local variable to reflect generic use. 03878c9 Move variable set to where it is used. ...
| * Add automatic uic invocation for Qt.Stephen Kelly2013-10-241-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | The source files are already processed by cmQtAutomoc to look for moc includes, so extend that to also look for ui_ includes and find corresponding .ui files to process. This replaces the need to invoke qt4_wrap_ui(). As the ui files are not likely to be part of the SOURCES of the target, store the options associated with them separately in the cmMakefile for querying during the autogen run.
* | Drop compatibility with CMake < 2.4Brad King2013-10-231-42/+9
|/ | | | | | | | | | | | Drop all behavior activated by setting CMAKE_BACKWARDS_COMPATIBILITY to a value lower than 2.4, and generate an error when projects or the user attempt to do so. In the error suggest using a CMake 2.8.x release. Teach cmake_minimum_required to warn about projects that do not require at least CMake 2.4. They are not supported by CMake >= 3.0. Replace the documentation of CMAKE_BACKWARDS_COMPATIBILITY with a reference to policy CMP0001.
* Add Lua-style long brackets and long comments to CMake languageBrad King2013-10-171-0/+6
| | | | | | | | | | | | | | | | | Teach the CMake language parser to recognize Lua-style "long bracket" arguments. These start with two '[' separated by zero or more '=' characters e.g. "[[" or "[=[" or "[==[". They end with two ']' separated by the same number of '=' as the opening bracket. There is no nesting of brackets of the same level (number of '='). No escapes, variable expansion, or other processing is performed on the content between such brackets so they always represent exactly one argument. Also teach CMake to parse and ignore "long comment" syntax. A long comment starts with "#" immediately followed by an opening long bracket. It ends at the matching close long bracket. Teach the RunCMake.Syntax test to cover long bracket and long comment cases.
* Drop builtin property documentationBrad King2013-10-161-234/+3
| | | | | | Drop all DefineProperty calls for non-chained properties. Drop the documentation from the chained ones. The documentation for all properties is now in Help/prop_*/*.rst files.
* Drop CMAKE_STRICT modeBrad King2013-10-151-15/+0
| | | | | | | With our modern development workflow it is less likely a property will be added to C++ code without documentation. This mode only existed to support the DocTest which had very limited coverage of the properties anyway.
* Add the INTERFACE_LIBRARY target type.Stephen Kelly2013-10-071-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This target type only contains INTERFACE_* properties, so it can be used as a structural node. The target-specific commands enforce that they may only be used with the INTERFACE keyword when used with INTERFACE_LIBRARY targets. The old-style target properties matching LINK_INTERFACE_LIBRARIES_<CONFIG> are always ignored for this target type. The name of the INTERFACE_LIBRARY must match a validity generator expression. The validity is similar to that of an ALIAS target, but with the additional restriction that it may not contain double colons. Double colons will carry the meaning of IMPORTED or ALIAS targets in CMake 2.8.13. An ALIAS target may be created for an INTERFACE library. At this point it can not be exported and does not appear in the buildsystem and project files are not created for them. That may be added as a feature in a later commit. The generators need some changes to handle the INTERFACE_LIBRARY targets returned by cmComputeLinkInterface::GetItems. The Ninja generator does not use that API, so it doesn't require changes related to that.
* Merge topic 'fix-duplicate-custom-commands'Brad King2013-10-011-0/+13
|\ | | | | | | | | dccd494 Use first custom command for the same output (#14446)
| * Use first custom command for the same output (#14446)Brad King2013-09-301-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In buggy code like add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/out.h MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/out.h.in ...) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/out.h ...) that has more than one rule to generate the same output CMake has always used the first rule. However, since commit 2268c41a (Optimize custom command full-path dependency lookup, 2013-08-06) we update the map from output to cmSourceFile for every rule generating an output, effectively keeping the last command instead of the first. Fix this regression by checking for each map update if the output already has an entry. If so, keep only the original entry. The VS 8 generator triggers this with a special case for generate.stamp rules that differ between ZERO_CHECK and normal targets, so do not warn for now. Leave a TODO comment for warning in the future.
* | Merge topic 'no_track_configured_files'Brad King2013-09-091-9/+19
|\ \ | | | | | | | | | | | | 38571f2 cmMakefile: Do not track CMake temporary files.
| * | cmMakefile: Do not track CMake temporary files.Robert Maynard2013-09-091-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit ad502502 (cmMakefile: Track configured files so we can regenerate them, 2013-06-18) cmMakefile::ConfigureFile records the configured file as an output file generated by CMake. The intention is that for make and ninja we can re-run CMake when one of the files it generates goes missing. However, files configured temporarily in CMakeTmp directories by Check* modules do not live past the CMake invocation. We have to also track input files to the configure command. In theory the input to a configure command could it self be a file that is going to be deleted later (output from a custom command or configure_file).
* | | Merge topic 'no_track_configured_files'Brad King2013-08-291-4/+31
|\ \ \ | |/ / | | | | | | | | | 0264eec cmMakefile: Do not track configured files known to be temporary
| * | cmMakefile: Do not track configured files known to be temporaryRobert Maynard2013-08-281-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit ad502502 (cmMakefile: Track configured files so we can regenerate them, 2013-06-18) cmMakefile::ConfigureFile records the configured file as an output file generated by CMake. The intention is that for make and ninja we can re-run CMake when one of the files it generates goes missing. However, files configured temporarily in CMakeTmp directories by Check* modules do not live past the CMake invocation. Teach cmMakefile::FinalPass to stop tracking files that don't exist after we are finished generation.
* | | Merge topic 'cmake-syntax'Brad King2013-08-081-1/+1
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b93982f Merge branch 'dev/fix-variable-watch-crash' into cmake-syntax c50f7ed cmListFileLexer: Modify flex output to avoid Borland warning bf73264 Warn about unquoted arguments that look like long brackets 58e5241 Warn about arguments not separated by whitespace e75b69f cmListFileCache: Convert CMake language parser to class e945949 Add RunCMake.Syntax test cases for command invocation styles 0546484 cmListFileArgument: Generalize 'Quoted' bool to 'Delimeter' enum 28685ad cmListFileLexer: Split normal and legacy unquoted arguments 1eafa3e cmListFileLexer: Fix line number after backslash in string f3155cd Add RunCMake.Syntax test to cover argument parsing
| * | cmListFileArgument: Generalize 'Quoted' bool to 'Delimeter' enumBrad King2013-08-081-1/+1
| | | | | | | | | | | | | | | | | | Replace the boolean value that indicates whether an argument is unquoted or quoted with a generalized enumeration of possible argument types. For now "Quoted" and "Unquoted" remain the only types.
* | | Optimize custom command full-path dependency lookupNicolas Despres2013-08-061-1/+42
|/ / | | | | | | | | | | | | | | In the common case of custom command dependencies specified via full path optimize the implementation of GetSourceFileWithOutput using a (hash) map. This is significantly faster than the existing linear search. In the non-full-path case fall back to the existing linear suffix search.
* | Add the ALIAS target concept for libraries and executables.Stephen Kelly2013-08-021-4/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * The ALIAS name must match a validity regex. * Executables and libraries may be aliased. * An ALIAS acts immutable. It can not be used as the lhs of target_link_libraries or other commands. * An ALIAS can be used with add_custom_command, add_custom_target, and add_test in the same way regular targets can. * The target of an ALIAS can be retrieved with the ALIASED_TARGET target property. * An ALIAS does not appear in the generated buildsystem. It is kept separate from cmMakefile::Targets for that reason. * A target may have multiple aliases. * An ALIAS target may not itself have an alias. * An IMPORTED target may not have an alias. * An ALIAS may not be exported or imported.
* | Merge topic '13582_configured_file_regeneration'Brad King2013-07-311-1/+5
|\ \ | |/ | | | | | | 8fbf39a cmMakefile: Do not track configured files known to be temporary
| * cmMakefile: Do not track configured files known to be temporaryBrad King2013-07-301-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit ad502502 (cmMakefile: Track configured files so we can regenerate them, 2013-06-18) cmMakefile::ConfigureFile records the configured file as an output file generated by CMake. The intention is that for make and ninja we can re-run CMake when one of the files it generates goes missing. However, files configured temporarily in CMakeTmp directories by Check* modules do not live past the CMake invocation. Teach cmMakefile::ConfigureFile to skip tracking files with "CMakeTmp" in their path, just like cmCoreTryCompile::TryCompileCode does to avoid adding dependencies on temporary source files. In the future we will need a more general filter to avoid recording as CMake outputs any files that do not exist at the end of generation.
* | Docs: Trim trailing whitespace in generated doc.Stephen Kelly2013-07-261-1/+1
| |
* | Remove the LINK_LANGUAGE generator expression.Stephen Kelly2013-07-241-2/+1
| | | | | | | | | | | | | | | | | | | | | | It accepted an optional argument to test for equality, but no way to get the linker language of a particular target. TARGET_PROPERTY provides this flexibility and STREQUAL provides the necessary API for equality test. Extend the CompileDefinitions test to cover accessing the property of another target.
* | Merge topic 'tid-system-argument'Brad King2013-07-161-18/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 9cf3547 Add the INTERFACE_SYSTEM_INCLUDE_DIRECTORIES target property. 1925cff Add a SYSTEM parameter to target_include_directories (#14180) 286f227 Extend the cmTargetPropCommandBase interface property handling. 83498d4 Store system include directories in the cmTarget. f1fcbe3 Add Target API to determine if an include is a system include. 2679a34 Remove unused variable.