[CMake] Using the Microsoft compiler with "Unix Makefiles"

Michael Jackson mike.jackson at bluequartz.net
Tue Jun 19 06:49:24 EDT 2012


It can be done as Bill Hoffman seems to do this all the time. Let's wait to see what he says. I do know that it involves a lot of setup.
--
Mike Jackson <www.bluequartz.net>

On Jun 19, 2012, at 1:05 AM, William R. Otte wrote:

> Hi Brendan - 
> 
> On Jun 18, 2012, at 11:49 PM, Braden McDaniel wrote:
> 
>> Is it possible to use the Microsoft compiler (cl) with "Unix Makefiles"?
>> 
>> I found some older list postings that suggested it could work; however, setting CC, CXX, and CMAKE_CXX_COMPILER to "cl" doesn't do the trick. (It appears that the compiler doesn't like some of the flags used in the makefiles.)  Can this be made to work with modern CMake (2.8.7), or am I barking up the wrong tree?
> 
> Speaking not as a cmake expert (I am not), but as someone who has been involved with many cross platform projects:
> 
> If your goal is to compile from the command line, you have two options:  Either generate regular visual studio projects, then use devenv.exe to compile from the command line (http://msdn.microsoft.com/en-US/library/b20w810z(v=vs.80)) or use cmake to generate nmake makefiles, then you can compile using nmake.exe.
> 
> hth,
> /-Will
> 



More information about the CMake mailing list