aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Abreu Ferreira <raf-ep@gmx.com>2016-03-19 17:54:14 +0000
committerRui Abreu Ferreira <rap-ep@gmx.com>2016-08-26 08:09:56 +0100
commitbed61041a03637227787d6ec1066a183d457aba8 (patch)
treed9be4f376027e27650bd25f7b6e58bfa69675d74
parent9da4d0dfeea45090919ec38a79f5a65221f7c728 (diff)
downloadrneovim-bed61041a03637227787d6ec1066a183d457aba8.tar.gz
rneovim-bed61041a03637227787d6ec1066a183d457aba8.tar.bz2
rneovim-bed61041a03637227787d6ec1066a183d457aba8.zip
third-party: Build busted in Windows
Busted now builds on Windows, remove the check. In Windows the binary is called busted.bat.
-rw-r--r--CMakeLists.txt2
-rw-r--r--third-party/cmake/BuildLuarocks.cmake15
2 files changed, 9 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cb044d521c..e91a7e67e9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -395,7 +395,7 @@ endif()
message(STATUS "Using the Lua interpreter ${LUA_PRG}.")
# Setup busted.
-find_program(BUSTED_PRG busted)
+find_program(BUSTED_PRG NAMES busted busted.bat)
find_program(BUSTED_LUA_PRG busted-lua)
if(NOT BUSTED_OUTPUT_TYPE)
if(WIN32)
diff --git a/third-party/cmake/BuildLuarocks.cmake b/third-party/cmake/BuildLuarocks.cmake
index cbc1959d4f..f76e2eb82f 100644
--- a/third-party/cmake/BuildLuarocks.cmake
+++ b/third-party/cmake/BuildLuarocks.cmake
@@ -3,11 +3,7 @@
# writing a recipe that is meant for cross-compile, use the HOSTDEPS_* variables
# instead of DEPS_* - check the main CMakeLists.txt for a list.
-if(MSVC OR (MINGW AND NOT CMAKE_CROSSCOMPILING))
- message(STATUS "Building busted in Windows is not supported (skipping)")
-else()
- option(USE_BUNDLED_BUSTED "Use the bundled version of busted to run tests." ON)
-endif()
+option(USE_BUNDLED_BUSTED "Use the bundled version of busted to run tests." ON)
# BuildLuarocks(CONFIGURE_COMMAND ... BUILD_COMMAND ... INSTALL_COMMAND ...)
# Reusable function to build luarocks, wraps ExternalProject_Add.
@@ -134,12 +130,17 @@ if(USE_BUNDLED_BUSTED)
add_custom_target(penlight
DEPENDS ${HOSTDEPS_LIB_DIR}/luarocks/rocks/penlight/1.3.2-2)
- add_custom_command(OUTPUT ${HOSTDEPS_BIN_DIR}/busted
+ if(WIN32)
+ set(BUSTED_EXE "${HOSTDEPS_BIN_DIR}/busted.bat")
+ else()
+ set(BUSTED_EXE "${HOSTDEPS_BIN_DIR}/busted")
+ endif()
+ add_custom_command(OUTPUT ${BUSTED_EXE}
COMMAND ${LUAROCKS_BINARY}
ARGS build https://raw.githubusercontent.com/Olivine-Labs/busted/v2.0.rc11-0/busted-2.0.rc11-0.rockspec ${LUAROCKS_BUILDARGS}
DEPENDS penlight)
add_custom_target(busted
- DEPENDS ${HOSTDEPS_BIN_DIR}/busted)
+ DEPENDS ${BUSTED_EXE})
add_custom_command(OUTPUT ${HOSTDEPS_BIN_DIR}/luacheck
COMMAND ${LUAROCKS_BINARY}