]> git.lizzy.rs Git - minetest.git/commitdiff
Exclude MSVC from new Lua sanity check
authorsfan5 <sfan5@live.de>
Sat, 15 Oct 2022 10:02:02 +0000 (12:02 +0200)
committersfan5 <sfan5@live.de>
Sat, 15 Oct 2022 10:02:02 +0000 (12:02 +0200)
src/CMakeLists.txt

index 64aef356ace3472c55c8c21a2bf0d8cbd5e87ddc..8bf896bb1e7adc960ca940d7417cc3f198960daa 100644 (file)
@@ -692,11 +692,12 @@ if(USE_LUAJIT)
                        "THIS APPLIES ESPECIALLY ON macOS OR Linux/aarch64!")
                message(WARNING ${explanation_msg})
        endif()
-else()
+elseif(NOT MSVC)
        set(CMAKE_REQUIRED_LIBRARIES "")
        unset(HAVE_ATCCALL CACHE)
        # Note: we need to check the function without having the library
        #       available for linking, so check_symbol_exists won't work.
+       # Incidentally this doesn't seem to work on MSVC...
        check_c_source_compiles("#include <lua.h>\nint main(){return sizeof(lua_atccall);}" HAVE_ATCCALL)
        if(NOT HAVE_ATCCALL)
                string(CONCAT explanation_msg