diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-06-27 02:29:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-27 02:29:15 +0200 |
commit | f34befe74c5a7b18a802f6f3c79607cb2124004c (patch) | |
tree | 955fc4456e7710213f7339e95cd40464088c08ec /cmake | |
parent | 1ef2d768e71981e4429376a0cb25dbed14dfae52 (diff) | |
parent | cab3a248b2704e8f188eaf20206f2c87d1a76c0d (diff) | |
download | rneovim-f34befe74c5a7b18a802f6f3c79607cb2124004c.tar.gz rneovim-f34befe74c5a7b18a802f6f3c79607cb2124004c.tar.bz2 rneovim-f34befe74c5a7b18a802f6f3c79607cb2124004c.zip |
Merge #6789 from ZyX-I/lua-path
lua: Add paths from &runtimepath to package.path and package.cpath
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/RunLuacheck.cmake | 22 | ||||
-rw-r--r-- | cmake/RunTestsLint.cmake | 13 |
2 files changed, 22 insertions, 13 deletions
diff --git a/cmake/RunLuacheck.cmake b/cmake/RunLuacheck.cmake new file mode 100644 index 0000000000..5129541cd8 --- /dev/null +++ b/cmake/RunLuacheck.cmake @@ -0,0 +1,22 @@ +set(LUACHECK_ARGS -q "${LUAFILES_DIR}") +if(DEFINED IGNORE_PATTERN) + list(APPEND LUACHECK_ARGS --exclude-files "${LUAFILES_DIR}/${IGNORE_PATTERN}") +endif() +if(DEFINED CHECK_PATTERN) + list(APPEND LUACHECK_ARGS --include-files "${LUAFILES_DIR}/${CHECK_PATTERN}") +endif() +if(DEFINED READ_GLOBALS) + list(APPEND LUACHECK_ARGS --read-globals "${READ_GLOBALS}") +endif() + +execute_process( + COMMAND "${LUACHECK_PRG}" ${LUACHECK_ARGS} + WORKING_DIRECTORY "${LUAFILES_DIR}" + ERROR_VARIABLE err + RESULT_VARIABLE res +) + +if(NOT res EQUAL 0) + message(STATUS "Output to stderr:\n${err}") + message(FATAL_ERROR "Linting tests failed with error: ${res}.") +endif() diff --git a/cmake/RunTestsLint.cmake b/cmake/RunTestsLint.cmake deleted file mode 100644 index addc9ab35e..0000000000 --- a/cmake/RunTestsLint.cmake +++ /dev/null @@ -1,13 +0,0 @@ -set(IGNORE_FILES "${TEST_DIR}/*/preload.lua") - -execute_process( - COMMAND ${LUACHECK_PRG} -q ${TEST_DIR} --exclude-files ${IGNORE_FILES} - WORKING_DIRECTORY ${TEST_DIR} - ERROR_VARIABLE err - RESULT_VARIABLE res - ${EXTRA_ARGS}) - -if(NOT res EQUAL 0) - message(STATUS "Output to stderr:\n${err}") - message(FATAL_ERROR "Linting tests failed with error: ${res}.") -endif() |