In my rockspec file i hav this defenitions[1].

  platforms = {
    unix    = { modules = {
      ["lzmq.timer"] = {
        defines = {'USE_CLOCK_MONOTONIC', 'USE_GETTIMEOFDAY'},
        libraries = {"rt"},
      },
    }},
    macosx  = { modules = {
      ["lzmq.timer"] = {
        defines = {'USE_GETTIMEOFDAY'},
        libraries = {},
      },
    }},
  },

I try build this on MacOS on travis-ci and get[2]:
 gcc -O2 -fPIC -I... -c ... -DUSE_GETTIMEOFDAY -DUSE_GETTIMEOFDAY
 gcc -bundle -undefined dynamic_lookup -all_load -o ... -lrt

So LuaRocks use `defines` only from `macosx` (but duplicate defines),
but use `libraries` from `unix`.

[1] https://raw2.github.com/moteus/lzmq/master/rockspecs/lzmq-scm-0.rockspec
[2] https://travis-ci.org/moteus/lua-travis-example/jobs/17052085#


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Luarocks-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to