From 7fae78b23b252491cdc29d78ae92f6d2f199c010 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Sun, 24 Dec 2017 01:44:51 -0500 Subject: [PATCH] update cmake build and try out new appveyor commands --- CMakeLists.txt | 2 +- appveyor.yml | 2 +- cmake/Modules/LuaVanillaBuild.cmake | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 198abe29..02a1c606 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ project(sol2 VERSION 2.19.0 LANGUAGES CXX C) if (MSVC) add_definitions(/DUNICODE /D_UNICODE /D_SILENCE_CXX17_UNCAUGHT_EXCEPTION_DEPRECATION_WARNING /D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING) - add_compile_options(/W4 /EHsc /std:c++latest) + add_compile_options(/W4 /EHsc) else() add_compile_options(-Wno-unknown-warning -Wno-unknown-warning-option -Wall -Wextra -Wpedantic -pedantic -pedantic-errors -Wno-noexcept-type -ftemplate-depth=1024) endif() diff --git a/appveyor.yml b/appveyor.yml index 54e0c812..64dbec6e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -57,7 +57,7 @@ before_build: - set PATH=%PYTHON_PATH%;%PATH% - md build-sol2 - cd build-sol2 -- cmake .. -G "%CMAKE_GENERATOR%" -DLUA_VERSION="%LUA_VERSION%" -DBUILD_LUA=ON -DTESTS=ON -DEXAMPLES=ON -DSINGLE=ON -DTESTS_EXAMPLES=ON -DTESTS_SINGLE=ON +- cmake .. -G "%CMAKE_GENERATOR%" -DLUA_VERSION="%LUA_VERSION%" -DBUILD_LUA=ON -DBUILD_LUA_AS_DLL=OFF -DTESTS=ON -DEXAMPLES=ON -DSINGLE=ON -DTESTS_EXAMPLES=ON -DTESTS_SINGLE=ON build_script: - cmake --build . diff --git a/cmake/Modules/LuaVanillaBuild.cmake b/cmake/Modules/LuaVanillaBuild.cmake index f0c87338..4c02400f 100644 --- a/cmake/Modules/LuaVanillaBuild.cmake +++ b/cmake/Modules/LuaVanillaBuild.cmake @@ -206,6 +206,10 @@ else() set(LUA_VANILLA_LUAC_SOURCES luac.c ) endif() +if (BUILD_LUA_AS_DLL) + set(LUA_VANILLA_LUAC_SOURCES ${LUA_VANILLA_LUAC_SOURCES} ${LUA_VANILLA_LIB_SOURCES}) +endif() + set(LUA_VANILLA_SOURCE_DIR "${LUA_BUILD_TOPLEVEL}/src") prepend(LUA_VANILLA_LIB_SOURCES "${LUA_VANILLA_SOURCE_DIR}/" ${LUA_VANILLA_LIB_SOURCES}) prepend(LUA_VANILLA_LUA_SOURCES "${LUA_VANILLA_SOURCE_DIR}/" ${LUA_VANILLA_LUA_SOURCES}) @@ -420,7 +424,7 @@ if (LUA_VANILLA_BUILD_DIRECTLY) target_compile_definitions(${luacompiler} PRIVATE LUA_USE_LINUX) endif() - #target_link_libraries(${luacompiler} ${lualib}) + target_link_libraries(${luacompiler} ${lualib}) if (CMAKE_DL_LIBS) target_link_libraries(${luacompiler} ${CMAKE_DL_LIBS}) endif()