[CMake] Fwd: Visual Studio command line from CMake

J Decker d3ck0r at gmail.com
Thu Jan 9 14:51:22 EST 2014


But using BUILD_COMMAND() you can get the appropriate build command,
the full path ends up specified; it is determined duing the cmake
configuration phase and would be the same; hence the same script I
showed worked to build makeit.bat that runs Linux GCC Make, MinGW
Make, Watcom Make, Visual Studio XXXX msbuild or devenv as
appropriate.  NMake has been depricated....
you don't need vcvarsall after the initial configuration because all
tools and include/link paths are saved as full paths in the script.

On Thu, Jan 9, 2014 at 11:03 AM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
> On 1/9/2014 1:48 PM, Rob McDonald wrote:
>>
>> Correct, this is one of the concerns that makes it more complex than
>> just searching for the first vcvarsall.bat you come to.
>>
>> I'd like to match up the vcvarsall to the version of visual studio
>> currently in use by CMake.
>>
>> I think there are now enough pieces that I can write a CMake
>> 'FindVSEnvironment.cmake'.  While I can't test it for a large number of
>> MSVC versions, I'll post it and hopefully others can help out.
>
> Another interesting way to approach this would be to use external project,
> and use a Visual Studio IDE generator to build the nmake environment.   It
> is not cmake based, but I have done this with Qt and it works great.  When
> the IDE builds the external project the environment is all setup, and you
> can build from any command line or from a GUI with no environment set.
>
> -Bill
>
> --
>
> 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://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list