Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra command line options for luarocks make is needed. #339

Open
xpol opened this issue Mar 26, 2015 · 3 comments
Open

Extra command line options for luarocks make is needed. #339

xpol opened this issue Mar 26, 2015 · 3 comments

Comments

@xpol
Copy link
Contributor

xpol commented Mar 26, 2015

#327 we made the defaulut cmake build system use cmake detected generator and release build for rocks.

That if fine for module users.

But as a module developer, after a few days of using the new cmake build system, I found that the follow command line option for luarocks make is required:

Choose Debug build from command line

luarocks make --debug

or

luarocks make --config debug

which is better?

As make command is for developer, should debug be the default for make command
and release default for build command?

Overwrite the default generator for cmake

On Mac, it generate Makefile, but I want Xcode project to debug.

  • add options like luarocks make --pass-args "-G Xcode" (should be a better option name)
  • or something in ~/.luarocksrc.lua ?
  • or maybe I did wrong thing that removed the support of cfg.cmake_generator in Better cmake support. #327 ?

I just currently can't find the best answer myself.

@hishamhm
Copy link
Member

If you add a --debug flag for luarocks make, then all build backends should support it.

I've given this some thought and the least intrusive and most effective way would be to add the appropriate debugging CFLAGS (-g on Unix; which one on Windows?) when the flag is enabled.

or maybe I did wrong thing that removed the support of cfg.cmake_generator in #327 ?

Yes, I completely missed the fact that you removed that (sorry about not paying enough attention). It should definitely come back. Then you will have solved your problem for Xcode, since you'll be able to set it in ~/.luarocks/config.lua.

If you want you can leave cfg.cmake_generator unset in the MSVC configuration, so that it takes the default, but the other ones should be back in too (including "Unix Makefiles" by default for OSX — that's better for module users).

@xpol
Copy link
Contributor Author

xpol commented Mar 26, 2015

@hishamhm Sorry for #327 . Revert back in #340 .

for windows MSVC flags would:

   defaults.variables.CFLAGS = {release="/MD /O2", debug="/MD /Od /Ob0 /Zi /D \"_DEBUG\""}
   defaults.variables.LIBFLAG = {release="/dll", debug="/dll /DEBUG"}

It boring that only MSVC requires different LIBFLAG for debug and release mode. (Other gcc family are doing this in CFLAGS)

@xpol
Copy link
Contributor Author

xpol commented Mar 26, 2015

Have you got any ideas command backend?

Let build.build_command and build.install_command to handle the --debug option?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants