[CMake] cmakesetup.exe

Nikita V. Borodikhin nikita at pictures.uniqueics.com.ru
Fri May 18 10:27:57 EDT 2007


Hello, gga!

>> 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.
> 
> ...
> 
> 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.

Hmmm. You can try this by setting CC, CXX and other environment vars but
CMake can use compiler-specific settings, sh/cmd commands.

> 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++.

Environment vars

> 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).

I have'n such a problems compiling my project with several directories
but I think it is generally good idea to not use subdir specification
in makefiles or cmake because separator is not portable.

> That's why I would rather use cygwin's make instead, but have the
> makefile create rules for the visual C toolchain, not gcc.
> 
> Is there any way to make this work?  I was hoping porting a cmake
> project would be trivial, but this is starting to be painful.

I've never tried to use CMake under cygwin :(

-- 
Nikita V. Borodikhin, NIKB-RIPN BNV7-RIPE
Registered Linux user #256562 with the Linux Counter
uniqueics.com.ru


More information about the CMake mailing list