Make `-Wundefined-func-template` a no-op with `-std=c++98`
<p>I am trying to maintain a large C++ toolkit: GDCM. The core library is compatible with C++11, but one component (CharLS) is a C++98 only library.</p>

<p>How can I use CMake (monolithic project) so that C++ flags from the toplevel project are not passed down to C++98 only library.</p>

<p>For instance a user may want to exercise the library using clang-3.9 new option: <code>-Wundefined-func-template</code>, however this flag should not propagate down to the CharLS compilation line.</p>

<p>I've used an naive fix (<a href="https://github.com/malaterre/GDCM/commit/d76479747c2d80a9af55cfbdbd4a9a18925d14b5" rel="nofollow noreferrer">here</a>), but I (<a href="https://github.com/team-charls/charls/pull/23" rel="nofollow noreferrer">actually upstream too</a>) would rather keep CharLS a C++98 (only!) library and not stuff in a <a href="https://isocpp.org/wiki/faq/cpp11-language-templates#extern-templates" rel="nofollow noreferrer">C++11 construct</a>.</p>

<p>How one would do that since <code>-Wundefined-func-template</code> is not deactivated when used in combination with <code>-std=c++98</code>.</p>