[CMake] How to set different compiler flags for two projects in one solution

Tanguy Krotoff tkrotoff at gmail.com
Thu Oct 1 03:46:56 EDT 2009


On Wed, Sep 30, 2009 at 9:49 PM, Tyler Roscoe <tyler at cryptio.net> wrote:
> See the word "CACHE" in your example code? Why is it there?

oups, forgot about this one.
If the variable is not put in CACHE (so a simple set() without
arguments), then it does not work, even without the second part (the
"revert" part)

> Given that your first change works but your second change doesn't, I
> suspect that the fact that you're trying to set these variables in the
> cache -- as opposed to just setting local variables -- is causing you
> problems. You don't need to use the cache to manipulate CMAKE_C_FLAGS,
> so I'm not sure why you would do so.

-- 
Tanguy Krotoff <tkrotoff at gmail.com>
+33 6 68 42 70 24


More information about the CMake mailing list