KF5 Update Meeting Minutes 2013-w31

Sune Vuorela nospam at vuorela.dk
Thu Aug 22 12:18:55 UTC 2013


On 2013-08-22, Kevin Ottens <ervin+bluesystems at kde.org> wrote:
>> There's cmake --warn-uninitialized: "Print a warning when an
>> uninitialized variable is used."
>
> Now that's interesting... Any way to control that from the CMakeLists.t=
> xt or=20
> to turn that into an error? (just wondering how far that can be pushed)=

pushing it too far can also be problematic.

I've at least over the years seen quite a bit of code doing like

find_package(foo); // or one of the more fancy wrappers 
find_package(baz); // or one of the more fancy wrappers 

if(${FOO_FOUND})
//add -DWITH_FOO

endif(${FOO_FOUND})

target_Link_libraries(bar ${FOO_LIBRARY} ${BAZ_LIBRARY});

for a optional foo and relying on the variables being empty to only have
one call to target_link_libraries.

/Sune



More information about the Kde-frameworks-devel mailing list