Fix Clang build
|Status:||Closed||Start date:||04 Aug 2018|
|Assignee:||Robin Mills||% Done:|
|Category:||build||Estimated time:||1.00 hour|
Clang does not admit -std=gnu++98 for C, as it is a C++ flag, thus it fails with error despite gcc and other seems to accept it even in C mode.
The fix is pretty simple, by using CMAKE_C_FLAGS instead of ADD_DEFINITIONS for setting that flag (also ADD_DEFINITIONS is not supposed to use for other kind of flags which are not -DXXXX).
#1 Updated by Robin Mills 6 months ago
- Category set to build
- Status changed from New to Assigned
- Assignee set to Robin Mills
- Target version set to 0.27
- % Done changed from 0 to 10
- Estimated time set to 2.00
Thanks for reporting this and providing the patch.
I'm very surprised by this because I use a Mac as my development machine on which the compiler is clang. I'll investigate your patch on Linux/clang and get back to you.
I'm on vacation at the moment and will do the work as time permits.