[Cmake] Defining a variable for the compiler in one directory
only
Brad King
brad . king at kitware . com
Tue, 23 Sep 2003 10:19:39 -0400 (EDT)
> So the answer seems to be that the feature I want is in CMake, I just
> don't have any control over how the defined macro will be spelled. It
> would be nice to have that extra bit of control, but at least I can
> compile and run my code.
The control is there in CMake 1.8. You can set a target property on the
library called "DEFINE_SYMBOL":
SET_TARGET_PROPERTIES(mylib
PROPERTIES DEFINE_SYMBOL MY_EXPORTS
)
Read the help for more details:
cmake --help SET_TARGET_PROPERTIES
-Brad