summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Include cmAlgorithms where it is used.Stephen Kelly2015-03-101-0/+1
|
* Genex: Allow COMPILE_LANGUAGE when processing include directories.Stephen Kelly2015-03-091-1/+1
| | | | Issue an error if this is encountered by an IDE generator.
* Genex: Allow COMPILE_LANGUAGE when processing compile definitions.Stephen Kelly2015-03-091-3/+3
| | | | Issue an error if this is encountered by an IDE generator.
* Genex: Enable use of COMPILE_LANGUAGE for compile options.Stephen Kelly2015-03-091-2/+2
| | | | | | Follow-ups will allow the use of the generator expression for compile definitions and include directories for non-IDE generators.
* Merge topic 'fix-crash-on-bad-LANG_STANDARD'Brad King2015-03-021-1/+8
|\ | | | | | | | | 00d66557 Diagnose invalid <LANG>_STANDARD value instead of crashing (#15426)
| * Diagnose invalid <LANG>_STANDARD value instead of crashing (#15426)Brad King2015-02-281-1/+8
| |
* | Merge topic 'install-manifest-optimize'Brad King2015-02-271-11/+6
|\ \ | | | | | | | | | | | | c4814174 install: Write the entire installation manifest at once
| * | install: Write the entire installation manifest at onceRobert Goulet2015-02-261-11/+6
| |/ | | | | | | | | Avoid a separate open/close for each file installed. Use a single file(WRITE) instead of a loop with file(APPEND).
* | cmLocalGenerator: Convert loop to algorithm.Stephen Kelly2015-02-181-6/+1
| |
* | cmLocalGenerator: Move variable population inside of condition.Stephen Kelly2015-02-171-4/+3
| | | | | | | | | | It is only used in the condition, so no need to look for uses elsewhere when reading the code.
* | Convert loops to cmJoin algorithm with cmRange.Stephen Kelly2015-02-111-7/+1
| |
* | Convert loops populating maybe-empty content into the common pattern.Stephen Kelly2015-02-111-4/+8
| |
* | Replace temporary bool by inlining warning condition.Stephen Kelly2015-02-061-15/+11
| |
* | Replace loop with member algorithm.Stephen Kelly2015-02-061-6/+5
| |
* | cmLocalGenerator: Replace loop with find_first_not_ofStephen Kelly2015-02-051-5/+1
|/
* Merge topic 'fix-C-standard-features'Brad King2015-02-051-8/+22
|\ | | | | | | | | | | | | | | | | fb3487a9 Features: Fix C90 feature detection. 6027798a Features: Allow setting standard dialect below the default. 9d767810 Features: Populate CMAKE_<LANG>_STANDARD_DEFAULT only for supported compilers. 72537e44 Features: Add dialect compile flags only if default is known. 82c9d686 AppleClang: Remove redundant UNIX condition.
| * Features: Allow setting standard dialect below the default.Stephen Kelly2015-02-041-1/+15
| | | | | | | | | | If the requested standard dialect is older than the default dialect then we must use a flag because we cannot decay to a newer standard.
| * Features: Add dialect compile flags only if default is known.Stephen Kelly2015-02-041-9/+9
| | | | | | | | | | | | | | | | | | The CMAKE_<LANG>_STANDARD_DEFAULT variable indicates whether the compiler has any notion of standard levels and that CMake knows about them. If no language standard levels are available, skip all logic to attempt to add a flag for the level. Also fail with an internal error if a bad default value is set.
* | Merge topic 'fix-default-install-config'Brad King2015-02-041-9/+5
|\ \ | |/ |/| | | | | dea42d92 install: Fix regression in default configuration selection
| * install: Fix regression in default configuration selectionBen Boeckel2015-02-031-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | The refactoring in commit v3.1.0-rc1~812^2~16 (stringapi: Pass configuration names as strings, 2014-02-09) broke the code path in cmLocalGenerator::GenerateInstallRules that intends to pick a default install configuration for multi-config generators. Fix the logic to select an empty default configuration only when using a single-config generator whose CMAKE_BUILD_TYPE is not set. Inspired-by: Roman Wüger <roman.wueger@gmx.at> Reported-by: NoRulez <norulez@me.com>
* | Features: Define meaning for no language standard defaultBrad King2015-01-291-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | Define an empty string in CMAKE_<LANG>_STANDARD_DEFAULT to mean that the toolchain has no notion of lanuage standard levels. In this case the <LANG>_STANDARD[_REQUIRED] properties will have no effect. Update the RunCMake.CompileFeatures test to exclude the LinkImplementationFeatureCycle test when there is no standard default. It can never fail because no use of specific features will adjust the CXX_STANDARD level required for any target since the standard levels have no meaning in this case.
* | Replace foo.length() pattern with !foo.empty().Stephen Kelly2015-01-181-1/+1
| |
* | Replace foo.size() pattern with !foo.empty().Stephen Kelly2015-01-181-4/+4
| |
* | Replace 'foo.size() == 0' pattern with foo.empty().Stephen Kelly2015-01-181-1/+1
| |
* | Replace 'foo.size() > 0' pattern with !foo.empty().Stephen Kelly2015-01-181-3/+3
| |
* | Merge topic 'drop-ancient-workarounds'Brad King2015-01-121-15/+15
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0f7bdd61 Remove VS 6 special case. 5e92c826 Remove some obsolete stuff. 15e42bb2 cmStandardIncludes: Remove obsolete cmOStringStream. 931e055d Port all cmOStringStream to std::ostringstream. f194a009 Remove unused cmIStringStream class. 3ec1bb15 cmStandardIncludes: Remove std namespace hack. bb3bce70 cmStandardIncludes: Remove ANSI_FOR_SCOPE hack. 28fa4923 cmStandardIncludes: Remove iostreams workaround for obsolete Compaq compiler. 837a8a63 cmStandardIncludes: Drop Comeau-related workaround. 4030ddfd Remove Borland-related undef. 17d6a6fd cmStandardIncludes: Remove comment about Borland. 26fb5011 Drop SGI as a CMake host compiler.
| * | Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-15/+15
| | | | | | | | | | | | All compilers hosting CMake support the std class.
* | | Use insert instead of a loop in some cases.Stephen Kelly2015-01-111-10/+2
|/ / | | | | | | | | | | Limit this change to inserting into a vector from a vector. A follow up change can use insert for inserting into a set.
* | file: Add LOCK subcommand to do file and directory lockingRuslan Baratov2014-12-031-0/+6
| | | | | | | | | | | | | | | | | | Provide options to fail without blocking or to block up to a timeout. Provide options to specify the scope containing the lock so it can be released automatically at the end of a function, file, or process. Extend the RunCMake.file test with cases covering the file(LOCK) command usage and error cases.
* | file(GENERATE): Evaluate early to allow generating source filesStephen Kelly2014-11-121-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The evaluation files must be known before cmTargetTraceDependencies attempts to find them, but we must actually generate the files after cmTargetTraceDependencies, as that can add to target SOURCES. The limitation is that the generated output name must not depend on the SOURCES of a target if the generated file is used by that target. Mark the output files as GENERATED so that trace dependencies does not expect them to already exist in the filesystem. Move the invokation of ForceLinkerLanguage in the Generate logic to after the generated file names are known. ForceLinkerLanguage tries to determine the sources of a target (in order to determine an already-known language) and otherwise fails to get information about the generated file. Test that the output of file(GENERATE) can be used as a target source file and that accessing the target SOURCES in the name of the output file is an error. Accessing the TARGET_OBJECTS would be a similar error if it was legal to use that generator expression in this context. That is not currently possible and is a different error condition, so test the current error output as a reminder to change the expected output if that becomes possible in the future. Test that generated rule files resulting from cmTargetTraceDependencies appear in the SOURCES generated in the output file.
* | strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-19/+19
|/ | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
* Ninja: Fix RC include directories regressionBrad King2014-10-131-3/+6
| | | | | | | | | | | | | | | | | Changes in commit b9aa5041 (cmLocalGenerator: Simplify GetIncludeFlags output formatting, 2014-03-04) caused Windows Resource Compiler include directories to be computed as relative paths in the Ninja generator. This breaks the cmcldeps handling of include paths. The reason for the regression is that several cmLocalGenerator::GetIncludeFlags callers treated the fourth "bool forResponseFile" argument as if it controlled whether include directories were a full path. It actually did control that by accident until the above commit. Add an explicit "bool forceFullPaths" argument to GetIncludeFlags and thread the value through ConvertToIncludeReference as needed. Update GetIncludeFlags call sites that really wanted to control the forResponseFile setting to be aware of the new argument. Extend the VSResource test to cover this case.
* cmLocalGenerator: Fix AddBuildTargetRule object file path conversionBrad King2014-07-221-1/+1
| | | | The object file list is constructed for a shell, not a Makefile rule.
* cmLocalGenerator: Rename 'MAKEFILE' to 'MAKERULE'Brad King2014-07-221-2/+2
| | | | | Rename the internal enumeration value for converting paths destined for use in Makefile rule syntax.
* Merge topic 'install-messages'Brad King2014-06-271-4/+19
|\ | | | | | | | | | | | | | | | | | | | | | | d19b64d6 install(DIRECTORY): Add MESSAGE_NEVER option to avoid output (#13761) c9568de5 install: Add CMAKE_INSTALL_MESSAGE variable (#13761) ec7cf7ea install: Thread message level setting through internal API abebcd23 file(INSTALL): Add undocumented options to control output verbosity 464567a5 file(INSTALL): Report existing DIRECTORY as Up-to-date f701b0b7 file(INSTALL): Do not pre-create DESTINATION for DIRECTORY f0a01962 cmInstallTargetGenerator: Drop default constructor arguments 67815894 Help: Add install() command document section headers
| * install: Add CMAKE_INSTALL_MESSAGE variable (#13761)Brad King2014-06-241-1/+1
| | | | | | | | | | | | | | | | | | Create a variable to allow users to control which installation messages are printed. In particular, provide a "LAZY" setting that prints "Installing" messages but not "Up-to-date" messages. This is desirable for incremental re-installations. Suggested-by: J Decker <d3ck0r@gmail.com>
| * install: Thread message level setting through internal APIBrad King2014-06-241-0/+1
| | | | | | | | | | | | | | Create a cmInstallGenerator::MessageLevel enumeration for future use in specifying install message verbosity. Thread values of the type through constructors and save the value as a member of cmInstallGenerator. Use only a "MessageDefault" value for now.
| * cmInstallTargetGenerator: Drop default constructor argumentsBrad King2014-06-241-4/+18
| | | | | | | | | | | | They are used only in cmLocalGenerator::GenerateTargetInstallRules. Move the defaults to a local helper where the context justifies their values.
* | Fix some generator crashes on undefined CMAKE_BUILD_TYPEBrad King2014-06-231-1/+1
|/ | | | | | | | | | Since commit 84fdc9921 (stringapi: Pass configuration names as strings, 2014-02-09), it is not safe to use GetDefinition("CMAKE_BUILD_TYPE") without checking the return value. Use GetSafeDefinition instead so that a missing definition is treated as an empty string like code paths did prior to the above commit. Reported-by: Richard Wirth <richard@califax.de>
* Features: Escape the COMPILE_OPTIONS for dialects.Stephen Kelly2014-06-131-2/+5
| | | | | Allow for future handling as a list, not a string which may contain whitespace.
* Add OBJECT_FILE_DIR rule placeholder for compilation linesBrad King2014-06-051-0/+7
| | | | | | | | | Some compilers do not offer an option to specify the path to the object file, but rather only to the directory in which to place the object file. See issue 14876 for some examples. Add a new OBJECT_FILE_DIR placeholder to specify the directory containing the object file for the current compilation. This may differ from the main target OBJECT_DIR when the object corresponds to a source in a subdirectory.
* Features: Enable compiler extensions by default.Stephen Kelly2014-05-311-2/+10
| | | | | | | | | | | Compilers enable their extensions by default, and disabling them implicitly can lead to results which are surprising or non-obvious to debug. http://public.kitware.com/pipermail/cmake-developers/2014-May/010575.html http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10214 https://www.mail-archive.com/cmake-developers@cmake.org/msg10116.html (Compiler feature extensions by default, 29 May 2014)
* Features: Add support for C++14 features.Stephen Kelly2014-05-221-0/+1
| | | | Record the features implemented by GNU 4.9 and Clang 3.4.
* Merge topic 'ninja-intel-ipo'Brad King2014-05-221-5/+3
|\ | | | | | | | | | | | | b6e2e0d1 Ninja: Fix Intel interprocedural optimization with static libraries 5d12b87b cmGeneratorTarget: Improve GetCreateRuleVariable API c2eeb08b cmTarget: Add GetFeatureAsBool method
| * cmGeneratorTarget: Improve GetCreateRuleVariable APIBrad King2014-05-211-5/+3
| | | | | | | | | | Pass the language and configuration to the method so it can return the complete rule variable name.
* | Features: Add COMPILE_FEATURES generator expression.Stephen Kelly2014-05-211-0/+25
|/ | | | | | | | | | | | Allow setting build properties based on the features available for a target. The availability of features is determined at generate-time by evaluating the link implementation. Ensure that the <LANG>_STANDARD determined while evaluating COMPILE_FEATURES in the link implementation is not lower than that provided by the INTERFACE of the link implementation. This is similar to handling of transitive properties such as POSITION_INDEPENDENT_CODE.
* Features: Extend concept to C language.Stephen Kelly2014-05-141-0/+4
| | | | | | | | | | | Add properties and variables corresponding to CXX equivalents. Add features for c_function_prototypes (C90), c_restrict (C99), c_variadic_macros (C99) and c_static_assert (C11). This feature set can be extended later. Add a <PREFIX>_RESTRICT symbol define to WriteCompilerDetectionHeader to conditionally represent the c_restrict feature.
* Merge topic 'decay-language-version'Brad King2014-05-081-6/+60
|\ | | | | | | | | | | | | | | | | | | | | 205215fb cmTarget: Add CXX_STANDARD_REQUIRED to control decay. 1df2116b Features: Decay language flag if requested is not available. c4f4dac2 Project: Fix exit-on-error with compile feature tests. 5bb7ce72 Project: Use nullary form of main for compile feature tests. 64254e7a Project: Remove extern from static string in feature tests. 0d9c99bf Help: Fix order of help entries. dc7639bd Tests: Fix name of cache variable.
| * cmTarget: Add CXX_STANDARD_REQUIRED to control decay.Stephen Kelly2014-05-071-0/+20
| |
| * Features: Decay language flag if requested is not available.Stephen Kelly2014-05-071-7/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the highest standard compile flags available if requested language version is too new. This supports use-cases like set(CMAKE_CXX_STANDARD 14) # Compiled with -std=c++11 with GNU 4.7, which has no -std=c++14 # or equivalent flag add_executable(main main.cpp) This can be used in combination with preprocessor defines which communicate the availability of certain language features for optional use.