2012/2/7 Sarnath K - ERS, HCLTech <[email protected]>:
> Hello Eric,
>
> We have a case where 2 teams are working on a common source tree.
> One team is using "Visual Studio 9 2008" and the other "Visual Studio 10"
> Our platform is Windows7 64-bit.
>
> We have a "tool" in our project that gets added as an "External Project" to 
> the main CMAKE project.
> This tool needs to be compiled _only_ as a 32-bit windows executable.
> I use a configure.bat to configure this external project and build.

You should have a look to "ExternalProject" cmake module and
its "ExternalProject_Add" macro.


> This batch-file has to invoke CMAKE with either Visual Studio 9 2008" or 
> "Visual Studio 10".
> But I would like this batch file to use the latest Visual Studio installed in 
> the system in 32-bit mode.
> I am on Win64 Command Prompt.
> The main project is generated using "NMake Makefiles".
> How do I do this?

My guess is that you should write some script or executable which does just that
"get the name of the latest Visual Studio installed in the system"
If you go for a script, may be a CMake script can do that.

May be you could parse the output of "cmake --help" in order to get
the list of supported generators and/or inspect registry yourself in
order to build
the appropriate name.


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to