diff options
author | Thierry Crozat | 2017-08-18 11:22:42 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-08-19 11:08:14 +0200 |
commit | 8e31ffa2328bbbfa358530d231dfa5c140b3f15a (patch) | |
tree | c8ee30adfbf215527fc90cc4de7b9c252ea2b1c3 | |
parent | d9d325ac6c97cb53be64639cf5d6b8a2038c9d0f (diff) | |
download | scummvm-rg350-8e31ffa2328bbbfa358530d231dfa5c140b3f15a.tar.gz scummvm-rg350-8e31ffa2328bbbfa358530d231dfa5c140b3f15a.tar.bz2 scummvm-rg350-8e31ffa2328bbbfa358530d231dfa5c140b3f15a.zip |
CONFIGURE: Silence undefined-var-template warning
We get this warning a lot for the Singleton class due to the way
we instantiate its specializations. Also in case we forget the
instantiation we get a link error anyway, so the warning is not
very useful anyway.
-rwxr-xr-x | configure | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -164,6 +164,7 @@ _build_scalers=yes _build_hq_scalers=yes _enable_prof=no _global_constructors=no +_no_undefined_var_template=no _bink=yes _cloud=auto # Default vkeybd/keymapper/eventrec options @@ -2023,13 +2024,30 @@ echocheck "whether -Wglobal-constructors work" cat > $TMPC << EOF int main() { return 0; } EOF -cc_check -Wglobal-constructors && _global_constructors=yes +cc_check -Wglobal-constructors -Werror && _global_constructors=yes if test "$_global_constructors" = yes; then append_var CXXFLAGS "-Wglobal-constructors" fi echo $_global_constructors +# If the compiler supports the -Wundefined-var-template flag, silence that warning. +# We get this warning a lot with regard to the Singleton class as we explicitly +# instantiate each specialisation. An alternate way to deal with it would be to +# change the way we instantiate the singleton classes as done in PR #967. +# Note: we check the -Wundefined-var-template as gcc does not error out on unknown +# -Wno-xxx flags. +echocheck "whether -Wno-undefined-var-template work" +cat > $TMPC << EOF +int main() { return 0; } +EOF +cc_check -Wundefined-var-template -Werror && _no_undefined_var_template=yes + +if test "$_no_undefined_var_template" = yes; then + append_var CXXFLAGS "-Wno-undefined-var-template" +fi +echo $_no_undefined_var_template + echo_n "Checking for $_host_alias-strings... " >> "$TMPLOG" if `which $_host_alias-strings >/dev/null 2>&1`; then _strings=$_host_alias-strings |