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

Any reason why INSTALL_BIN_SUBDIR is set to . on windows? #37

Open
hughperkins opened this issue Sep 17, 2016 · 1 comment
Open

Any reason why INSTALL_BIN_SUBDIR is set to . on windows? #37

hughperkins opened this issue Sep 17, 2016 · 1 comment

Comments

@hughperkins
Copy link

  • on windows, my share directory is located directly under $TORCH, rather than in $TORCH/install
  • it turns out this is because this directory is determined by $LUA_BINDIR
  • and this comes from the rockspec commandline
  • which ultimately comes from the luarocks config file
  • which comes from ....
    IF(WIN32)
    SET(INSTALL_BIN_SUBDIR "." CACHE STRING "installation executable subdirectory name")
    SET(INSTALL_LIB_SUBDIR "." CACHE STRING "installation library subdirectory name")
    SET(INSTALL_LUA_PATH_SUBDIR "lua") # not editable
    SET(INSTALL_LUA_CPATH_SUBDIR ".") # not editable
    SET(INSTALL_LUAROCKS_ROCKS_SUBDIR "luarocks" CACHE STRING "installation luarocks rocks subdirectory name")
    SET(INSTALL_LUAROCKS_SYSCONF_SUBDIR "luarocks" CACHE STRING "installation luarocks sysconfig subdirectory name")
    ELSE()
    SET(INSTALL_BIN_SUBDIR "bin" CACHE STRING "installation executable subdirectory name")
    SET(INSTALL_LIB_SUBDIR "lib" CACHE STRING "installation library subdirectory name")
    SET(INSTALL_LUA_PATH_SUBDIR "share/lua/${LUA_VERSION}") # not editable
    SET(INSTALL_LUA_LIB_SUBDIR "lib" CACHE STRING "installation lua lib subdirectory name")
    SET(INSTALL_LUA_CPATH_SUBDIR "${INSTALL_LUA_LIB_SUBDIR}/lua/${LUA_VERSION}") # not editable
    SET(INSTALL_LUAROCKS_ROCKS_SUBDIR "lib/luarocks/rocks" CACHE STRING "installation luarocks rocks subdirectory name")
    SET(INSTALL_LUAROCKS_SYSCONF_SUBDIR "etc/luarocks" CACHE STRING "installation luarocks sysconfig subdirectory name")
    ENDIF()
IF(WIN32)
  SET(INSTALL_BIN_SUBDIR "." CACHE STRING "installation executable subdirectory name")
  SET(INSTALL_LIB_SUBDIR "." CACHE STRING "installation library subdirectory name")
  SET(INSTALL_LUA_PATH_SUBDIR "lua") # not editable
  SET(INSTALL_LUA_CPATH_SUBDIR ".") # not editable
  SET(INSTALL_LUAROCKS_ROCKS_SUBDIR "luarocks" CACHE STRING "installation luarocks rocks subdirectory name")
  SET(INSTALL_LUAROCKS_SYSCONF_SUBDIR "luarocks" CACHE STRING "installation luarocks sysconfig subdirectory name")
ELSE()
  SET(INSTALL_BIN_SUBDIR "bin" CACHE STRING "installation executable subdirectory name")
  SET(INSTALL_LIB_SUBDIR "lib" CACHE STRING "installation library subdirectory name")
  SET(INSTALL_LUA_PATH_SUBDIR "share/lua/${LUA_VERSION}") # not editable
  SET(INSTALL_LUA_LIB_SUBDIR "lib" CACHE STRING "installation lua lib subdirectory name")
  SET(INSTALL_LUA_CPATH_SUBDIR "${INSTALL_LUA_LIB_SUBDIR}/lua/${LUA_VERSION}") # not editable
  SET(INSTALL_LUAROCKS_ROCKS_SUBDIR "lib/luarocks/rocks" CACHE STRING "installation luarocks rocks subdirectory name")
  SET(INSTALL_LUAROCKS_SYSCONF_SUBDIR "etc/luarocks" CACHE STRING "installation luarocks sysconfig subdirectory name")
ENDIF()

Seems like on purpose LUA_BINDIR is set to . rather than bin on Windows. Before I change this, it seems highly likely this change was done on purpose, so I'm wondering ... why? what are the consequences of making it uniform to the linux version?

@soumith
Copy link
Member

soumith commented Sep 17, 2016

go ahead and change it. what's the worst that can happen. i dont know why it was originally like this.

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

No branches or pull requests

2 participants