From f61e5a22d7d76561cfb10a8d83e14e324d2a772a Mon Sep 17 00:00:00 2001 From: Ignacio BurgueƱo Date: Mon, 8 Jun 2015 12:19:11 -0300 Subject: cmake backend: Generate 64 bits build when appropiate Adds -DCMAKE_GENERATOR_PLATFORM=x64 when needed. It seems that CMake does not do that by default (although I might be wrong on that). fixes #382 --- src/luarocks/build/cmake.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/luarocks/build/cmake.lua b/src/luarocks/build/cmake.lua index c8f5a669..a1c08dfa 100644 --- a/src/luarocks/build/cmake.lua +++ b/src/luarocks/build/cmake.lua @@ -35,7 +35,6 @@ function cmake.run(rockspec) cmake_handler:close() end - -- Execute cmake with variables. local args = "" if cfg.cmake_generator then @@ -45,6 +44,11 @@ function cmake.run(rockspec) args = args .. ' -D' ..k.. '="' ..v.. '"' end + -- Generate 64 bit build if appropiate. + if not not cfg.arch:match("%-x86_64$") then + args = args .. " -DCMAKE_GENERATOR_PLATFORM=x64" + end + if not fs.execute_string(rockspec.variables.CMAKE.." -H. -Bbuild.luarocks "..args) then return nil, "Failed cmake." end -- cgit v1.2.3-55-g6feb