mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
x86 fixes
This commit is contained in:
parent
bfe696d2d7
commit
6202b91b40
11
.travis.yml
11
.travis.yml
|
@ -41,7 +41,8 @@ script:
|
|||
matrix:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- env: ALLOW_FAILURE=true
|
||||
- env:
|
||||
- ALLOW_FAILURE=true
|
||||
include:
|
||||
# GCC 4.9.x, 5.x, 6.x, 7.x
|
||||
- env:
|
||||
|
@ -74,42 +75,36 @@ matrix:
|
|||
LLVM_VERSION=3.6.2
|
||||
PLATFORM=x64
|
||||
CI=true
|
||||
ALLOW_FAILURE=true
|
||||
|
||||
- env:
|
||||
- LUA_VERSION=5.3.4
|
||||
LLVM_VERSION=3.7.1
|
||||
PLATFORM=x64
|
||||
CI=true
|
||||
ALLOW_FAILURE=true
|
||||
|
||||
- env:
|
||||
- LUA_VERSION=5.3.4
|
||||
LLVM_VERSION=3.8.1
|
||||
PLATFORM=x64
|
||||
CI=true
|
||||
ALLOW_FAILURE=true
|
||||
|
||||
- env:
|
||||
- LUA_VERSION=5.3.4
|
||||
LLVM_VERSION=3.9.1
|
||||
PLATFORM=x64
|
||||
CI=true
|
||||
ALLOW_FAILURE=true
|
||||
|
||||
- env:
|
||||
- LUA_VERSION=5.3.4
|
||||
LLVM_VERSION=4.0.1
|
||||
PLATFORM=x64
|
||||
CI=true
|
||||
ALLOW_FAILURE=true
|
||||
|
||||
- env:
|
||||
- LUA_VERSION=5.3.4
|
||||
LLVM_VERSION=5.0.1
|
||||
PLATFORM=x64
|
||||
CI=true
|
||||
ALLOW_FAILURE=true
|
||||
|
||||
# Lua Versions 5.2.4, 5.1.5, and LuaJIT (as well as x86)
|
||||
- env:
|
||||
|
@ -160,7 +155,7 @@ notifications:
|
|||
- https://webhooks.gitter.im/e/b864d553270a069d26c8
|
||||
on_success: change
|
||||
on_failure: always
|
||||
on_start: never
|
||||
on_start: always
|
||||
email:
|
||||
on_success: change
|
||||
on_failure: change
|
||||
|
|
|
@ -80,7 +80,7 @@ if (CI)
|
|||
endif()
|
||||
|
||||
# # # General project output locations
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
if (PLATFORM MATCHES "x86" OR CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/x86/lib")
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/x86/lib")
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/x86/bin")
|
||||
|
@ -106,6 +106,7 @@ include(CMakePackageConfigHelpers)
|
|||
set(LUA_VERSION "5.3.4" CACHE STRING "The version of Lua needed. Can be 5.1, 5.2, 5.3, LuaJIT, or a more specific 3-part version number for a specifc Lua (e.g., 5.3.4 or luajit-2.0.5)")
|
||||
set(BUILD_LUA TRUE CACHE BOOL "Always build Lua, do not search for it in the system")
|
||||
set(BUILD_LUAJIT FALSE CACHE BOOL "Always build LuaJIT, do not search for it in the system")
|
||||
set(PLATFORM "x64" CACHE STRING "Target platform to compile for when building binaries (x86, x64)")
|
||||
option(CI "Enable build of tests" OFF)
|
||||
option(TESTS "Enable build of tests" OFF)
|
||||
option(EXAMPLES "Enable build of examples" OFF)
|
||||
|
|
|
@ -197,6 +197,9 @@ else ()
|
|||
if (WIN32)
|
||||
list(APPEND LUA_JIT_MAKE_BUILD_MODIFICATIONS "HOST_SYS=Windows" "TARGET_SYS=Windows")
|
||||
endif()
|
||||
if (PLATFORM MATCHES "x86")
|
||||
list(APPEND LUA_JIT_MAKE_BUILD_MODIFICATIONS "CFLAGS=-m32" "LDFLAGS=-m32")
|
||||
endif()
|
||||
|
||||
set(LUA_JIT_BUILD_COMMAND BUILD_COMMAND "${MAKE_PROGRAM}" ${LUA_JIT_MAKE_BUILD_MODIFICATIONS})
|
||||
endif()
|
||||
|
@ -280,7 +283,7 @@ if (MSVC)
|
|||
postbuild.exp
|
||||
DEPENDEES build
|
||||
COMMENT "Libray - Moving \"${LUA_JIT_SOURCE_LUA_LIB_EXP}\" to \"${LUA_JIT_DESTINATION_LUA_LIB_EXP}\"..."
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${LUA_JIT_SOURCE_LUA_LIB_EXP}" "${LUA_JIT_DESTINATION_LUA_LIB_EXP}" && echo "Successfully moved!")
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${LUA_JIT_SOURCE_LUA_LIB_EXP}" "${LUA_JIT_DESTINATION_LUA_LIB_EXP}" && echo Successfully moved!)
|
||||
endif()
|
||||
if (BUILD_LUA_AS_DLL)
|
||||
if (MSVC)
|
||||
|
@ -291,7 +294,7 @@ if (BUILD_LUA_AS_DLL)
|
|||
DEPENDEES build
|
||||
COMMENT "Libray - Moving \"${LUA_JIT_SOURCE_LUA_IMP_LIB}\" to \"${LUA_JIT_DESTINATION_LUA_IMP_LIB}\"..."
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${LUA_JIT_SOURCE_LUA_IMP_LIB}" "${LUA_JIT_DESTINATION_LUA_IMP_LIB}"
|
||||
COMMAND echo "Successfully moved!")
|
||||
COMMAND echo Successfully moved!)
|
||||
endif()
|
||||
MESSAGE(STATUS ${LUA_JIT_SOURCE_LUA_DLL})
|
||||
MESSAGE(STATUS ${LUA_JIT_DESTINATION_LUA_DLL})
|
||||
|
@ -300,13 +303,13 @@ if (BUILD_LUA_AS_DLL)
|
|||
postbuild.dll
|
||||
DEPENDEES build
|
||||
COMMENT "Dynamic Library - Moving \"${LUA_JIT_SOURCE_LUA_DLL}\" to \"${LUA_JIT_DESTINATION_LUA_DLL}\"..."
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${LUA_JIT_SOURCE_LUA_DLL}" "${LUA_JIT_DESTINATION_LUA_DLL}" && echo "Successfully moved!")
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${LUA_JIT_SOURCE_LUA_DLL}" "${LUA_JIT_DESTINATION_LUA_DLL}" && echo Successfully moved!)
|
||||
else()
|
||||
ExternalProject_Add_Step(LUA_JIT
|
||||
postbuild.lib
|
||||
DEPENDEES build
|
||||
COMMENT "Library - Moving \"${LUA_JIT_SOURCE_LUA_LIB}\" to \"${LUA_JIT_DESTINATION_LUA_LIB}\"..."
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${LUA_JIT_SOURCE_LUA_LIB}" "${LUA_JIT_DESTINATION_LUA_LIB}" && echo "Successfully moved!")
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${LUA_JIT_SOURCE_LUA_LIB}" "${LUA_JIT_DESTINATION_LUA_LIB}" && echo Successfully moved!)
|
||||
endif()
|
||||
# # TODO:
|
||||
# Add additional post-build step to move all necessary headers/lua files
|
||||
|
|
|
@ -70,7 +70,7 @@ echo -en "travis_fold:end:build_preparation.2\r"
|
|||
|
||||
echo -en "travis_fold:start:build.debug\r"
|
||||
cd Debug
|
||||
cmake ${SOL2_DIR} -G Ninja -DCMAKE_BUILD_TYPE=Debug ${build_type_cc} ${build_type_cxx} -DLUA_VERSION="${LUA_VERSION}" -DCI=ON -D${PLATFORM}=ON -DBUILD_LUA=ON -DBUILD_LUA_AS_DLL=OFF -DTESTS=ON -DEXAMPLES=ON -DSINGLE=ON -DTESTS_EXAMPLES=ON -DEXAMPLES_SINGLE=ON -DTESTS_SINGLE=ON
|
||||
cmake ${SOL2_DIR} -G Ninja -DCMAKE_BUILD_TYPE=Debug ${build_type_cc} ${build_type_cxx} -DLUA_VERSION="${LUA_VERSION}" -DCI=ON -DPLATFORM=${PLATFORM} -DBUILD_LUA=ON -DBUILD_LUA_AS_DLL=OFF -DTESTS=ON -DEXAMPLES=ON -DSINGLE=ON -DTESTS_EXAMPLES=ON -DEXAMPLES_SINGLE=ON -DTESTS_SINGLE=ON
|
||||
cmake --build . --config Debug
|
||||
echo -en "travis_fold:end:build.debug\r"
|
||||
echo -en "travis_fold:start:test.debug\r"
|
||||
|
@ -80,7 +80,7 @@ echo -en "travis_fold:end:test.debug\r"
|
|||
|
||||
echo "travis_fold:start:build.release\r"
|
||||
cd Release
|
||||
cmake ${SOL2_DIR} -G Ninja -DCMAKE_BUILD_TYPE=Release ${build_type_cc} ${build_type_cxx} -DLUA_VERSION="${LUA_VERSION}" -DCI=ON -D${PLATFORM}=ON -DBUILD_LUA=ON -DBUILD_LUA_AS_DLL=OFF -DTESTS=ON -DEXAMPLES=ON -DSINGLE=ON -DTESTS_EXAMPLES=ON -DEXAMPLES_SINGLE=ON -DTESTS_SINGLE=ON
|
||||
cmake ${SOL2_DIR} -G Ninja -DCMAKE_BUILD_TYPE=Release ${build_type_cc} ${build_type_cxx} -DLUA_VERSION="${LUA_VERSION}" -DCI=ON -DPLATFORM=${PLATFORM} -DBUILD_LUA=ON -DBUILD_LUA_AS_DLL=OFF -DTESTS=ON -DEXAMPLES=ON -DSINGLE=ON -DTESTS_EXAMPLES=ON -DEXAMPLES_SINGLE=ON -DTESTS_SINGLE=ON
|
||||
cmake --build . --config Release
|
||||
echo -en "travis_fold:end:build.release\r"
|
||||
echo -en "travis_fold:start:test.release\r"
|
||||
|
|
Loading…
Reference in New Issue
Block a user