summaryrefslogtreecommitdiff
path: root/Source/cmVisualStudio10TargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Remove `//------...` horizontal separator commentsBrad King2016-05-091-14/+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.
* Isolate formatted streaming blocks with clang-format off/onBrad King2016-05-061-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The clang-format tool can do a good job formatting most code, but well-organized streaming blocks are best left manually formatted. Find blocks of the form os << "...\n" "...\n" ; using the command $ git ls-files -z -- Source | egrep -v -z '^Source/kwsys/' | xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \ '<<[^\n]*\n(^ *("[^\n]*("|<<|;)$|;)\n){2,}' Find blocks of the form os << "...\n" << "...\n" << "...\n"; using the command $ git ls-files -z -- Source | egrep -v -z '^Source/kwsys/' | xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \ '<<[^\n]*\n(^ *<<[^\n]*(\\n"|<<|;)$\n){2,}' Surround such blocks with the pair /* clang-format off */ ... /* clang-format on */ in order to protect them from update by clang-format. Use the C-style `/*...*/` comments instead of C++-style `//...` comments in order to prevent them from ever being swallowed by re-formatting of surrounding comments.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+2
| | | | | 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.
* VS: in Clang/C2 toolset, setup correct compiler settingsMariusz PluciƄski2016-03-101-1/+12
|
* Merge topic 'vs14-debug-enum-older-toolsets'Brad King2016-03-081-1/+2
|\ | | | | | | | | 3f15665a VS: Fix VS 2015 .vcxproj debug setting for v100 toolset (#15986)
| * VS: Fix VS 2015 .vcxproj debug setting for v100 toolset (#15986)Brad King2016-03-071-1/+2
| |
* | VS: Add option to set `ConfigurationType` of a .vcxproj fileFabian Otto2016-02-261-35/+43
| | | | | | | | | | | | Add a VS_CONFIGURATION_TYPE target property to set this value explicitly. This is useful to build a Windows Kernel Mode Driver, for example.
* | Merge topic 'vs14-debug-enum-older-toolsets'Brad King2016-02-251-0/+27
|\ \ | |/ | | | | | | dc422d27 VS: Fix VS 2015 .vcxproj debug setting for older toolsets (#15986)
| * VS: Fix VS 2015 .vcxproj debug setting for older toolsets (#15986)Brad King2016-02-241-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit v3.4.2~2^2 (VS: Fix VS 2015 .vcxproj file value for GenerateDebugInformation, 2016-01-08) we generate invalid project files for the v110 and v120 toolsets. VS complains: C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(639,9): error MSB4030: "Debug" is an invalid value for the "GenerateDebugInformation" parameter of the "Link" task. The "GenerateDebugInformation" parameter is of type "System.Boolean". This reveals that our VS flag map selection should be based on the toolset instead of the version of VS. However, that will be a non-trivial change so for now fix this particular use case by hard-coding a correction to the flag map. Reported-by: Gregor Jasny <gjasny@googlemail.com>
* | Fix MFC setting on utility targets (#15867)Clinton Stimpson2016-01-191-6/+9
| | | | | | | | Multi-byte MFC is deprecated, and some projects will not compile if MFC is enabled.
* | Merge topic 'vs-global-properties'Brad King2016-01-121-0/+26
|\ \ | | | | | | | | | | | | af39f115 VS: Implement VS_GLOBAL_* target properties in VS 2010+ (#13666)
| * | VS: Implement VS_GLOBAL_* target properties in VS 2010+ (#13666)Mike Fitzgerald2016-01-111-0/+26
| | | | | | | | | | | | | | | These have been documented but previously only implemented for VS 2008 and below.
* | | VS: Map the link `/debug` to its IDE propertyBrad King2016-01-111-19/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the link flag table entries for this flag to be case-insensitive. Also fix the VS 2015 value for the build property enumeration name. This causes `linkOptions.Parse(...)` to correctly extract the `/debug` flag and map it to the IDE property instead. Therefore we do not need to look for the flag explicitly when initializing the property.
* | | VS: Drop unused condition in link debug flag generationBrad King2016-01-111-1/+1
|/ / | | | | | | | | The `linkOptions.IsDebug()` call never returns true because it checks for `DebugInformationFormat` which is a compiler (cl) flag.
* | Merge topic 'vs14-debug-enum'Brad King2016-01-111-2/+18
|\ \ | |/ | | | | | | f086c665 VS: Fix VS 2015 .vcxproj file value for GenerateDebugInformation (#15894)
| * VS: Fix VS 2015 .vcxproj file value for GenerateDebugInformation (#15894)Brad King2016-01-081-2/+18
| | | | | | | | | | | | | | Starting with VS 2015 the GenerateDebugInformation build property is an enumeration (`No`, `Debug`, `DebugFastLink`) instead of a boolean value (`false`, `true`). For now we simply change to `No` and `Debug` fix current behavior. Support for `/debug:fastlink` can be added later.
* | VS: Add module definition `.def` files to .vcxproj files (#15313)Tim Grothe2015-11-041-0/+6
| | | | | | | | Make them appear in the IDE project tree for reference by developers.
* | Refactor `.def` file lookupTim Grothe2015-11-041-3/+4
| | | | | | | | | | Return a `cmSourceFile const*` from GetModuleDefinitionFile so that callers can get more information than just the path to the file.
* | Merge topic 'vs-resw-files'Brad King2015-10-291-0/+4
|\ \ | |/ | | | | | | 77dde5cb VS: Add support for `.resw` files (#15811)
| * VS: Add support for `.resw` files (#15811)Andrew Shaitorov2015-10-281-0/+4
| | | | | | | | | | These are used on the WinRT & WinPhone platforms. Build them using the `PRIResource` tool.
* | cmGeneratorTarget: Add API for target-relative commands.Stephen Kelly2015-10-261-4/+4
| |
* | VS: Port interface to cmGeneratorTargetStephen Kelly2015-10-241-1/+1
| |
* | VS: Port TargetIsFortranOnly to cmGeneratorTargetStephen Kelly2015-10-241-1/+1
| |
* | VS10: Port to cmGeneratorTarget.Stephen Kelly2015-10-241-23/+26
| |
* | cmGeneratorTarget: Move GetExportMacro from cmTarget.Stephen Kelly2015-10-211-1/+2
| |
* | cmLocalGenerator: Port some API to cmGeneratorTarget.Stephen Kelly2015-10-171-2/+2
| |
* | Use cmGeneratorTarget for property access.Stephen Kelly2015-10-171-50/+59
| |
* | Use GetName from cmGeneratorTarget.Stephen Kelly2015-10-171-7/+12
| |
* | Merge topic 'clean-up-cmTarget'Brad King2015-10-161-52/+54
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Remove now-obsolete casts.Stephen Kelly2015-10-151-2/+1
| | |
| * | cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-151-52/+52
| | | | | | | | | | | | | | | | | | | | | 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
| * | Generators: Use GetType from the cmGeneratorTarget.Stephen Kelly2015-10-151-38/+41
| | |
* | | cmLocalGenerator: Port GetTargetDirectory to cmGeneratorTarget.Stephen Kelly2015-10-151-8/+8
|/ /
* | cmGeneratorExpression: Port to cmLocalGenerator.Stephen Kelly2015-10-121-4/+7
| |
* | Merge topic 'use-generator-target'Brad King2015-10-121-3/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1c1c2a12 cmGeneratorTarget: Port ExpandLinkItems away from cmTarget. c66084f5 cmGeneratorTarget: Port GetImportLinkInterface away from cmTarget. 83c29e39 cmGeneratorTarget: Port ComputeLinkImplementationLibraries away from cmTarget. 19882554 cmGeneratorTarget: Port handleSystemIncludesDep away from cmTarget. c1f687b1 cmGeneratorTarget: Port GetLinkImplementationLibrariesInternal. a6e1f05c cmGeneratorTarget: Port ComputeLinkInterface away from cmTarget. 654002fe cmGeneratorTarget: Port ComputeLinkInterfaceLibraries away from cmTarget. 922c8901 cmGeneratorTarget: Port GetLinkInterface away from cmTarget. eaa5b9cb cmGeneratorTarget: Port cmTargetCollectLinkLanguages away from cmTarget. f539da12 cmGeneratorTarget: Port GetLinkInterfaceLibraries away from cmTarget. 1c5d70f9 cmGeneratorTarget: Port processILibs away from cmTarget. 064c2488 cmComputeLinkDepends: Port some API to cmGeneratorTarget. 3e428fdc cmGeneratorTarget: Move IsImportedSharedLibWithoutSOName from cmTarget. 110fd2fb cmGeneratorTarget: Move GetOutputTargetType from cmTarget. e7391699 cmGeneratorTarget: Move HasMacOSXRpathInstallNameDir from cmTarget. c5718217 cmGeneratorTarget: Move HaveInstallTreeRPATH from cmTarget. ...
| * | cmGeneratorTarget: Move GetPDBDirectory from cmTarget.Stephen Kelly2015-10-091-1/+1
| | |
| * | cmGeneratorTarget: Move GetDirectory from cmTarget.Stephen Kelly2015-10-091-2/+3
| |/
* | cmLocalGenerator: Add current source directory accessor.Stephen Kelly2015-10-101-1/+1
| |
* | cmLocalGenerator: Add current binary directory accessor.Stephen Kelly2015-10-101-7/+7
|/
* Merge topic 'vs-win10-store'Brad King2015-10-051-7/+217
|\ | | | | | | | | | | | | | | | | 2402bb8c Help: Document Windows 10 Universal Applications in cmake-toolchains(7) 1be2f12c VS: Add support for Windows 10 Universal (Store) Applications 2798dbda VS: Refactor indentation of LinkLibraryDependencies 8c426183 MSVC: Add system libs for WindowsStore on VS 2015 d1b87d72 VS: Select Windows 10 Store SDK and toolset for VS 2015
| * VS: Add support for Windows 10 Universal (Store) ApplicationsGilles Khouzam2015-10-051-6/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach the VS 2015 generator to support WindowsStore 10.0 applications. Add target properties to customize them: * VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION: Specifies the minimum version of the OS that the project can target. * VS_DESKTOP_EXTENSIONS_VERSION, VS_MOBILE_EXTENSIONS_VERSIONS, VS_IOT_EXTENSIONS_VERSION: Add a reference to the version of the SDK specified to the target allowing to target the extended functionality in a universal project. * VS_IOT_STARTUP_TASK: Specifies that the target should be built as an IOT continuous background task.
| * VS: Refactor indentation of LinkLibraryDependenciesGilles Khouzam2015-10-051-1/+1
| | | | | | | | Use our indentation specifier instead of hard-coding spaces.
* | Merge topic 'vs-win10-sdk'Brad King2015-10-021-0/+10
|\ \ | |/ | | | | | | | | | | 3f077996 VS: Add support for selecting the Windows 10 SDK (#15670) 5dfc4c5f VS: Add hook to initialize Windows platform settings 61c472a2 cmSystemTools: Add VersionCompareGreater helper
| * VS: Add support for selecting the Windows 10 SDK (#15670)Gilles Khouzam2015-10-021-0/+10
| | | | | | | | | | | | | | | | | | Teach the VS 2015 generator to produce a WindowsTargetPlatformVersion value. Use the CMAKE_SYSTEM_VERSION to specify the version and if not set choose a default based on available SDKs. Activate this behavior when targeting Windows 10. Co-Author: Brad King <brad.king@kitware.com>
* | cmVisualStudio10TargetGenerator: Fix unsigned integer constant typeBrad King2015-09-301-1/+1
|/ | | | | Add a 'u' suffix to FILETIME component integer constant initializers. This avoids warnings about the range of the signed constant value.
* VS: Prevent generated "rule" files from causing rebuildsMike Pagel2015-09-281-0/+27
| | | | | | When we generate a ".rule" file to attach a custom command in a VS IDE project, set the file timestamp to be old enough to prevent the rule from re-running due to its timestamp.
* VS: Fix rebuild with regeneration after input CMake code change (#15754)Brad King2015-09-221-1/+1
| | | | | | | | | When using "cmake --build ." or "MSBuild ALL_BUILD.vcxproj" to drive the build the dependencies in the .sln file are not considered. This means that ProjectReference elements in .vcxproj files are used to order targets. We must ensure that the ZERO_CHECK target is listed as the first dependency of every target so that when it causes regeneration of the build files then MSBuild has not yet loaded the updated files.
* VS: Refactor target ordering logicBrad King2015-09-221-1/+1
| | | | | | | | Refactor cmGlobalVisualStudioGenerator::TargetCompare to store the name of the target that should come first instead of hard-coding "ALL_BUILD". Update client sites to specify "ALL_BUILD" when ordering for .sln files and an empty string otherwise (in cases when "ALL_BUILD" should not be encountered anyway).
* Add support for *.manifest source files with MSVC toolsBrad King2015-09-171-0/+29
| | | | | | | | Classify .manifest sources separately, add dependencies on them, and pass them to the MS manifest tool to merge with linker-generated manifest files. Inspired-by: Gilles Khouzam <gillesk@microsoft.com>