[Cmake] Defining a variable for the compiler in one directory only

Peter Vanroose Peter . Vanroose at esat . kuleuven . ac . be
Sat, 20 Sep 2003 13:46:05 +0200 (CEST)


> The second, more urgent request is, what command(s) should
> I best put in my CMakeLists.txt file(s) so that FOO will
> be defined for the files compiled by foo.dsp and NOT
> defined for the files compiled by bar.dsp?

The simplest solution in your case is probably

  ADD_DEFINITIONS(-DBAR -UFOO)

(And hopefully, CMake places "-UFOO" after "-DFOO" on the compile line...)


--	Peter Vanroose.