summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudioGeneratorOptions.cxx
Commit message (Collapse)AuthorAgeFilesLines
* VS: Fix MANIFESTUAC link flag map to .vcxproj elementscomicfans2017-09-181-0/+68
| | | | | | | | | | Add special parsing of the flags given in `/MANIFESTUAC:"..."` in order to map them correctly to `.vcxproj` elements. Keep the old incorrect flag table entries for `uiAccess` and `level` flags for compatibility even though they do not really exist. Fixes: #16563
* Use C++11 nullptrDaniel Pfeifer2017-08-241-1/+1
|
* Drop Visual Studio 7 .NET 2003 generatorBrad King2017-04-191-3/+0
| | | | This generator has been deprecated since CMake 3.6. Remove it.
* cmGlobalVisualStudioGenerator: Drop VS7 enumeration valueBrad King2017-04-191-1/+0
| | | | | We no longer support the VS 7.0 (.NET 2002) IDE, so drop the enumeration value corresponding to its version.
* Merge topic 'vs-rc-defines'Brad King2017-03-291-1/+4
|\ | | | | | | | | | | | | | | | | | | | | fff34934 MSVC: Restore _DEBUG preprocessor definition in RC debug builds 79a91538 RC: Add missing CMAKE_RC_FLAGS_<CONFIG> entries to cache c77194ec VS: Honor preprocessor definitions in RC flags 1449f6f6 cmVisualStudio10TargetGenerator: De-duplicate preprocessor defs 8a619e8c cmIDEOptions: Add GetDefines method Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !640
| * cmVisualStudio10TargetGenerator: De-duplicate preprocessor defsBrad King2017-03-281-1/+4
| |
* | VS: Select CUDA code generation architecturesBrad King2017-03-101-0/+51
| | | | | | | | | | Parse the `-gencode=`, `-arch`, and `-code` flags and generate a `CodeGeneration` field in the project file.
* | VS: Select the CUDA runtime libraryBrad King2017-03-101-0/+36
| | | | | | | | | | | | Parse the `-cudart=` option and add a corresponding `CudaRuntime` field to the generated project file. Also add a matching `.lib` to the list of libraries linked.
* | VS: Add basic infrastructure for CUDA generationBrad King2017-03-101-0/+3
| | | | | | | | Generate the `CudaCompile` elements in `.vcxproj` files.
* | VS: Add method to take a value out of the option parser flag mapBrad King2017-03-101-0/+12
| | | | | | | | Remove a flag from the map and return its value.
* | VS: Add method to re-parse specific option parser fieldsBrad King2017-03-101-1/+17
| | | | | | | | | | | | This will allow a client to parse flags, replace the flag tables, and then re-parse a field in which flags for a secondary tool were collected.
* | VS: Add method to clear flag tables of option parserBrad King2017-03-101-0/+7
| |
* | VS: Refactor AdditionalOptions generationBrad King2017-02-151-25/+2
| | | | | | | | | | | | Store unknown flags directly in a flag map entry for `AdditionalOptions` instead of having a separate member for them. This avoids duplicating the output generation logic for the entry.
* | cmVisualStudioGeneratorOptions: Add PrependInerhitedString methodBrad King2017-02-151-0/+11
| |
* | VS: De-duplicate PreprocessorDefinitions tag nameBrad King2017-02-141-5/+5
|/ | | | Store the name in a variable for re-use.
* VS: Teach option map IsDebug() method about C# projectsMichael Stürmer2016-12-071-1/+11
|
* iwyu: Fix VisualStudio specific issuesDaniel Pfeifer2016-11-281-0/+1
|
* VS: Place source-specific AdditionalOptions after target-wide flagsBrad King2016-11-021-2/+3
| | | | | | | | | | Flags specified in the `COMPILE_FLAGS` source-file property should be placed after those in target-wide properties so that those on individual source files can override those on the whole target. This is already done by most generators but was not implemented correctly for VS 2010 and above. Closes: #16400
* VS: Add internal API for detecting "managed" projectsMichael Stürmer2016-10-191-0/+5
| | | | | This is in preparation for adding CSharp language support to the VS generator.
* VS15: Add Visual Studio 15 generatorBrad King2016-09-071-0/+1
| | | | | | | | | | | | | | | | Call the generator "Visual Studio 15" without any year because the preview version of VS 15 does not provide a year in the product name. Copy cmGlobalVisualStudio14Generator to cmGlobalVisualStudio15Generator and update version numbers accordingly. Add the VS15 enumeration value. Note that we do not need to add a MSVC15 variable or v150 toolset because Visual Studio 15 comes with an updated version of the v140 toolset and remains ABI-compatible. Teach tests VSExternalInclude, RunCMake.GeneratorPlatform, and RunCMake.GeneratorToolset to treat VS 15 as they do VS 10-14. Closes: #16143
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-182/+112
| | | | | | | | | | | | | 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-15/+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.
* 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.
* Replace foo.size() pattern with !foo.empty().Stephen Kelly2015-08-241-3/+3
|
* cmOutputConverter: Adopt command line escaping codeBrad King2015-07-081-3/+2
| | | | | | | Port code from the KWSys System_Shell APIs into cmOutputConverter. Drop it from our copy of KWSys because upstream will drop it too, and by doing it in this commit 'git blame' may have an easier time connecting the history of the content.
* cmOutputConverter: Adopt EscapeWindowsShellArgument methodBrad King2015-07-081-1/+2
| | | | Move it out of cmSystemTools and into cmOutputConverter.
* VS: Move version information to global generator.Stephen Kelly2015-05-191-13/+13
|
* Fix incremental linking setting for Fortran + VSZack Galbreath2014-11-211-3/+38
| | | | | | | | | | | | | | This commit fixes a bug where it was impossible to specify /INCREMENTAL to Fortran projects built with Visual Studio. The problem was due to the fact that .vfproj files expect the value of this flag to be "linkIncremental{No,Yes}, whereas .vcproj files expect this value to be 0, 1, or 2. The implementation of this fix adds a new data structure for Visual Studio linker flags specific to Fortran. This can easily be extended in the future if more such discrepencies between C/C++ and Fortran linking are discovered.
* Merge topic 'vs-windows-apps'Brad King2014-09-021-0/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 39fefde2 VS: Add test case for Windows Phone and Windows Store 89da8465 MSVC: Define 'WIN32' for Windows Store and Windows Phone ed7f085f Help: Add notes for topic 'vs-windows-apps' dd11ae8f VS: Do not compile C sources as WinRT (#15100) b8e40538 VS: Mark Windows Phone and Store targets as App Containers 0432f062 VS: Always ignore ole32 on Windows Phone 8.0 e6ff2f8b VS: Generate Windows Metadata for WinRT components ee48f4c7 VS: Generate Windows Phone and Windows Store projects as Unicode cb1aceed VS: Add VS_WINRT_COMPONENT property to enable CompileAsWinRT 401269e4 VS: Handle .pfx files explicitly in generator 23782171 VS: Handle AppxManifest sources explicitly in generator bc373c6d VS: Set Window Phone/Store app type in CMake-generated targets d89b2889 VS: Mark CMake-generated targets as Utility in .vcxproj files 03ad8f28 CMakeDetermineCompilerABI: Link with standard libraries on MSVC
| * VS: Add VS_WINRT_COMPONENT property to enable CompileAsWinRTGilles Khouzam2014-08-211-0/+6
| | | | | | | | | | | | | | | | Deprecate VS_WINRT_EXTENSIONS and document VS_WINRT_COMPONENT as for VS generators only. Also define _WINRT_DLL in SHARED libraries in order to get a .lib produced. Inspired-by: Paul Annetts <paul@lightunobscured.com>
* | VS: Refactor include directory generation in .vcxproj filesBrad King2014-08-131-4/+0
|/ | | | | | | | Use the cmVisualStudioGeneratorOptions flag map to add the AdditionalIncludeDirectories element to the project file. Move appending of %(AdditionalIncludeDirectories) to the locations that populate the flag vectors instead of where they are written out.
* VS: Encode mapped flag values in XML project files (#15031)Brad King2014-07-231-3/+3
| | | | | | | Teach cmVisualStudioGeneratorOptions to encode FlagMap entries and the FlagString value properly in vcproj/vcxproj XML files. Update the one existing call site that pre-encoded the value to not do so.
* cmVisualStudioGeneratorOptions: Simplify XML escaping APIBrad King2014-07-231-8/+7
| | | | Accept arguments as std::string to avoid c_str() calls.
* cmIDEOption: Store mapped flag values as a vector<string>Brad King2014-07-231-5/+19
| | | | | | | | Some FlagMap entries are ;-lists. Store values as vector<string> so that individual values may contain ';' characters. Delay the construction of the final ;-list until writing to the VS project file. With this approach the generated file may contain ;-separated values that contain encoded ';' characters.
* VS14: Add Visual Studio 14 generator (#14982)Brad King2014-06-251-0/+1
| | | | | | | | | | | | | | | | Call the generator "Visual Studio 14" without any year because this version of VS does not provide a year in the product name. Copy cmGlobalVisualStudio12Generator to cmGlobalVisualStudio14Generator and update version numbers accordingly. Add the VS14 enumeration value. Teach the platform module Windows-MSVC to set MSVC14 and document the variable. Teach module InstallRequiredSystemLibraries to look for the VS 14 runtime libraries. Teach tests CheckCompilerRelatedVariables, VSExternalInclude, and RunCMake.GeneratorToolset to treat VS 14 as they do VS 10, 11, and 12. Co-Author: Pawel Stopinski <diokhan@go2.pl>
* strings: Remove cmStdString referencesBen Boeckel2014-03-081-2/+2
| | | | | | | | | | | Casts from std::string -> cmStdString were high on the list of things taking up time. Avoid such implicit casts across function calls by just using std::string everywhere. The comment that the symbol name is too long is no longer relevant since modern debuggers alias the templates anyways and the size is a non-issue since the underlying methods are generated since it's inherited.
* stringapi: Use strings for the languagesBen Boeckel2014-03-081-2/+2
|
* Improve const-correctness in cmVisualStudioGeneratorOptionsPatrick Gansterer2013-08-051-3/+3
| | | | Add const qualifier to IsDebug(), UsingSBCS() and UsingUnicode().
* Merge branch 'master' into vs12-generatorBrad King2013-06-281-1/+2
|\ | | | | | | | | Resolve conflicts in Tests/Preprocess/CMakeLists.txt by keeping the side from 'master'.
| * Merge topic 'doc-improvements'Brad King2013-05-161-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7cc2805 Docs: Clarify wording "flag used" => "flag (to|will) be used" 2378a69 Docs: Clarify that CMAKE_*_(PREFIX|SUFFIX) affect filenames 56ca34d Docs: Update description of CMAKE_(BUILD_TYPE|CONFIGURATION_TYPES) 2bab472 VS10: add detailed comment about MIDL processing e619111 Explain distribution of Win9x binary on all Windows versions. 5ca4336 FindwxWidgets: add DOC strings with usual style f57800d Fix spelling and typos (product names) bf019d7 Fix spelling and typos (non-binary) ddac8d3 Fix spelling and typos (affecting binary data / module messages) 86832ce Fix spelling and typos (affecting users)
| | * Fix spelling and typos (non-binary)Andreas Mohr2013-05-071-1/+1
| | |
| * | VS 10: Escape ; as %3B in preprocessor definitions (#14073)Brad King2013-04-111-0/+1
| |/ | | | | | | | | | | | | | | | | Use the suggestion from http://support.microsoft.com/kb/2262855 to escape semicolons in preprocessor definitions for VS >= 10. Update the COMPILE_DEFINITIONS documentation disclaimer list of known limitations accordingly. Update our "Preprocess" test to cover the case. Suggested-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
* | VS12: Add Visual Studio 12 generator (#14251)Brad King2013-06-281-0/+1
|/ | | | | | | | | | | | | | Copy cmGlobalVisualStudio11Generator to cmGlobalVisualStudio12Generator and update version numbers accordingly. Add the VS12 enumeration value. Add module CMakeVS12FindMake to find MSBuild. Look for MSBuild in its now-dedicated Windows Registry entry. Teach the platform module Windows-MSVC to set MSVC12 and document the variable. Teach module InstallRequiredSystemLibraries to look for the VS 12 runtime libraries. Teach tests CheckCompilerRelatedVariables, Preprocess, VSExternalInclude, and RunCMake.GeneratorToolset to treat VS 12 as they do VS 10 and 11. Inspired-by: Minmin Gong <minmin.gong@gmail.com>
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-2/+2
| | | | | | | | | | | | | | | | | Our Git commit hooks disallow modification or addition of lines with trailing whitespace. Wipe out all remnants of trailing whitespace everywhere except third-party code. Run the following shell code: git ls-files -z -- \ bootstrap doxygen.config '*.readme' \ '*.c' '*.cmake' '*.cpp' '*.cxx' \ '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \ '*.mm' '*.pike' '*.py' '*.txt' '*.vim' | egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' | egrep -z -v '^(Modules/CPack\..*\.in)' | xargs -0 sed -i 's/ \+$//'
* Visual Studio: Allow setting Single Byte Character Set (#12189)Aaron C. Meadows2012-02-171-0/+14
| | | | | | | For Visual Studio using the Preprocessor Define _SBCS. This behavior is similar to the way that _UNICODE and _MBCS work already. Added tests to confirm this behavior.
* Enumerate VS11 version explicitly in local generatorsBrad King2011-11-141-6/+7
| | | | | | | | | | | Since the parent commit the local generator Version ivar may be compared for ordering. Convert comparisons: "==VS10" becomes ">=VS10" "!=VS10" becomes "< VS10" to support an explicit enumeration value for VS11 with no change in behavior.
* Order VS local generator Version ivar values consistentlyBrad King2011-11-141-13/+13
| | | | | | | | | | | Move the Version member to the top cmLocalVisualStudioGenerator class and set it consistently for instances created by all the global generator versions. Use an enumeration type with values scaled by a factor of 10 so we can handle VS 7.1 without out-of-order numbers. VS 7.1 support for SuppressStartupBanner was broken by commit 25116a3c (Fix CMAKE_VERBOSE_MAKEFILE for VS10 vcxproj files, 2011-10-11) because it assumed comparison of VS version numbers works. Now it does.
* Fix CMAKE_VERBOSE_MAKEFILE for VS10 vcxproj files (#12504)Niels Dekker2011-10-111-3/+3
|
* Fix for bug#10798. VS10 did not append -I flags with COMPILE_FLAGS prop.Bill Hoffman2011-06-021-1/+6
| | | | This fix adds a test for this case for all generators.
* VS10: Escape double quote chars in defines for rc files (#11695)David Cole2011-01-261-1/+7
| | | | | | | | To get rc defines to work in the VS10 IDE requires \" when constructing PreprocessorDefinitions strings. This is different than defines for cl. Also, per-file rc defines were not being generated. Fix that, too.