On Friday 17 April 2009, christophe laferriere wrote:
> Hi all,
>
> 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()).There are at least two ways: either set the environment variables CFLAGS and CPPFLAGS before running cmake initially, AFAIK cmake will pick them up then. or set the cmake variables CMAKE_C_FLAGS and CMAKE_CXX__FLAGS in your cmake files. Alex _______________________________________________ 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
