Add support for lua5.4 in FindLua.cmake#5981
Merged
mjjbell merged 1 commit intoProject-OSRM:masterfrom Jul 20, 2021
Merged
Conversation
Member
|
The vendored version of sol2 is v2.20.6. It looks like Lua 5.4 support was added in a later version. However, #5927 modified the vendored version for OSRM to work with Lua 5.4. @OgreTransporter, maybe you can clarify compatibility with 5.4? |
OgreTransporter
approved these changes
Jun 29, 2021
Contributor
OgreTransporter
left a comment
There was a problem hiding this comment.
#5927 is working with 5.4.3. Unfortunately I don't use the find method because I always pass the libraries directly to CMake. But I have tested FindLua.cmake with Lua 5.4.3.
| # this is a function only to have all the variables inside go away automatically | ||
| function(_lua_set_version_vars) | ||
| set(LUA_VERSIONS5 5.3 5.2 5.1 5.0) | ||
| set(LUA_VERSIONS5 5.4 5.3 5.2 5.1 5.0) |
Contributor
There was a problem hiding this comment.
I can confirm the PR is working:
D:\OSRM\test\build>SET LUA_DIR=D:\OSRM\deps\lua\install
D:\OSRM\test\build>cmake ..
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
-- The C compiler identification is MSVC 19.29.30038.1
-- The CXX compiler identification is MSVC 19.29.30038.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Lua: D:/OSRM/deps/lua/install/lib/lua.lib (found suitable version "5.4.3", minimum required is "5.2")
-- Using Lua 5.4.3
-- Configuring done
-- Generating done
-- Build files have been written to: D:/OSRM/test/build
Test:
cmake_minimum_required(VERSION 3.1)
project(osrm-lua-test)
find_package(Lua 5.2 REQUIRED)
if (LUA_FOUND)
message(STATUS "Using Lua ${LUA_VERSION_STRING}")
endif()
OgreTransporter
approved these changes
Jun 29, 2021
mjjbell
approved these changes
Jul 20, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
#5980
This PR resolves the problem that cmake fails to find lua5.4.
Tasklist
Requirements / Relations
Link any requirements here. Other pull requests this PR is based on?