Commit Graph

73 Commits

Author SHA1 Message Date
Patrick Gansterer 28e770cf6e VS10: Add support for assembler code (#11536)
Use the masm BuildCustomizations, which are part of the Visual
Studio installation to allow compilation of asm files.
2013-08-05 16:34:10 +02:00
Patrick Gansterer b02f09d434 VS: Replace ArchitectureId with PlatformName
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().
2013-08-05 13:38:26 +02:00
Petr Kmoch de8be9ef7d Add projectDir parameter to GenerateBuildCommand
Extend the cmGlobalGenerator::GenerateBuildCommand virtual method
signature with a "projectDir" parameter specifying the top of the
project build tree for which the build command will be generated.
Populate it from call sites in cmGlobalGenerator::Build where a
fully-generated build tree should be available.
2013-04-12 11:35:35 -04:00
Brad King 650c647160 VS: Implement generator toolset selection (#10722, #13774)
Implement generator toolset selection (cmake -T) for VS >= 10 by setting
the PlatformToolset.  Extend the RunCMake.GeneratorToolset test case to
verify CMAKE_GENERATOR_TOOLSET when the generator supports -T.

Since commit 485a940e (VS: Simplify MSVC version reporting, 2012-08-23)
all MSVC version information is detected during the compiler id step
from the actual compiler invoked by generated build systems rather than
hard-coded in VS generators.  Therefore we can set the PlatformToolset
in VS >= 10 project files and support toolsets from other VS versions.
2013-02-07 11:06:28 -05:00
Patrick Gansterer 75ebebc39c VS: Remove platform specific generator files
Move the whole logic into the base class and the factory.
2012-11-19 14:56:29 -05:00
Patrick Gansterer 5170a8800f Make cmGlobalGenerator::GetDocumentation() a static function
Making the function static allows us to call it directly,
without creating and removing an instance of the generator.
2012-11-19 12:54:50 -05:00
Patrick Gansterer e8f841473b Introduce the abstract class cmGlobalGeneratorFactory
This new abstract class allows us move some logic from the
cmGlobalGenerator into its own layer in a next step.
2012-11-19 12:54:30 -05:00
Brad King 89595d6bce VS10: Define CMAKE_VS_PLATFORM_TOOLSET variable
When the VS 10 generator selects a non-default PlatformToolset to
specify for MSBuild, report the selected name in this variable.
2012-08-22 16:35:46 -04:00
Patrick Gansterer 2c7a451de0 VS: Cleanup AddPlatformDefinitions() of Visual Studio generators
Move adding of definitions into cmGlobalVisualStudioGenerator to
share code and avoid duplicate architecture string literals.
2012-08-22 15:08:40 -04:00
Kitware Robot 7bbaa4283d Remove trailing whitespace from most CMake and C/C++ code
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/ \+$//'
2012-08-13 14:18:39 -04:00
Peter Kuemmel a0700ba26c VC Express doesn't support folders, ignore USE_FOLDER property 2012-06-02 19:58:03 +02:00
Brad King d931ce9fe0 VS10: Generate relative source paths when possible (#12570)
Since commit ed0075bd (Use relative paths for custom command inputs,
2011-06-22) CMake generates full paths to source files in VS 10 project
files to avoid trouble with deep source/build tree paths.  However, the VS
10 IDE will not populate the source file property dialog for a file
referenced by full path.  Instead use a relative path when possible.  When
not possible produce a detailed warning explaining the problem and
suggesting use of shorter directory paths.
2012-04-27 14:14:36 -04:00
Brad King 72333a4648 VS10: Avoid creating .rule files next to outputs (#13141)
Hide custom command .rule files inside the CMakeFiles directory.  Ensure
a short, deterministic, and unique name by using a hash of the directory
path containing the output file.  Preserve the file name so the entry in
the IDE is human-readable.  Clarify the comment that explains why the
rule file must be created on disk.
2012-04-18 15:54:35 -04:00
Brad King 9c0a00d6dd Rename/constify build-time config placeholder lookup
Rename cmGlobalGenerator::GetCMakeCFG{InitDirectory => IntDir} to
have a shorter name without a typo.  Add a 'const' qualifier since
the method is only for lookup and never needs to modify anything.
2012-03-09 15:16:03 -05:00
Brad King 3d5632ed59 Add Visual Studio 11 generator for x86 and x64 tools 2011-09-23 10:10:01 -04:00
Matej Hribernik d44c68f39e VS: Factor Find64BitTools out of Win64 generator to parent
It will be shared with a forthcoming IA64 generator.
2011-06-20 08:29:40 -04:00
Brad King fb97ba6293 Enable 64-bit tools with VS 2010 Express (#9981, #10722)
The Express Edition does not come with 64-bit tools, but one can install
the "Microsoft Windows SDK v7.1" to get them.  Detect this case and
check for the SDK.  If found, set PlatformToolset to use the SDK tools.
Otherwise, fail with a concise and informative error.
2010-12-01 12:48:32 -05:00
Brad King c7b0dbb3fc Fix VS 10 value of CMAKE_CFG_INTDIR
VS 10 provides $(Configuration) and $(ConfigurationName) but only the
former is documented so we prefer it.  This also makes CMAKE_CFG_INTDIR
consistent with its documentation.  See issue #9916.
2009-11-18 15:50:29 -05:00
Brad King 96afb12087 Convert CMake to OSI-approved BSD License
This converts the CMake license to a pure 3-clause OSI-approved BSD
License.  We drop the previous license clause requiring modified
versions to be plainly marked.  We also update the CMake copyright to
cover the full development time range.
2009-09-28 11:43:28 -04:00
Brad King 09e398fa9f Create VS generator GetRegistryBase method
This method returns the registry key

  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\<version>

A protected GetIDEVersion method retrieves the version-specific part of
the key name.
2009-09-16 11:44:08 -04:00
Bill Hoffman 5c4208f50e ENH: only 5 failing tests for VS 10 2009-07-10 09:12:39 -04:00
Bill Hoffman 798024bebf ENH: fix line length issues 2009-06-26 11:50:09 -04:00
Bill Hoffman 7491f52992 ENH: first pass at VS 10, can bootstrap CMake, but many tests still fail 2009-06-25 16:41:57 -04:00