[CMake] Correct way to add definitions

Brandon Van Every bvanevery at gmail.com
Fri Nov 16 18:28:25 EST 2007


On Nov 16, 2007 6:17 PM, Mike Jackson <imikejackson at gmail.com> wrote:
>
> (turning slightly red.. ) .. I did not thing to look for
> REMOVE_DEFINITIONS and I did not understand the sequence really DOES
> matter in a cmake file.

The docs are not currently organized by subject matter, so don't feel
bad.  You simply have to read through the docs enough times that you
actually run into the commands, thus jogging your memory for future
needs.  Some things simply aren't documented, like variable
propagation behavior.  They're learned easily enough by experience,
and the behavior isn't weird, but you do have to learn it by osmosis.
The good news is that the docs for CMake 2.6 will be more structured
and more complete.  I still think there's going to be a strong need
for "Chapter oriented" information though.  I hope the new version of
the "Mastering CMake" provides that for people.  I've never read those
books, I learned CMake entirely through the internet hacker approach.
With the mailing list as a resource, that is entirely possible, if you
have a strong enough motivation.  In my case, I had a project driving
my learning curve.

Part of the reason I answer people's questions, even if they may at
times tend towards basic issues, is to keep myself "in shape" for
things I'm going to need to do at a later time.  Conversely, I don't
tend to bother with problems I think I'm unlikely to run into anytime
soon.


Cheers,
Brandon Van Every


More information about the CMake mailing list