diff --git a/CMakeLists.txt b/CMakeLists.txt index 015896b8..e5c1057b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,6 +74,10 @@ if (MSVC) add_definitions(/DUNICODE /D_UNICODE /D_CRT_SECURE_NO_WARNINGS /D_CRT_SECURE_NO_DEPRECATE) # Warning level, exceptions add_compile_options(/W4 /EHsc) + add_compile_options("$<$:/MDd>" + "$<$:/MD>" + "$<$:/MD>" + "$<$:/MD>") if (NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(/MP) endif() diff --git a/examples/docs/simple_functions.cpp b/examples/docs/simple_functions.cpp index a298c273..9ef02c94 100644 --- a/examples/docs/simple_functions.cpp +++ b/examples/docs/simple_functions.cpp @@ -1,18 +1,18 @@ #define SOL_CHECK_ARGUMENTS 1 #include -#include +#include "../assert.hpp" int main() { sol::state lua; int x = 0; lua.set_function("beep", [&x]{ ++x; }); lua.script("beep()"); - assert(x == 1); + c_assert(x == 1); sol::function beep = lua["beep"]; beep(); - assert(x == 2); + c_assert(x == 2); return 0; } diff --git a/examples/docs/simple_structs.cpp b/examples/docs/simple_structs.cpp index a2dd5c0d..8016e78c 100644 --- a/examples/docs/simple_structs.cpp +++ b/examples/docs/simple_structs.cpp @@ -1,7 +1,7 @@ #define SOL_CHECK_ARGUMENTS 1 #include -#include +#include "../assert.hpp" struct vars { int boop = 0; @@ -23,10 +23,10 @@ int main() { vars& beep = lua["beep"]; int bopvalue = lua["bopvalue"]; - assert(beep.boop == 1); - assert(lua.get("beep").boop == 1); - assert(beep.bop() == 2); - assert(bopvalue == 2); + c_assert(beep.boop == 1); + c_assert(lua.get("beep").boop == 1); + c_assert(beep.bop() == 2); + c_assert(bopvalue == 2); return 0; } diff --git a/examples/require_dll_example/CMakeLists.txt b/examples/require_dll_example/CMakeLists.txt index 88001890..9a7c9e9a 100644 --- a/examples/require_dll_example/CMakeLists.txt +++ b/examples/require_dll_example/CMakeLists.txt @@ -65,14 +65,7 @@ function(make_require_from_dll_example target_lib is_single) target_link_libraries(${example_lib_name} PRIVATE ${LUA_LIBRARIES}) endif() else() - if (lua_lib_type MATCHES "STATIC") - target_link_libraries(${example_lib_name} PRIVATE ${LUA_LIBRARIES}) - set_target_properties(${example_lib_name} PROPERTIES - WINDOWS_EXPORT_ALL_SYMBOLS TRUE - LINK_FLAGS "/OPT:NOREF /WHOLEARCHIVE:lua-5.2.4.lib") - else() - target_link_libraries(${example_lib_name} PRIVATE ${LUA_LIBRARIES}) - endif() + target_link_libraries(${example_lib_name} PRIVATE ${LUA_LIBRARIES}) endif() if (IS_X86) target_compile_options(${example_lib_name} BEFORE PRIVATE -m32) diff --git a/single/sol/sol.hpp b/single/sol/sol.hpp index 2af46e48..a2e80f09 100644 --- a/single/sol/sol.hpp +++ b/single/sol/sol.hpp @@ -20,8 +20,8 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // This file was generated with a script. -// Generated 2018-03-01 00:19:34.880908 UTC -// This header was generated with sol v2.19.4 (revision b46b106) +// Generated 2018-03-02 02:30:38.238868 UTC +// This header was generated with sol v2.19.4 (revision 9bddce6) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -1177,10 +1177,15 @@ namespace sol { template using remove_member_pointer_t = remove_member_pointer; - template