[cmake-developers] Specifying a VS installation path explicitly

Johannes Asal Johannes.Asal at sick.de
Tue Oct 27 04:14:23 EDT 2015


Hi, 

I am trying to build a project using CMake and the VS 2010 generator on a 
buildserver running Jenkins. I want to clear all environment variables on 
the node to make sure that noone can influence builds by installing new 
software and thereby accidentally modifying the environment on the node. 
The problem is that CMake is unable to find Visual Studio (compiler id 
unknown) once I do that. I tried to find out which environment variables 
are needed to make it work but I gave up after 6 hours. There are too many 
and it doesn't make any sense to me why some of them are needed. 

My question is: How do I tell CMake to use a Visual Studio installed in a 
specific path? I know where it is installed on the buildserver so I just 
want to use that path instead of the complicated search routine which has 
so many environment dependencies. I tried setting CMAKE_MAKE_PROGRAM to 
the full MSBuild path but it didn't work. A Google search did not yield 
any results. 

Thanks a lot. 
- Johannes
Mit freundlichen Grüßen / Best regards

Johannes Asal
Entwicklungsingenieur Software | Identification & Measuring
Research & Development

SICK AG | Nimburger Str. 11 | 79276 Reute | Germany
Phone  +49 7641 469-1460 | Fax  | mailto:Johannes.Asal at sick.de | http://www.sick.de

SICK AG  |  Sitz: Waldkirch i. Br.  |  Handelsregister: Freiburg i. Br. HRB 
280355 
Vorstand: Dr. Robert Bauer (Vorsitzender)  |  Reinhard Bösl  |  Dr. Mats 
Gökstorp  |  Dr. Martin Krämer  |  Markus Vatter
Aufsichtsrat: Gisela Sick (Ehrenvorsitzende)  |  Klaus M. Bukenberger 
(Vorsitzender)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151027/1af2ff87/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 1370 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151027/1af2ff87/attachment.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 1370 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151027/1af2ff87/attachment-0001.jpe>


More information about the cmake-developers mailing list