[CMake] ExternalProject BUILD_COMMAND and Visual Studio Express 2010

Macumber, Daniel Daniel.Macumber at nrel.gov
Sat Nov 23 10:54:24 EST 2013


Thanks Magnus, is there a reliable way to get the path to vcvarsall.bat that will work for various versions of Visual Studio (express or not)?

Dan







On Fri, Nov 22, 2013 at 08:49:07PM -0700, Macumber, Daniel wrote:

> Our project is using ExternalProject_Add to build Ruby.  Our

> BUILD_COMMAND on Windows is "cd

> ${CMAKE_BINARY_DIR}/Ruby-prefix/src/Ruby-build && nmake".  This

> works using the professional versions of Visual Studio.  However,

> using Visual Studio Express 2010 I get an error that nmake is not a

> known program.  Nmake is not in my system path but is found when

> running the Visual Studio command prompt.  How can I get the

> ExternalProject build command to use the correct environment?

> Should I put a call to vcvarsall.bat in the command line?  Is there

> a CMake variable that has the path to that?



I would expect that you need to put the folder where nmake.exe lives

in the %PATH%, the easiest way of achieving that is probably to use

vcvarsall.bat.



/M



--

Magnus Therning                      OpenPGP: 0xAB4DFBA4

email: magnus at therning.org<http://www.cmake.org/mailman/listinfo/cmake>   jabber: magnus at therning.org<http://www.cmake.org/mailman/listinfo/cmake>

twitter: magthe               http://therning.org/magnus



You do not examine legislation in the light of the benefits it will

convey if properly administered, but in the light of the wrongs it

would do and the harms it would cause if improperly administered.

     -- Lyndon Johnson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20131123/2d90e3e1/attachment-0001.htm>


More information about the CMake mailing list