diff --git a/CMakeLists.txt b/CMakeLists.txt index a08cc87c..c8b1c8dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,10 +35,15 @@ else() "-Wsign-conversion" "-Wsign-promo" "-Wstrict-null-sentinel" "-Wstrict-overflow=5" "-Wno-deprecated-declarations") # auto_ptr is OK for now. - elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND NOT LUABIND_NO_CXX11) - # I do not know (a) since when Clang supports this flags and (b) how to - # check Clang's version. Use LUABIND_NO_CXX11 manually if you need to. - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++") + elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") + add_definitions("-Weverything" "-Wno-shadow" "-Wno-undef" + "-Wno-global-constructors" "-Wno-weak-vtables" + "-Wno-padded" "-Wno-exit-time-destructors") + if (NOT LUABIND_NO_CXX11) + # I do not know (a) since when Clang supports this flags and (b) how to + # check Clang's version. Use LUABIND_NO_CXX11 manually if you need to. + add_definitions("-std=c++11" "-Wno-c++98-compat") + endif() endif () endif() diff --git a/luabind/detail/format_signature.hpp b/luabind/detail/format_signature.hpp index 38c37f0c..cfd39365 100644 --- a/luabind/detail/format_signature.hpp +++ b/luabind/detail/format_signature.hpp @@ -7,20 +7,13 @@ # include # include +# include # include # include # include # include -namespace luabind { - -class object; -class argument; -template -struct table; - -} // namespace luabind namespace luabind { namespace detail { diff --git a/luabind/object_fwd.hpp b/luabind/object_fwd.hpp new file mode 100644 index 00000000..dc826961 --- /dev/null +++ b/luabind/object_fwd.hpp @@ -0,0 +1,15 @@ +#ifndef LUABIND_OBJECT_FWD_050419_HPP +#define LUABIND_OBJECT_FWD_050419_HPP + +namespace luabind { + namespace adl { + class object; + class argument; + template struct table; + } // namespace adl + using adl::object; + using adl::argument; + using adl::table; +} // namespace luabind + +#endif