Setting compiler options

Andreas Pakulat apaku at gmx.de
Thu Nov 17 22:40:21 GMT 2011


On 17.11.11 22:27:20, Krzysztof wrote:
> Please, forget my previous post. It's just blind searching.
> I'd like to have the ability to set compiler options before building
> an application. Where should I do it?
> Setting e.g. this variable in CMakeLists.txt has no effect:
> set(CMAKE_CXX_FLAGS_DEBUG "-Wall")

Well, it only has an effect if you're running cmake with build type
Debug and in addition CMAKE_CXX_FLAGS_DEBUG is not put into the cache
before that line. If it is what you probably want is edit the cmake
cache or pass that on the CLI: cmake -DCMAKE_CXX_FLAGS_DEBUG='-Wall'.

Andreas





More information about the KDevelop mailing list