Setting compiler options

Krzysztof kj at limes.com.pl
Fri Nov 18 20:54:22 GMT 2011


On 11/17/2011 11:40 PM, Andreas Pakulat wrote:
> 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
Of course, I compile in debug mode.
Isn't there any other way to set compiler or linker options just in 
kdevelop?
That'd be no problem if I had to edit simply CMakeLists.txt. I see 
though that I cannot set all this way.

-- 
Regards
Krzysztof J.






More information about the KDevelop mailing list