summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudioGenerator.h
Commit message (Collapse)AuthorAgeFilesLines
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* VS15: Add Visual Studio 15 generatorBrad King2016-09-071-1/+2
| | | | | | | | | | | | | | | | 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
* cmGlobalGenerator: Make IsMultiConfig() constTobias Hunger2016-06-011-1/+1
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-21/+38
| | | | | | | | | | | | | 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.
* VS: Add option to choose the `.sln` startup project (#15578)Davy Durham2016-03-221-0/+2
| | | | | | | | Add a `VS_STARTUP_PROJECT` directory property to specify the project that should be placed first in the `.sln` file so that it will be selected as the default startup project. Co-Author: Taylor Braun-Jones <taylor.braunjones@avigilon.com>
* Drop Visual Studio 6 generatorBrad King2016-03-091-1/+0
| | | | | | This generator has been deprecated since CMake 3.3. Remove it. Update documentation, modules, and tests to drop content specific to this generator.
* VS: Port interface to cmGeneratorTargetStephen Kelly2015-10-241-8/+10
|
* VS: Port WriteUtilityDepends to cmGeneratorTargetStephen Kelly2015-10-241-1/+1
|
* VS: Port utility depends to cmGeneratorTargetStephen Kelly2015-10-241-2/+2
|
* VS: Port target depends to cmGeneratorTargetStephen Kelly2015-10-241-2/+2
|
* VS: Port TargetIsFortranOnly to cmGeneratorTargetStephen Kelly2015-10-241-1/+1
|
* VS: Port LinkClosure to cmGeneratorTargetStephen Kelly2015-10-241-2/+2
|
* VisualStudio: Replace Compute override with AddExtraIDETargets override.Stephen Kelly2015-10-051-1/+1
|
* VS: Refactor target ordering logicBrad King2015-09-221-3/+9
| | | | | | | | 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).
* cmGlobalGenerator: Virtualize the Compute step and override it.Stephen Kelly2015-07-301-1/+1
|
* Merge topic 'auto_export_dll_symbols'Brad King2015-07-081-0/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | 8f86407c Windows: Optionally generate DLL module definition files automatically 069aa93b bindexplib: Add support for "/bigobj" format objects 61bbbdcf bindexplib: Fix treatment of some symbols de70c922 bindexplib: Teach DumpFile to return errors 8ea69dfe bindexplib: Build source as part of CMakeLib 2963cb2a bindexplib: Wrap long lines 4ff09893 bindexplib: Drop code that CMake does not need 7de8276c bindexplib: Add copyright/license notice block 65086ad7 bindexplib: Import original implementation from CERN
| * Windows: Optionally generate DLL module definition files automaticallyBill Hoffman2015-07-061-0/+4
| | | | | | | | | | | | | | Create target property WINDOWS_EXPORT_ALL_SYMBOLS to automatically generate a module definition file from MS-compatible .obj files and give it to the linker in order to export all symbols from the .dll part of a SHARED library.
* | cmComputeTargetDepends: Change API to use cmGeneratorTarget.Stephen Kelly2015-07-011-1/+2
|/
* cmGlobalGenerator: Require a cmake instance in ctor.Stephen Kelly2015-05-271-1/+1
| | | | It is required anyway, so this makes it explicit.
* VS: Move version information to global generator.Stephen Kelly2015-05-191-0/+21
|
* VS: Drop reload macros for VS >= 10 (#11258,#14680)Brad King2015-04-151-2/+2
| | | | | | | | We never implemented them for VS 11 (2012), 12 (2013), or 14 (2015). For VS 10 (2010) the reload macro does not work correctly when run from inside a build launched through the IDE because stopping the build kills the CMake that is driving the reload. Fortunately VS >= 10 know how to reload the whole solution anyway.
* cmGlobalGenerator: Create a non-virtual 'DoGenerate' methodBrad King2014-07-221-5/+2
| | | | | | | Make the virtual 'Generate' method protected. Make 'DoGenerate' the main entry point to generation. This gives cmGlobalGenerator a chance to do some early operations before the individual generator-specific implementations take over.
* VS: Refactor CMAKE_FORCE_*64 platform definitionsBrad King2014-07-171-3/+0
| | | | | | | Remove the general infrastructure for these additional platform definitions and hard-code the only two special cases that used it. They are only for historical reasons so no new such cases should be added.
* cmGlobalGenerator: Make ComputeTargetObjects non-virtualStephen Kelly2014-03-151-1/+0
| | | | | | | | Implement it in terms of the ComputeObjectFilenames virtual method on the local generators. Remove the reimplementation from the global generators which are now all functionally identical.
* cmGlobalGenerator: Extract a ComputeTargetObjectDirectory interface.Stephen Kelly2014-03-131-0/+1
| | | | Make it public for future external calls.
* stringapi: Use strings for generator namesBen Boeckel2014-03-081-1/+1
|
* 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 in target nameBen Boeckel2014-03-081-2/+2
|
* stringapi: Use strings for the languagesBen Boeckel2014-03-081-1/+2
|
* OS X: Make sure RPATHs are unique to avoid possible corruption.Clinton Stimpson2014-02-031-0/+4
| | | | | | | | When using link_directories() and including CMAKE_CFG_INTDIR, one can end up with duplicate RPATHs in the binary which install_name_tool cannot fix without corrupting the binary. Also, the cmake_install.cmake file has been fixed to correctly handle these generator specific variables.
* cmGlobalGenerator: Make SelectMakeProgram const.Stephen Kelly2014-01-121-1/+1
|
* Constify handling of target dependencies.Stephen Kelly2013-12-111-8/+9
|
* VS: Switch to internal CMAKE_MAKE_PROGRAM lookup by generatorsBrad King2013-11-181-0/+3
| | | | | | | | Drop the "Modules/CMakeVS*FindMake.cmake" files. Override the cmGlobalGenerator::FindMakeProgram method for VS generators to use their internal APIs to locate the build tool. Set the CMAKE_MAKE_PROGRAM as a normal variable for use by project code, but do not cache it. This will allow CMake and CTest to select the proper tool at build time.
* Require CMAKE_<LANG>_COMPILER to be found as a full pathBrad King2013-10-281-0/+1
| | | | | | | | | | | | | | | | | | | | All generators now support detection of the full path to the compiler, so require it to be so. This will allow CMake<LANG>Information.cmake and other logic to assume the full path to the compiler tool is available. The Makefile generators already rejected CMAKE_<LANG>_COMPILER values that did not name an existing compiler. Extend this error message to all generators, make it occur as early as possible, and improve the message with advice about how to set the compiler. If the full path to the compiler is not known, finish enabling languages with a fatal error so configuration does not continue. For now, allow the RC language compiler to not be a full path. Later we will need to detect the full path to "rc" under the VS IDE. Add a RunCMake.CompilerNotFound test to cover failure cases. Fix the RunCMake.CompilerChange test EmptyCompiler case to work when configuration does not continue past enable_language.
* VS: Replace ArchitectureId with PlatformNamePatrick Gansterer2013-08-051-1/+0
| | | | | | | | Since we do not need the information about the target architecture we can use the PlatformName only to specify the this information. This also removes setting of the MSVC_*_ARCHITECTURE_ID variable which is not required, because this variable gets set by the compiler detection code in CMAKE_DETERMINE_COMPILER_ID_CHECK().
* VS: Support setting correct subsystem and entry point for WinCEPatrick Gansterer2012-11-261-0/+3
| | | | | WinCE has only one SubSystem. So the WIN32_EXECUTABLE property must be handled via the EntryPointSymbol in the vcproj files.
* VS: Change variable type of ArchitectureId from const char* to stringPatrick Gansterer2012-11-261-1/+1
|
* VS: Add static method to get the base of the registryPatrick Gansterer2012-11-261-0/+3
|
* VS: Remove AddPlatformDefinitions from platform-specific generatorsPatrick Gansterer2012-11-191-0/+1
| | | | | Move the logic for handling platform specific defines from the subclasses into the cmGlobalVisualStudioGenerator base class.
* VS: Simplify MSVC version reportingBrad King2012-08-301-1/+0
| | | | | | | | | Teach Windows-cl.cmake to use CMAKE_(C|CXX)_COMPILER_VERSION to set the "MSVC##" and MSVC_VERSION variables. It no longer needs the IDE generator to dictate the version or to detect the version by running the command-line tool for NMake and Ninja generators. Drop configuration of CMakeCPlatform.cmake and CMakeCXXPlatform.cmake from Windows-cl.cmake.in because all the results it saved are now cheap to compute every time.
* VS: Cleanup AddPlatformDefinitions() of Visual Studio generatorsPatrick Gansterer2012-08-221-0/+5
| | | | | Move adding of definitions into cmGlobalVisualStudioGenerator to share code and avoid duplicate architecture string literals.
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-1/+1
| | | | | | | | | | | | | | | | | 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/ \+$//'
* Pre-compute object file names before VS project generationBrad King2012-03-091-0/+2
| | | | | | Implement cmGlobalGenerator::ComputeTargetObjects in the VS generator to pre-compute all the object file names. Use the results during generation instead of re-computing it later.
* Use modern global dependency graph for VS < 8 depsBrad King2010-11-181-5/+20
| | | | | | | | | | | | | | | VS 7.1 and below have 2 behaviors that make the cmComputeTargetDepends result difficult to use for solution-level dependencies. Update the method cmGlobalVisualStudioGenerator::ComputeTargetDepends to document the behaviors and work around them. Commit 1a0c166a (Store direct dependencies in solutions for VS >= 8, 2010-08-20) isolated VS >= 8 from this computation so those versions should be unaffected. This change removes the last use of cmTarget::GetLinkLibraries for purposes other than backward compatibility with legacy interfaces (export_library_dependencies, VS 6 custom .dsp templates). Now the cmComputeTargetDepends results are used for all generators so global target dependency computation is fully centralized.
* VS10: Order .vcxproj dependencies deterministically (#10502)Brad King2010-10-071-8/+8
| | | | | This avoids needless modification of the project files during regeneration.
* Refactor VS <= 7.1 utility-depends workaroundBrad King2010-08-241-9/+5
| | | | | | | | | | | | | | | | | | Commit 438a7e2f (Fix utility dependencies for static libraries in VS generators, 2007-04-04) implemented utility-only dependencies between linkable targets by introducing an intermediate non-linkable target. We convert a dependency of the form foo -> bar to the form foo -> bar_UTILITY -> bar to prevent foo from including bar on its link line. Previously we added the extra "_UTILITY" targets explicitly among the project targets before dependency analysis was performed. Now we generate them separately at the last moment so that cmGlobalGenerator need not be aware of them.
* Factor out duplicate VS target dependency codeBrad King2010-08-241-0/+5
| | | | | | Compute VS target dependencies in cmGlobalVisualStudioGenerator when the main global dependency analysis is done. Use these results in each of the VS generators instead of duplicating the analysis.
* Fix issue #2336 - honor the -C arg to ctest. Honor it for all stages of ↵David Cole2009-12-041-0/+5
| | | | running -D dashboards from the command line and running ctest_configure, ctest_build and ctest_test commands in -S scripts. Also, allow a script to change it by setting the CTEST_CONFIGURATION_TYPE variable: allows for multiple configuration build/test cycles within one script. Add a new signature for the cmake command build_command that accepts CONFIGURATION as one argument. The original build_command signature is still there, but now marked as deprecated in the documentation. Of course... also add CTestConfig tests to verify that -C is honored for -D dashboards and -S scripts.
* Do not link library dependencies in VS solutionsBrad King2009-10-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | In VS 8 and greater this commit implements add_dependencies(myexe mylib) # depend without linking by adding the LinkLibraryDependencies="false" option to project files. Previously the above code would cause myexe to link to mylib in VS 8 and greater. This option prevents dependencies specified only in the solution from being linked. We already specify the real link library dependencies in the project files, and any project depending on this to link would not have worked in Makefile generators. We were already avoiding this problem in VS 7.1 and below by inserting intermediate mylib_UTILITY targets. It was more important for those versions because if a static library depended on another library the librarian would copy the dependees into the depender! This is no longer the case with VS 8 and above so we do not need that workaround. See issue #9732.
* Add alternative _UTILITY targets to all solutionsBrad King2009-10-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In VS 6, 7, and 7.1 solutions we implement add_dependencies(myexe mylib) # depend without linking by creating an intermediate mylib_UTILITY target with dependencies myexe -> mylib_UTILITY -> mylib to avoid linking myexe to mylib. Previously these extra targets were only added to the solution files in an ancestor directory of that defining mylib. For example, in the project: # CMakeLists.txt project(TOP) add_subdirectory(A) add_subdirectory(b) # A/CMakeLists.txt add_library(mylib ...) # B/CMakeLists.txt project(B) add_executable(myexe ...) add_dependencies(myexe mylib) the solution for TOP would have mylib_UTILITY but the solution for B would not even though it pulls in mylib through the dependency. This commit fixes solutions generated in other directories so that any solution that has mylib will get mylib_UTILITY also. See issue #9568.