diff options
author | Ignacio Burgueño <ignaciob@inconcertcc.com> | 2015-06-08 12:19:11 -0300 |
---|---|---|
committer | Ignacio Burgueño <ignaciob@inconcertcc.com> | 2015-06-25 12:47:00 -0300 |
commit | f61e5a22d7d76561cfb10a8d83e14e324d2a772a (patch) | |
tree | edbe5c545ebb6d6569ed35137b1773622c1b51f1 /src | |
parent | 028b37f2376225aa69c946beb44fd7dd68f32604 (diff) | |
download | luarocks-f61e5a22d7d76561cfb10a8d83e14e324d2a772a.tar.gz luarocks-f61e5a22d7d76561cfb10a8d83e14e324d2a772a.tar.bz2 luarocks-f61e5a22d7d76561cfb10a8d83e14e324d2a772a.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/build/cmake.lua | 6 |
1 files changed, 5 insertions, 1 deletions
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) | |||
35 | cmake_handler:close() | 35 | cmake_handler:close() |
36 | end | 36 | end |
37 | 37 | ||
38 | |||
39 | -- Execute cmake with variables. | 38 | -- Execute cmake with variables. |
40 | local args = "" | 39 | local args = "" |
41 | if cfg.cmake_generator then | 40 | if cfg.cmake_generator then |
@@ -45,6 +44,11 @@ function cmake.run(rockspec) | |||
45 | args = args .. ' -D' ..k.. '="' ..v.. '"' | 44 | args = args .. ' -D' ..k.. '="' ..v.. '"' |
46 | end | 45 | end |
47 | 46 | ||
47 | -- Generate 64 bit build if appropiate. | ||
48 | if not not cfg.arch:match("%-x86_64$") then | ||
49 | args = args .. " -DCMAKE_GENERATOR_PLATFORM=x64" | ||
50 | end | ||
51 | |||
48 | if not fs.execute_string(rockspec.variables.CMAKE.." -H. -Bbuild.luarocks "..args) then | 52 | if not fs.execute_string(rockspec.variables.CMAKE.." -H. -Bbuild.luarocks "..args) then |
49 | return nil, "Failed cmake." | 53 | return nil, "Failed cmake." |
50 | end | 54 | end |