Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Tutorial for using NMake with CDT
Tutorial for using NMake with CDT [message #205242] Tue, 20 November 2007 04:46 Go to next message
Eclipse UserFriend
Is there any tutorial for using NMake with CDT? I use cmake to generate
the NMake files and I would love to be able to at least try a compile
from with in CDT. I know I can not debug my code, but I can generate
visual studio projects on demand for that when I need it.


Thanks
Mike Jackson
Re: Tutorial for using NMake with CDT [message #205267 is a reply to message #205242] Tue, 20 November 2007 17:04 Go to previous messageGo to next message
Eclipse UserFriend
Mike Jackson wrote:

> Is there any tutorial for using NMake with CDT? I use cmake to generate
> the NMake files and I would love to be able to at least try a compile
> from with in CDT.

At the project preferences change the build command from make to nmake.
I expect you to do out of source build. If so your top-level Makefile could
look like this
<Makefile>
CMAKE_FLAGS= -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug

all: build/CMakeCache.txt
cd build && $(MAKE)

clean:
cd build && $(MAKE) clean

build/CMakeCache.txt:
cd build && cmake $(CMAKE_FLAGS) ../
</Makefile>


Regards,
--Maik
Re: Tutorial for using NMake with CDT [message #205578 is a reply to message #205267] Tue, 27 November 2007 02:09 Go to previous messageGo to next message
Eclipse UserFriend
Did you succeed?

-- Maik
Re: Tutorial for using NMake with CDT [message #205589 is a reply to message #205578] Tue, 27 November 2007 09:26 Go to previous messageGo to next message
Eclipse UserFriend
On 2007-11-27 02:09:01 -0500, Maik Beckmann <maikbeckmann@gmx.de> said:

> Did you succeed?
>
> -- Maik

Nope. I do not want to add another unnecessary file to the project just
for eclipse. I believe there is probably a way to get Eclipse to run
nmake from another directory. I just do not know enough about Windows
to make that happen. (OS X and Linux are my primary Dev platforms)

Mike
Re: Tutorial for using NMake with CDT [message #205610 is a reply to message #205589] Tue, 27 November 2007 15:57 Go to previous message
Eclipse UserFriend
Mike Jackson wrote:
> Nope. I do not want to add another unnecessary file to the project just
> for eclipse. I believe there is probably a way to get Eclipse to run
> nmake from another directory. I just do not know enough about Windows
> to make that happen. (OS X and Linux are my primary Dev platforms)
>
> Mike

You don't have to add anything. Its IMHO just easier to trigger everything
via a toplevel makefile and is absoluteley unrelated to the editor/IDE.

You can do it without this toplevel makefile by using nmake -f
build/Makefile as build command, where you substitute "build" with the
directory name you ran cmake at.

Basically a eclipse "Makefile-Project" allows you to use any build command
(ant/jam/bjam/scons... myownbuildscript.sh). The reason why it is
called "Makefile-Project" is IMHO that the output error parser knows make.


Best,
-- Maik
Previous Topic:How to see help books in project Documentation
Next Topic:linked file missing in compilation.
Goto Forum:
  


Current Time: Fri May 16 06:39:19 EDT 2025

Powered by FUDForum. Page generated in 0.06202 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top