[CMake] cmakesetup.exe

Bill Hoffman bill.hoffman at kitware.com
Fri May 18 08:35:56 EDT 2007


gga wrote:
> Nikita V. Borodikhin wrote:
>   
>> Hello, Gonzalo!
>>
>> I don't think using MSVC programs in GNU Makefile is a very good idea
>> because they (linker in paticular) are not GNU-compatible by flags and
>> arguments.
>>
>>     
>
> Thanks for the help.  Still struggling, thou, due to nmake's crappy system.
>
> Sorry, also, as  I was not clear.
>
> I would like to run microsoft's CL.exe, LIB.exe, etc. tools, but from
> within a Unix GNU Makefile.  A makefile is just a makefile, so the rules
> can be anything.
>
>   
I use gmake/msvc all the time with cmake.   You just need to have CXX 
and CC environment variables set
correctly BEFORE you run CMakeSetup.  Also if you are using cygwin, you 
will need to get this
make:

http://www.cmake.org/files/cygwin/make.exe

The cygwin make can not currently handle windows paths.   The above one 
is a cygwin built
gmake that will handle the paths required by msvc.
> Currently, if I select cmake -G "Unix Makefiles", the makefile generated
> uses gcc.  While if I use -G "NMake Makefiles", I get an nmake Makefile
> compatible with VisualC++.
>
> nmake is just such a poor make system compared to the GNU tools that it
> makes little sense using it.  In the project I'm porting, it just dies,
> as it seems it cannot take rules such as "mydirectory/myfile" (my
> project is made of several subprojects).
>
>   
That should work, there are dashboards for CMake that use nmake and run 
every test CMake has, so
something else is wrong with your setup.   Can you send a small example 
that does not work with nmake?

-Bill




More information about the CMake mailing list