Visual studio express 2012 and cmake

I'm looking for a way to compile some libraries ready to use via cmake, the problem is that I would like to use VC ++ express 2012 (the first express version for x64 resolution), but when I run cmake I keep getting the following:

CMake Error: CMake was unable to find a build program corresponding to "Visual Studio 11". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: Could not find cmake module file:C:/Users/Alexander Rojas/workspace/jthread-1.3.1/build/CMakeFiles/CMakeCCompiler.cmake CMake Error: Could not find cmake module file:C:/Users/Alexander Rojas/workspace/jthread-1.3.1/build/CMakeFiles/CMakeCXXCompiler.cmake Configuring incomplete, errors occurred! 

I found that this path is the path to devenv.exe, but this new vc does not have this program. Any ideas for a workaround?

+4
source share
5 answers

So, in the CMakeVS11FindMake.cmake file CMakeVS11FindMake.cmake I had to change all the links in the registry key

 HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0 

to the key

 HKEY_CURRENT_USER\\Software\\Microsoft\\WDExpress\\11.0_Config 

(just adding them as an extra hint will work)

+8
source

Visual Studio 2012 Express Edition is currently not supported in any released version of CMake (2.8.9). However, CMake developers are only checking in code today to fix the problem . The fix should be in CMake 2.8.10 whenever it was released.

If you really need it before, you can grab the CMake night installer , but you may need a path to install the 20120919 installers sent since I'm not sure if this fix was made in the 20120918 installers.

(To check this today, I checked the source code from my git repository , switched to the "next" branch, configured with the old CMake, created a new CMake for myself and confirmed that it works fine with VS 2012 Express.)

+5
source

I still needed to apply the Sambatyon patch above to CMakeVS11FindMake.cmake, and I'm using CMake 2.8.10.2.

+2
source

Other solutions no longer work; with the latter (express-2012 for the desktop from the moment of writing) you may need to change:

 C:\Program Files (x86)\CMake 2.8\share\cmake-2.8\Modules\CMakeVS12FindMake.cmake 

To read something like:

 #============================================================================= # Copyright 2007-2013 Kitware, Inc. # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file Copyright.txt for details. # # This software is distributed WITHOUT ANY WARRANTY; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the License for more information. #============================================================================= # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) # Always use MSBuild because: # - devenv treats command-line builds as recently-loaded projects in the IDE # - devenv does not appear to support non-standard platform toolsets # If we need devenv for Intel Fortran in the future we should add # a special case when Fortran is enabled. find_program(CMAKE_MAKE_PROGRAM NAMES MSBuild HINTS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\4.0;MSBuildToolsPath]" <--- Change this line. ) message("Found: ${CMAKE_MAKE_PROGRAM}") mark_as_advanced(CMAKE_MAKE_PROGRAM) set(MSVC12 1) set(MSVC_VERSION 1800) 

This is for cmake 2.8.11.2

Edit: note that this applies to the VS2012 package, not the candidate for the release of VS2013 or the future version of VS2013, where the correct ToolsVersions is \ 12.0

0
source

My job: generate “Reload All” in VS2012 in 2010, and then “Update VC ++ projects” in the solution in the solution explorer.

However: My installation includes active VS 2010, expired test of VS 2012, active VS 2012 Express.

-1
source

Source: https://habr.com/ru/post/1434330/


All Articles