[cmake-developers] Specifying a VS installation path explicitly
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.a...@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) -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Specifying a VS installation path explicitly
On 10/27/2015 10:38 AM, Johannes Asal wrote: > it depends on environment variables as well. Could you point me to > where that logic is implemented in the source code or the CMake modules? Please create a build tree under the environment in question and send me (off list) a .zip file of what CMake puts in the build tree. Just use a simple CMakeLists.txt file like cmake_minimum_required(VERSION 3.3) project(TestVS C) Thanks, -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Specifying a VS installation path explicitly
A simple source tree grep for "HKEY" (or even just "HK") will point you to all the places CMake has registry key references in its source code... On Tue, Oct 27, 2015 at 10:38 AM, Johannes Asalwrote: > If it was actually using registry entries only for locating the VS > installations it would be perfectly fine with me. But my observations > indicate that it depends on environment variables as well. Could you point > me to where that logic is implemented in the source code or the CMake > modules? > > 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 | johannes.a...@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) > -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/cmake-developers > -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Specifying a VS installation path explicitly
If it was actually using registry entries only for locating the VS installations it would be perfectly fine with me. But my observations indicate that it depends on environment variables as well. Could you point me to where that logic is implemented in the source code or the CMake modules? 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.a...@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) -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Specifying a VS installation path explicitly
On 10/27/2015 04:14 AM, Johannes Asal wrote: > How do I tell CMake to use a Visual Studio installed in a specific path? IIRC CMake uses Windows Registry entries to locate VS components. I do not think we have any way to customize this. -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers