Do not pass -DCMAKE_CXX_FLAGS to CMake if cxxflags is empty
AbandonedPublic

Authored by vkrause on Thu, Jan 10, 7:28 PM.

Details

Summary

This isn't really a problem on desktop, but when cross-compiling this can
interfere badly with the toolchain file. Specifically, this fixes building
modules relying on the ANDROID_API define.

I don't really know why cxxflags is ' ' when being empty, so there is
likely a cleaner/better way to fix this, but my Perl isn't good enough
for that.

Diff Detail

Repository
R365 kdesrc-build
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 6928
Build 6946: arc lint + arc unit
vkrause requested review of this revision.Thu, Jan 10, 7:28 PM
vkrause created this revision.
mpyne added a comment.Sat, Jan 12, 6:10 PM

I'll take a look and fix but if further review is needed may I invite you to the trial GitLab instance at https://invent.kde.org/kde/kdesrc-build/merge_requests ? (kdesrc-build is a participant in the trial).

modules/ksb/BuildSystem/KDE4.pm
173

You're right there's a better way, by adding a couple of lines to trip leading and trailing whitespace. I may have a utility function that does this already but if not it's probably time to add it.

mpyne added a comment.Sat, Jan 12, 8:59 PM

This bug should be fixed (at its precise source) in commit b01505bec941f06be52ca3ac88d9b6937e1f4c88.

vkrause abandoned this revision.Sat, Jan 12, 9:13 PM

Thanks! I can confirm your fix works :)