Skip to content

Commit

Permalink
Fix Clang build.
Browse files Browse the repository at this point in the history
  • Loading branch information
Oberon00 committed Jul 7, 2013
1 parent cf671f6 commit 4555b20
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
13 changes: 9 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
9 changes: 1 addition & 8 deletions luabind/detail/format_signature.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,13 @@

# include <luabind/config.hpp>
# include <luabind/lua_include.hpp>
# include <luabind/object_fwd.hpp>
# include <luabind/typeid.hpp>

# include <boost/mpl/begin_end.hpp>
# include <boost/mpl/next.hpp>
# include <boost/mpl/size.hpp>

namespace luabind {

class object;
class argument;
template <class Base>
struct table;

} // namespace luabind

namespace luabind { namespace detail {

Expand Down
15 changes: 15 additions & 0 deletions luabind/object_fwd.hpp
Original file line number Diff line number Diff line change
@@ -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 <class Base> struct table;
} // namespace adl
using adl::object;
using adl::argument;
using adl::table;
} // namespace luabind

#endif

0 comments on commit 4555b20

Please sign in to comment.