On Fri, Apr 17, 2009 at 11:31:52AM +0200, christophe laferriere wrote:
> I'm currently using add_definition("-Wall -std=c99 -pedantic") to have  
> CFLAGS sets, but I'm now adding some tests that uses the project  
> library I'm working on, and those tests are in C++. So I'm getting an  
> error about the -std=c99 flag which does not work for C++.
> 
> So my question is what is the best way to have both CFLAGS and  
> CPPFLAGS (apparently not using add_definition()).

You could move your c++ unittests to a CMakeLists that is different from
the CMakeLists for your c library. Not sure if there's a better
solution, but I would think you're going to run into other issues having
c and c++ code living together. This is just a guess though; I don't
have experience with such a setup.

tyler
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to