mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Fix Visual Studio 2015 builds, fix error handling printouts / exceptions, fix constexpr usage that trips up Visual Studio 2015.
This commit is contained in:
parent
42fe70f081
commit
c72a012927
|
@ -25,7 +25,7 @@
|
|||
cmake_minimum_required(VERSION 3.5.0)
|
||||
|
||||
# # # project declaration
|
||||
project(sol2 VERSION 2.19.0 LANGUAGES CXX C)
|
||||
project(sol2 VERSION 2.20.0 LANGUAGES CXX C)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
version: 2.19.0-{build}
|
||||
version: 2.20.0-{build}
|
||||
|
||||
max_jobs: 4
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <sol.hpp>
|
||||
|
||||
// Something that can't be collided with
|
||||
constexpr static const auto& script_key = "GlobalResource.MySpecialIdentifier123";
|
||||
static const auto& script_key = "GlobalResource.MySpecialIdentifier123";
|
||||
|
||||
struct GlobalResource {
|
||||
int value = 2;
|
||||
|
|
|
@ -149,7 +149,6 @@ namespace sol {
|
|||
std::cerr << err;
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
#if !(defined(SOL_NO_EXCEPTIONS) && SOL_NO_EXCEPTIONS)
|
||||
// replacing information of stack error into pfr
|
||||
int target = result.stack_index();
|
||||
if (result.pop_count() > 0) {
|
||||
|
@ -161,11 +160,12 @@ namespace sol {
|
|||
if (towards != 0) {
|
||||
lua_rotate(L, top, towards);
|
||||
}
|
||||
#if defined(SOL_NO_EXCEPTIONS) && SOL_NO_EXCEPTIONS
|
||||
return result;
|
||||
#else
|
||||
// just throw our error
|
||||
throw error(detail::direct_error, err);
|
||||
#endif
|
||||
return result;
|
||||
#endif // If exceptions are allowed
|
||||
}
|
||||
|
||||
inline protected_function_result script_default_on_error(lua_State* L, protected_function_result pfr) {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
# # # # sol2 tests
|
||||
|
||||
if (CMAKE_GENERATOR MATCHES "Visual Studio 14 2015")
|
||||
find_package(Catch 1.1.12 REQUIRED)
|
||||
find_package(Catch 1.12.1 REQUIRED)
|
||||
else()
|
||||
find_package(Catch 2.1.2 REQUIRED)
|
||||
endif()
|
||||
|
@ -71,8 +71,6 @@ function(CREATE_TEST test_target_name test_name is_single)
|
|||
target_compile_definitions(${test_target_name}
|
||||
PRIVATE SOL2_CI)
|
||||
endif()
|
||||
target_compile_features(${test_target_name}
|
||||
PRIVATE ${CXX_FEATURES})
|
||||
if (CMAKE_DL_LIBS)
|
||||
target_link_libraries(${test_target_name}
|
||||
${CMAKE_DL_LIBS})
|
||||
|
|
Loading…
Reference in New Issue
Block a user