diff options
author | Brad King <brad.king@kitware.com> | 2011-11-21 16:02:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2011-11-21 16:02:26 (GMT) |
commit | b421c2477c4c4f9d4c93997661f1698812cdae36 (patch) | |
tree | e2d05c99f35a138620bf15bcabe1dd86d5b7ffc3 | |
parent | ae7cf91b1376cc313dc39e41c7d3e2026ac79b6b (diff) | |
download | CMake-b421c2477c4c4f9d4c93997661f1698812cdae36.zip CMake-b421c2477c4c4f9d4c93997661f1698812cdae36.tar.gz CMake-b421c2477c4c4f9d4c93997661f1698812cdae36.tar.bz2 |
KWIML: Avoid MSVC linker warning about not using C++ runtime
Teach KWIML_test to use part of the C++ runtime library. Otherwise the
linker complains:
warning LNK4089: all references to 'MSVCP71.dll' discarded by /OPT:REF
-rw-r--r-- | test/test_include_CXX.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_include_CXX.cxx b/test/test_include_CXX.cxx index 057b7c2..111311a 100644 --- a/test/test_include_CXX.cxx +++ b/test/test_include_CXX.cxx @@ -11,6 +11,12 @@ ============================================================================*/ #include <string> +#if defined(_MSC_VER) && defined(NDEBUG) +// Use C++ runtime to avoid linker warning: +// warning LNK4089: all references to 'MSVCP71.dll' discarded by /OPT:REF +std::string test_include_CXX_use_stl_string; +#endif + /* Test KWIML header inclusion after above system headers. */ #include "test.h" #include KWIML_HEADER(ABI.h) |