summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Add the INTERFACE_LIBRARY target type.Stephen Kelly2013-10-071-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* VS: Generate ToolsVersion matching each VS versionRobert Maynard2013-08-261-12/+20
| | | | | | The MSBuild version for each Visual Studio generator isn't 4.0. With Visual Studo 2013 the ToolsVersion moved from being tied to the .NET framework and now has its own version number.
* VS10: Add support for assembler code (#11536)Patrick Gansterer2013-08-051-12/+35
| | | | | Use the masm BuildCustomizations, which are part of the Visual Studio installation to allow compilation of asm files.
* VS10: Escape include paths in XML project files (#14331)Brad King2013-08-011-1/+1
| | | | | | Fix generation of the AdditionalIncludeDirectories element content to escape for XML syntax. We already escape content of other elements, this one was simply missing by accident.
* VS10: Honor user-specified /SUBSYSTEM: flag (#14326)Brad King2013-07-311-2/+2
| | | | | | Use the WIN32_EXECUTABLE target property only to set the SubSystem build attribute default. When user-specified flags are later parsed they may then override it.
* Unify the way the flags of a static library are readPatrick Gansterer2013-07-311-8/+5
| | | | | Introduce cmLocalGenerator::GetStaticLibraryFlags() to have a central function for getting the linker flags for a given target.
* Refactor cmTarget::GetCompileDefinitions to use an out-vector, not a string.Stephen Kelly2013-07-111-2/+3
| | | | Refactor to create AddCompileDefinitions.
* Merge topic 'vs12-generator'Brad King2013-07-011-6/+18
|\ | | | | | | | | | | | | | | | | 9a76d83 VS12: Find proper MSBuild for VSProjectInSubdir test 4e5cb39 Merge branch 'master' into vs12-generator 78fdbbc FindBoost: Add -vc120 mangling for VS 12 e99d7b1 VS12: Generate flag tables from MSBuild v120 tool files 77ac9b8 VS12: Add Visual Studio 12 generator (#14251)
| * Merge branch 'master' into vs12-generatorBrad King2013-06-281-22/+103
| |\ | | | | | | | | | | | | Resolve conflicts in Tests/Preprocess/CMakeLists.txt by keeping the side from 'master'.
| * | VS12: Generate flag tables from MSBuild v120 tool filesBrad King2013-06-281-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run cmparseMSBuildXML.py on cl.xml, lib.xml, and link.xml to generate our flag tables: python cmparseMSBuildXML.py -x ".../MSBuild/Microsoft.Cpp/v4.0/v120/1033/cl.xml" > cmVS12CLFlagTable.h python cmparseMSBuildXML.py -x ".../MSBuild/Microsoft.Cpp/v4.0/v120/1033/lib.xml" > cmVS12LibFlagTable.h python cmparseMSBuildXML.py -x ".../MSBuild/Microsoft.Cpp/v4.0/v120/1033/link.xml" > cmVS12LinkFlagTable.h Fix up the declaration names at the top of each file. Finally, teach cmVisualStudio10TargetGenerator to select the version of the table matching the version of VS.
* | | Merge topic 'vs-windows-forms'Brad King2013-07-011-8/+45
|\ \ \ | |_|/ |/| | | | | | | | 6c9712c VS: Add Resx configuration to the vcxproj file
| * | VS: Add Resx configuration to the vcxproj fileJonas Andersen2013-06-281-8/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In my project group we are using CMake to generate c++/cli winform projects and I noticed the work done in commit 79ec7868 (VS: Add Windows Forms Support, 2013-04-29) was in the right direction for solving some of the problems we were facing. The changes as submitted was breaking some functionality in our projects, so I made some changes that fixes our problems and I believe that it will also work for others. * Resx files did not link correctly with the winform h-file so I added the Resx configuration to the vcxproj file. * I removed the functionality for setting <CLRSupport> true for the project based on if an resx-file is pressent. This is preventing us from using native cpp code. Also this do not address that some projects will need to set other options like clr:pure, clr:safe. This could be implemented as a cmake option, so it is possible to specify exactly what is needed. Existing VSWindowsFormsResx Test project is updated so it will be working with my changes.
* | | Refactor target COMPILE_OPTIONS and COMPILE_FLAGS handlingBrad King2013-06-271-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the cmLocalGenerator GetCompileOptions method with an AddCompileOptions method since all call sites of the former simply append the result to a flags string anyway. Add a "lang" argument to AddCompileOptions and move the CMAKE_<LANG>_FLAGS_REGEX filter into it. Move the call sites in each generator to a location that has both the language and configuration available. In the Makefile generator this also moves the flags from build.make to flags.make where they belong.
* | | Merge topic 'add-whitespace'Brad King2013-06-241-3/+3
|\ \ \ | | | | | | | | | | | | | | | | 2331b57 Add whitespace after colons in error messages.
| * | | Add whitespace after colons in error messages.Stephen Kelly2013-06-211-3/+3
| | | |
* | | | VS: Add support for .NET target framework versionChristian Maaser2013-06-141-0/+7
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Teach CMake to generate the TargetFrameworkVersion XML node as documented at http://msdn.microsoft.com/en-us/library/vstudio/ff770576.aspx from target property VS_DOTNET_TARGET_FRAMEWORK_VERSION.
* | | Merge topic 'target-COMPILE_OPTIONS'Brad King2013-06-031-1/+5
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | 24466f2 Add target_compile_options command. 80ca9c4 Add COMPILE_OPTIONS target property. 7cb2308 cmTarget: Rename LinkInterfaceIncludeDirectoriesEntries 47f80d9 cmTarget: Rename struct to be more re-usable. 1319a14 Add <LANG>_COMPILER_ID generator expressions. 3549676 Add cmLocalGenerator::GetCompileOptions. f3ad863 VS6: Rename some variables to correspond to config values.
| * | Add cmLocalGenerator::GetCompileOptions.Stephen Kelly2013-06-021-1/+5
| | | | | | | | | | | | | | | | | | Currently it only adds the contents of the COMPILE_FLAGS target property, but it can be extended to handle a new COMPILE_OPTIONS generator expression enabled property.
* | | Merge topic 'vs-RootNamespace'Brad King2013-06-031-0/+9
|\ \ \ | |/ / |/| | | | | | | | cca955a VS: Add VS_GLOBAL_ROOTNAMESPACE target property
| * | VS: Add VS_GLOBAL_ROOTNAMESPACE target propertyJohn Farrier2013-05-311-0/+9
| | | | | | | | | | | | | | | Add a setting for Visual Studio projects for the root namespace in the "Globals" PropertyGroup section of the project file.
* | | Merge topic 'vs-asm-listing-location'Brad King2013-05-211-3/+2
|\ \ \ | | | | | | | | | | | | | | | | 7e0c45e VS: Allow /Fa to set AssemblerListingLocation (#14153)
| * | | VS: Allow /Fa to set AssemblerListingLocation (#14153)Brad King2013-05-201-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generate the default AssemblerListingLocation through the flag map so that it can be overridden by a user /Fa flag. Also teach the VS 7-9 generators to map /Fa to AssemblerListingLocation. While at it, fix the AssemblerListingLocation default value to have a trailing slash after the configuration name. This ensures it will be treated as a directory and not a file name.
* | | | Merge topic 'vs-windows-forms'Brad King2013-05-211-2/+64
|\ \ \ \ | |/ / / |/| / / | |/ / | | | 79ec786 VS: Add Windows Forms Support
| * | VS: Add Windows Forms SupportJohn Farrier2013-05-161-2/+64
| |/ | | | | | | | | | | | | Add support to maintain designer functionality for Visual Studio C++ Windows Forms projects. Also add a test project showing how to use the CMakeLists.txt file and, when successfully configured, will allow use of the designer for the included form.
* | Merge topic 'doc-improvements'Brad King2013-05-161-0/+15
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | VS10: add detailed comment about MIDL processingAndreas Mohr2013-05-071-0/+15
| |/
* | VS: Separate compiler and linker PDB files (#11899, #14062)Brad King2013-04-051-8/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MS tools create two types of PDB files as explained here: http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.71%29.aspx http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.80%29.aspx http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.90%29.aspx http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.100%29.aspx One is created by the compiler (/Fd) and the other by the linker (/pdb). The two options should not specify the same file. Split them up. In the VS IDE generators, simply drop ProgramDataBaseFileName to take the VS default "/Fd$(IntDir)vc$(PlatformToolsetVersion).pdb". In the Makefile generators, set "/Fd" on the compile line to be the directory containing object files (with a trailing slash the compiler will add the "vc$(PlatformToolsetVersion).pdb" filename automatically). Drop the /Fd option from the exe link command line and add "/pdb" instead (already done for dll linking). Update these rules for both MSVC and Intel tools. Drop support for PDB_OUTPUT_DIRECTORY and PDB_NAME in STATIC libraries because the generated .pdb files are only from /Fd and not real linker-generated .pdb files. Update documentation to clarify that the PDB_* properties are only for linker .pdb files. This regresses the PDBDirectoryAndName test for STATIC libraries. Since it is not clear at this time what should be done for STATIC library .pdb files, comment out the relevant portion of the test and leave a TODO comment.
* Fix the evaluation of per-config COMPILE_DEFINITIONS (#14037)Stephen Kelly2013-03-251-2/+0
| | | | | | | | | | | | | | The API for retrieving per-config COMPILE_DEFINITIONS has long existed because of the COMPILE_DEFINITIONS_<CONFIG> style properties. Ensure that the provided configuration being generated is also used to evaluate the generator expressions in cmTarget::GetCompileDefinitions. Both the generic COMPILE_DEFINITIONS and the config-specific variant need to be evaluated with the requested configuration. This has the side-effect that the COMPILE_DEFINITIONS does not need to be additionally evaluated with no configuration, so the callers can be cleaned up a bit too.
* VS 10: Fix CMAKE_<LANG>_STACK_SIZE implementation (#13968)Brad King2013-03-041-1/+1
| | | | | | | | | Use the /STACK: flag to pass the value through flag parsing so that the generator converts it to the StackReserveSize project file option. The option was accidentally left out by commit 7491f529 (first pass at VS 10, 2009-06-25). Suggested-by: goatboy160@yahoo.com
* Move GetCompileDefinitions to cmTarget.Stephen Kelly2013-01-291-2/+2
|
* VS11: Simplify external object file handling (#13831)Brad King2013-01-071-5/+20
| | | | | | | | | | | | | | | | | Since commit 9a6ff950 (Fix for bug where VS2010 did not use .obj files as part of the build, 2011-04-01) and commit b291d9e7 (VS10: Fix external objects generated outside target, 2012-03-19) we try to detect whether an external object file is also a custom command output in the same target. This is because VS10 includes .obj custom command outputs on the link line by default. VS 11 supports a "<LinkObjects ...>false</LinkObjects>" setting in custom command rules to tell VS not to link the outputs. From the VS help: Specify whether the Inputs and output files with specific extensions (.obj, .lib, .res, .rsc) are passed to the linker. Treat all external object files the same and add "<Object>" settings for them.
* Revert "Move GetLinkInformation to cmGeneratorTarget"Stephen Kelly2012-11-211-1/+1
| | | | | | | As we can't move all linking related code from cmTarget, it makes sense to reverse the move in some cases. This reverts commit 4f5384e75c6a00d110d3fa3f555a3f6a4f31bb46.
* Resolve ambiguity warning regarding use of && and ||.Stephen Kelly2012-11-131-2/+2
| | | | | | | | | | This is not ambiguous to the compiler, but it may seem ambiguous to the reader. From reading 3a53005f (Build object library targets in VS), 5484550a (Detect and set Unicode character set in VS 10), and 9e01aefd (VS: Add support for WinRT project properties (#12930)), this appears to be the intentional semantic.
* Resolve warnings about used enum values in switch blocks.Stephen Kelly2012-11-131-0/+3
|
* Resolve warnings about unused variables.Stephen Kelly2012-11-071-1/+0
|
* VS10: Honor /DELAYSIGN and /KEYFILE flags (#13601)Brad King2012-10-261-0/+17
| | | | | | | Fix the VS 10 link flag map to name the project file entries correctly. The VS 11 link flag map already has the correct names. Generate the entries in the <PropertyGroup> along with incremental linking options. Drop them from the <Link> element because VS does not use them.
* VS10: Refactor link options collectionBrad King2012-10-261-81/+61
| | | | | | Avoid collecting the link options twice. Collect them once in a LinkOptions member and use it from both places. We already do this for compiler options with the ClOptions member.
* Fix config-specific INCLUDE_DIRECTORIES in multi-config generatorsStephen Kelly2012-10-171-3/+4
| | | | | | | | Commit 08cb4fa4 (Process generator expressions in the INCLUDE_DIRECTORIES property, 2012-09-18) contained an incorrect assumption that CMAKE_BUILD_TYPE was set on the makefile for each generated configuration in multi-config generators. Fix that by making the GetIncludeDirectories API depend on the config.
* Merge topic 'vs-pdb-output'Brad King2012-10-011-5/+3
|\ | | | | | | | | | | | | | | 2ccca05 Run PDBDirectoryAndName test on MSVC and Intel efc83b3 Document that PDB_(NAME|OUTPUT_DIRECTORY) are ignored for VS 6 b294457 Verify that PDB_(NAME|OUTPUT_DIRECTORY) are honored in test 3f60dbf Add PDB_OUTPUT_DIRECTORY and PDB_NAME target properties (#10830)
| * Add PDB_OUTPUT_DIRECTORY and PDB_NAME target properties (#10830)Yuchen Deng2012-09-251-5/+3
| | | | | | | | | | | | | | This enables changing the name and output folder of the debug symbol files produced by MS compilers. Inspired-by: Thomas Bernard <thomas.bernard@ipetronik.com>
* | Return a std::string from GetCompileDefinitions.Stephen Kelly2012-09-211-2/+3
| |
* | Port remaining code to GetCompileDefinitions().Stephen Kelly2012-09-211-9/+3
| |
* | Move GetIncludeDirectories to cmGeneratorTarget.Stephen Kelly2012-09-191-1/+2
| |
* | Move GetLinkInformation to cmGeneratorTargetStephen Kelly2012-09-191-1/+1
|/
* Merge topic 'vs11-flag-table'David Cole2012-08-241-4/+31
|\ | | | | | | | | | | 9b2dda5 VS11: Generate flag tables from MSBuild V110 tool files 4cb99b1 cmparseMSBuildXML: Include DisplayName in the output
| * VS11: Generate flag tables from MSBuild V110 tool filesBrad King2012-08-221-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | Run cmparseMSBuildXML.py on cl.xml, lib.xml, and link.xml to generate our flag tables: python cmparseMSBuildXML.py -x ".../MSBuild/Microsoft.Cpp/v4.0/V110/1033/cl.xml" > cmVS11CLFlagTable.h python cmparseMSBuildXML.py -x ".../MSBuild/Microsoft.Cpp/v4.0/V110/1033/lib.xml" > cmVS11LibFlagTable.h python cmparseMSBuildXML.py -x ".../MSBuild/Microsoft.Cpp/v4.0/V110/1033/link.xml" > cmVS11LinkFlagTable.h Fix up the declaration names at the top of each file. Finally, teach cmVisualStudio10TargetGenerator to select the version of the table matching the version of VS.
* | Merge topic 'VS10-PrecompiledHeader-default'David Cole2012-08-241-0/+1
|\ \ | | | | | | | | | | | | f0ae381 VS: Disable precompiled headers unless enabled by project (#12930)
| * | VS: Disable precompiled headers unless enabled by project (#12930)Brad King2012-08-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In VS 11 the WindowsAppContainer element enabled by the VS_WINRT_EXTENSIONS property activates precompiled header support automatically if no PrecompiledHeader setting is specified. For VS 10 and 11 set PrecompiledHeader to "NotUsing" explicitly by default unless overridden by a project-specified flag. Suggested-by: Eugene Golushkov <eugene_gff@ukr.net>
* | | Merge topic 'VS11-WinRT-project-issue-12930'David Cole2012-08-241-1/+2
|\ \ \ | |/ / | | / | |/ |/| 4c9ae47 VS11: Rename 'Immersive' to 'WindowsAppContainer' (#12930)
| * VS11: Rename 'Immersive' to 'WindowsAppContainer' (#12930)Brad King2012-08-211-1/+2
| | | | | | | | | | | | | | | | | | | | Since commit 9e01aefd (VS: Add support for WinRT project properties, 2012-02-03) CMake generates for VS 11 projects the 'Immersive' element for the VS_WINRT_EXTENSIONS target property. That was based on the VS 11 preview version. The final version renamed the element to 'WindowsAppContainer', so generate that instead. Suggested-by: Eugene Golushkov <eugene_gff@ukr.net>