[CMake] cmakesetup.exe
Bill Hoffman
bill.hoffman at kitware.com
Fri May 18 11:56:39 EDT 2007
gga wrote:
> Bill Hoffman wrote:
>
>
>> Can you send a small example that does not work with nmake?
>>
>>
>
> Not too small, I'm afraid. Is it okay to post a zip to the list? Or
> to send you one?
>
>
You can send me something off the list.
> I think I'm running into 2 or 3 issues, from what I can tell from the
> verbose logs. Here's what I have:
>
> Under NMake Makefiles (run from cmd.exe):
>
> - Linking fails on executable due to not finding WinMain, on even the
> simplest exe. Unfortunately, VERBOSE=1 does not print the flags, but
> just a @%TMPDIR/ns.tmp file, which gets removed at the end, so I don't
> know what flags it is passing.
>
That is not a cmake problem, that is a problem with your code. You have
specified a WIN32 executable
when you do not have one.
> - Linking is using the incorrect debug dll.
>
>
nothing to do with nmake or not.
> - Many rules don't work, including make clean which fails with syntax
> error, due to illegal character '/' in macro. This happens only when I
> have rules such as subdir/file, which work fine on unix. So far, using
> rules such as this is the only way I found cmake to create proper
> out-of-source builds for nested projects.
>
>
Are these custom commands? Or is cmake generating invalid commands?
> Under Unix Makefiles (run from cygwin bash):
>
> - If creating a Unix Makefile with CXX and LD set to cl.exe and lib.exe,
> during the cmake steps, cmake complains about endianess not detected
> properly.
>
>
LD should not need to be set.
CXX=cl
CC=cl
CMakeSetup
> - cl.exe obj files are incorrectly created with .o suffix.
>
>
Should not happen if you do CXX=cl and CC=cl
> - Many rules don't work, including "make clean", where it complains with:
> target pattern contains no "%". Stop.
>
>
I would have to see the CMakeLists.txt that caused this problem.
> Same thing on Linux works flawlessly, btw.
>
Sounds like some non-portable custom commands are in the project.
-Bill
More information about the CMake
mailing list