[CMake] preprocessor definitions seem to fail... (Visual Studio)

Maik Keller atracks at gmx.de
Thu Aug 23 11:02:12 EDT 2007


-------- Original --------
> Datum: Thu, 23 Aug 2007 10:17:32 -0400
> Von: Bill Hoffman <bill.hoffman at kitware.com>
> An: James Bigler <bigler at cs.utah.edu>
> CC: Maik Keller <atracks at gmx.de>, cmake at cmake.org
> Betreff: Re: [CMake] preprocessor definitions seem to fail... (Visual Studio)
> >
> > I usually use ADD_DEFINITIONS(-DVCC).  I'm not sure if Visual Studio 
> > understands -D defines, but try this.
> -D works, and CMake will find the -D stuff and convert it to the correct 
> settings in a vcproj file when creating vs ide projects.
> (BTW, -D has worked for every c/C++ compiler I have ever seen...)
> 
> -Bill


Thank you guys - it works perfectly, that is exactly what I was looking for. I was just confused by using SET_TARGET_PROPERTIES( ... DEFINE_SYMBOL / COMPILE_FLAGS ...).

I have another question concerning Visual Studio and SET_TARGET_PROPERTIES. Is there a way to specify a working directory for a debugging session in Visual Studio?

I tried:

SET_TARGET_PROPERTIES(shortDemo PROPERTIES DEBUG_LOCATION "${GPDemos_SOURCE_DIR}/bin")

but it does not work.
I would like to debug/start my executable from within Visual Studio. I build the executable in a directory named project_root/bin. Unfortunately I am not able to start my application in the right way (all relative paths seem to be wrong) unless I have defined a proper working directory for Debug in Visual Studio project settings.

Thank you so much,
Mick



-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail


More information about the CMake mailing list