[geany/geany] 3d0bdb: waf: The GEANY_*_SYMBOL flags also need to be defined for C++

Enrico Tröger git-noreply at xxxxx
Fri Apr 10 14:15:58 UTC 2015

Branch:      refs/heads/master
Author:      Enrico Tröger <enrico.troeger at uvena.de>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Fri, 10 Apr 2015 14:15:58 UTC
Commit:      3d0bdbd6da48ea2000aff937b34baec57f98bb2b

Log Message:
waf: The GEANY_*_SYMBOL flags also need to be defined for C++

In Waf, we need to add the new flags to CFLAGS *and* CXXFLAGS otherwise
the Scintilla build would break.
To keep it more reabable, we first populate a temporary list
geany_symbol_flags which is then added to CFLAGS and CXXFLAGS.

Concerning the quote FIXME: no further qoting is necessary here.

Modified Paths:

Modified: wscript
13 lines changed, 7 insertions(+), 6 deletions(-)
@@ -308,17 +308,18 @@ but you then may not have a local copy of the HTML manual.'''
     conf.write_config_header('config.h', remove=False)
-    # FIXME: should I put quoting in the appended values or are they passed as-is?
     if is_win32:
-        conf.env.append_value('CFLAGS', ['-DGEANY_EXPORT_SYMBOL=__declspec(dllexport)'])
+        geany_symbol_flags = ['-DGEANY_EXPORT_SYMBOL=__declspec(dllexport)']
     # FIXME: check for -fvisibility and the __attribute__((visibility)), or
     #        at least for GCC >= 4
     elif conf.env['CC_NAME'] == 'gcc':
-        conf.env.append_value('CFLAGS', ['-fvisibility=hidden',
-                                         '-DGEANY_EXPORT_SYMBOL=__attribute__((visibility("default")))'])
+        geany_symbol_flags = ['-fvisibility=hidden',
+                              '-DGEANY_EXPORT_SYMBOL=__attribute__((visibility("default")))']
     else:  # unknown, define to nothing
-        conf.env.append_value('CFLAGS', ['-DGEANY_EXPORT_SYMBOL='])
-    conf.env.append_value('CFLAGS', ['-DGEANY_API_SYMBOL=GEANY_EXPORT_SYMBOL'])
+        geany_symbol_flags = ['-DGEANY_EXPORT_SYMBOL=']
+    geany_symbol_flags.append('-DGEANY_API_SYMBOL=GEANY_EXPORT_SYMBOL')
+    conf.env.append_value('CFLAGS', geany_symbol_flags)
+    conf.env.append_value('CXXFLAGS', geany_symbol_flags)
     # some more compiler flags
     conf.env.append_value('CFLAGS', ['-DHAVE_CONFIG_H'])

This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).

More information about the Commits mailing list