summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraEclipseCDT4Generator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Prefer istringstream and ostringstream over stringstream.Daniel Pfeifer2016-06-141-2/+2
| | | | Use istringsream for parsing, ostringstream for generation.
* Simplify boolean expressionsDaniel Pfeifer2016-06-021-1/+1
| | | | | | Use clang-tidy's readability-simplify-boolean-expr checker. After applying the fix-its, revise all changes *very* carefully. Be aware of false positives and invalid changes.
* Merge topic 'improve-character-find-and-replace'Brad King2016-05-251-5/+1
|\ | | | | | | | | | | | | | | 5784747d Improve string find: prefer character overloads. 5cec953e Use std::replace for replacing chars in strings. 2a1a2033 cmExtraEclipseCDT4Generator: use std::replace. 34bc6e1f cmCTestScriptHandler: don't call find repeatedly.
| * cmExtraEclipseCDT4Generator: use std::replace.Daniel Pfeifer2016-05-241-5/+1
| |
* | Use enums defined in cmOutputConverter using their fully qualified name.Daniel Pfeifer2016-05-251-1/+1
|/ | | | | | | | | Mostly automated: values=("RelativeRoot" "NONE" "FULL" "HOME" "START" "HOME_OUTPUT" "START_OUTPUT" "OutputFormat" "UNCHANGED" "MAKERULE" "SHELL" "WATCOMQUOTE" "RESPONSE" "FortranFormat" "FortranFormatNone" "FortranFormatFixed" "FortranFormatFree") for i in "${values[@]}"; do git grep -l cmLocalGenerator::$i | xargs sed -i "s|cmLocalGenerator::$i|cmOutputConverter::$i|g"; done
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-527/+385
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Remove `//------...` horizontal separator commentsBrad King2016-05-091-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | Modern editors provide plenty of ways to visually separate functions. Drop the explicit comments that previously served this purpose. Use the following command to automate the change: $ git ls-files -z -- \ "*.c" "*.cc" "*.cpp" "*.cxx" "*.h" "*.hh" "*.hpp" "*.hxx" | egrep -z -v "^Source/cmCommandArgumentLexer\." | egrep -z -v "^Source/cmCommandArgumentParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmDependsJavaLexer\." | egrep -z -v "^Source/cmDependsJavaParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmExprLexer\." | egrep -z -v "^Source/cmExprParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmFortranLexer\." | egrep -z -v "^Source/cmFortranParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmListFileLexer\." | egrep -z -v "^Source/cm_sha2" | egrep -z -v "^Source/(kwsys|CursesDialog/form)/" | egrep -z -v "^Utilities/(KW|cm).*/" | xargs -0 sed -i '/^\(\/\/---*\|\/\*---*\*\/\)$/ {d;}' This avoids modifying third-party sources and generated sources.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort include directives within each block (separated by a blank line) in lexicographic order (except to prioritize `sys/types.h` first). First run `clang-format` with the config file: --- SortIncludes: false ... Commit the result temporarily. Then run `clang-format` again with: --- SortIncludes: true IncludeCategories: - Regex: 'sys/types.h' Priority: -1 ... Commit the result temporarily. Start a new branch and cherry-pick the second commit. Manually resolve conflicts to preserve indentation of re-ordered includes. This cleans up the include ordering without changing any other style. Use the following command to run `clang-format`: $ git ls-files -z -- \ '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '(Lexer|Parser|ParserHelper)\.' | egrep -z -v '^Source/cm_sha2' | egrep -z -v '^Source/(kwsys|CursesDialog/form)/' | egrep -z -v '^Utilities/(KW|cm).*/' | egrep -z -v '^Tests/Module/GenerateExportHeader' | egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' | xargs -0 clang-format -i This selects source files that do not come from a third-party. Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
* Source: Stabilize include orderBrad King2016-04-291-0/+1
| | | | | Each source file has a logical first include file. Include it in an isolated block so that tools that sort includes do not move them.
* Eclipse: Implement traversal of nested source groups (#15701)Patrik Lehmann2016-03-311-28/+44
|
* cmExtraEclipseCDT4Generator: port to cmXMLWriterDaniel Pfeifer2016-03-231-368/+319
|
* Eclipse: only add C/CXX macros if the language is enabledAlex Neundorf2016-02-241-4/+8
| | | | | | | | | | | With this patch, the builtin macros and include dirs are only added to the project file if the C/CXX langauges are really enabled. I.e. before this patch the CXX-stuff was in the project file as soon as CXX had been enabled at least once for this build tree. I.e. disabling CXX later on did not remove the CXX macros etc. from the project file (related to #15150) Alex
* Port to GetGeneratorTargets.Stephen Kelly2015-10-241-24/+26
|
* cmLocalGenerator: Store a vector of generator targets.Stephen Kelly2015-10-211-3/+3
| | | | Not a map from cmTarget to cmGeneratorTarget.
* cmLocalGenerator: Don't store imported generator targetsStephen Kelly2015-10-201-4/+0
| | | | | No consumers need them. This makes GetGeneratorTargets more comparable to cmMakefile::GetTargets, which does not include imported targets.
* Merge topic 'clean-up-cmTarget'Brad King2015-10-161-14/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | 55474e61 cmState: Move GetTargetTypeName from cmTarget. 38df5c36 Remove now-obsolete casts. 4ee2b267 cmGeneratorTarget: Use enum for GetType. eac15298 cmState: Move TargetType enum from cmTarget. 482b3811 cmTarget: Move link type enum out. 2ee1cb85 cmTarget: Move ImportInfoMap out of internal class. a48bcabd cmTarget: Move backtrace member out of internal class. 6694d993 cmTarget: Remove unneeded constructors. 983c00f8 Generators: Use GetType from the cmGeneratorTarget.
| * cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-141-14/+14
| | | | | | | | | | | | | | Mostly automated: values=( "EXECUTABLE" "STATIC_LIBRARY" "SHARED_LIBRARY" "MODULE_LIBRARY" "OBJECT_LIBRARY" "UTILITY" "GLOBAL_TARGET" "INTERFACE_LIBRARY" "UNKNOWN_LIBRARY" "TargetType") for i in "${values[@]}"; do git grep -l cmTarget::$i | xargs sed -i "s|cmTarget::$i|cmState::$i|g"; done
* | cmLocalGenerator: Port GetTargetDirectory to cmGeneratorTarget.Stephen Kelly2015-10-141-1/+3
|/
* cmLocalGenerator: Store cmGeneratorTargets.Stephen Kelly2015-10-141-2/+1
| | | | Relieve cmMakefile of this responsibility.
* cmLocalGenerator: Add current source directory accessor.Stephen Kelly2015-10-101-2/+2
|
* cmLocalGenerator: Add current binary directory accessor.Stephen Kelly2015-10-101-4/+3
|
* cmLocalGenerator: Add Home directory accessors.Stephen Kelly2015-10-081-7/+7
| | | | Reduce reasons for cmLocalGenerator to have a cmMakefile.
* Eclipse: Port API to cmLocalGenerator.Stephen Kelly2015-10-081-6/+9
|
* cmLocalGenerator: Add GetProjectName method.Stephen Kelly2015-10-081-10/+9
|
* Access sources through cmGeneratorTarget.Stephen Kelly2015-10-071-1/+3
|
* Eclipse: Fix paths in target links on cygwinMarkus Grech2015-07-081-1/+2
| | | | | | | | | Add a missing GetEclipsePath call to fix generation of incorrect paths for target links in Eclipse CDT generator which caused Eclipse to be unable to open files through such links. Without this the generator would generate invalid links for source files under "[Targets]", making Eclipse unable to open them. The old links looked like "C:/cygdrive/c/...", while new links correctly are "C:/...".
* Use cmSystemTools::GetCMakeCommand() to get path to cmake internallyBrad King2015-05-201-3/+3
| | | | | This is much simpler than finding a way to lookup "CMAKE_COMMAND" everywhere.
* Merge topic 'clean-up-cmMakefile'Brad King2015-04-211-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8dc3a67c cmMakefile: Out-of-line the directory methods. 0f3c8cfa cmMakefile: Use method abstraction to access directories. b288a997 cmMakefile: Rename SetStart* directory API to SetCurrent*. 932d53bc cmMakefile: Remove redundant method duplication. 32b8f03a cmMakefile: Port users of GetStart* methods to new names. 54d6a918 cmMakefile: Rename GetCurrent{Output,Binary}Directory. 55d80d0a cmMakefile: Rename GetCurrent{,Source}Directory. b23cf06f cmake: Remove redundant start directories. fcf246ac cmMakefile: Populate Home directories on initialize. 8878bea7 cmake: Initialize Home directories on cmake for find-package mode. 044dc815 Use the Home directories from the cmake class where intended. d67e8f24 cmake: Fix directory used to find the cache 1ea085d1 cmMakefile: Initialize dir definitions early. f034bb2f Remove redundant calls to MakeStartDirectoriesCurrent. 3a68c323 cmMakefile: Fix wrong parameter names.
| * cmMakefile: Port users of GetStart* methods to new names.Stephen Kelly2015-04-201-2/+2
| |
| * cmMakefile: Rename GetCurrent{Output,Binary}Directory.Stephen Kelly2015-04-201-2/+2
| | | | | | | | Match names used in CMake code.
* | cmSystemTools: Teach RunSingleCommand to separate stdout and stderrBrad King2015-04-201-1/+1
|/ | | | | | | Extend the RunSingleCommand signature to capture stdout and stderr separately. Allow both to be captured to the same std::string to preserve existing behavior. Update all call sites to do this so that this refactoring does not introduce functional changes.
* Port Global property interaction to cmState.Stephen Kelly2015-04-151-2/+2
|
* cmake: Remove the happy global property scope pattern.Stephen Kelly2015-04-151-1/+1
| | | | | | | | | Global properties are already global in scope, so remove the overload for specifying it and port users of the API. The call from cmMakefile::GetProperty can be simplified because the scope is only used during chaining, and there is no further chaining after processing global properties.
* cmState: Move CacheEntryType enum from cmCacheManager.Stephen Kelly2015-04-131-2/+2
|
* Port to cmState.Stephen Kelly2015-04-131-1/+2
|
* cmCacheManager: Rename GetCacheValue to GetInitializedCacheValue.Stephen Kelly2015-04-071-1/+1
| | | | | Being initialized is a requirement for this method to return something, and is what differentiates it from using GetIterator with it.GetValue.
* Add API for cache loading, deleting and saving to the cmake class.Stephen Kelly2015-04-071-2/+2
| | | | | Migrate existing users of the CacheManager API to use the new API. The CacheManager will be going away soon.
* Revert topic 'refactor-cache-api'Brad King2015-04-071-3/+3
| | | | | | This topic was never tested without some follow-up commits. The GetCacheEntryValue API returns a pointer to memory freed on return. It will have to be revised along with the rest of the original topic.
* cmCacheManager: Rename GetCacheValue to GetInitializedCacheValue.Stephen Kelly2015-04-061-1/+1
| | | | | Being initialized is a requirement for this method to return something, and is what differentiates it from using GetIterator with it.GetValue.
* Add API for cache loading, deleting and saving to the cmake class.Stephen Kelly2015-04-061-2/+2
| | | | | Migrate existing users of the CacheManager API to use the new API. The CacheManager will be going away soon.
* Merge topic 'consistent-empty-method'Brad King2015-01-191-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 5f69314e Replace foo.length() pattern with !foo.empty(). fd0c036c Replace 'foo.length() >= 1' pattern with !foo.empty() f09fde2d Replace 'foo.length() > 0' pattern with !foo.empty(). 86b5bdfa Replace 'foo.length() == 0' pattern with foo.empty(). fd7b3712 Replace foo.size() pattern with !foo.empty(). aa773035 Replace !foo.size() pattern with foo.empty(). 64592633 cmListCommand: Use empty() and expand whitespace. 607e1938 Replace 'foo.size() != 0' pattern with !foo.empty(). 930bd478 Replace 'foo.size() == 0' pattern with foo.empty(). d92887ef Replace 'foo.size() > 0' pattern with !foo.empty().
| * Replace 'foo.size() > 0' pattern with !foo.empty().Stephen Kelly2015-01-181-1/+1
| |
* | Merge topic 'eclipse-fix-cxx-natures'Brad King2015-01-191-0/+1
|\ \ | |/ |/| | | | | 6e6e0c40 Eclipse: Add org.eclipse.cdt.core.cnature to CXX projects (#15068)
| * Eclipse: Add org.eclipse.cdt.core.cnature to CXX projects (#15068)André Klitzing2015-01-161-0/+1
| | | | | | | | | | | | | | Since commit v3.0.0-rc1~335^2~1 (eclipse: Add natures for Eclipse based on enabled languages, 2013-08-29) CXX projects got only "ccnature", but Eclipse itself also adds "cnature" when creating C++ projects. Fix this by adding both for CXX projects.
* | strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-9/+9
| | | | | | | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
* | 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>
* | cmTarget: Make the source files depend on the config.Stephen Kelly2014-04-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disallow the use of config-specific source files with the Visual Studio and Xcode generators. They don't have any way to represent the condition currently. Use the same common-config API in cmQtAutoGenerators. While it accepts config-specific files, it doesn't have to support multiple configurations yet. Loop over the configs in cmTargetTraceDependencies and cmGlobalGenerator::WriteSummary and consume all source files. Loop over the configs in cmComputeTargetDepends and compute the object library dependencies for each config.
* | Remove c_str calls when using stream APIs.Stephen Kelly2014-03-111-1/+1
| | | | | | | | | | Use an ad-hoc clang tool for matching the calls which should be ported.
* | Remove some c_str() calls.Stephen Kelly2014-03-111-5/+5
| | | | | | | | | | | | Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
* | stringapi: Use strings for generator namesBen Boeckel2014-03-081-1/+1
| |