mirror of
https://github.com/walterschell/Lua.git
synced 2024-11-24 06:04:34 +00:00
Merge pull request #17 from henne90gen/master
Added option LUA_ENABLE_TESTING to allow users to disable running tests
This commit is contained in:
commit
a2e0125df5
@ -1,11 +1,15 @@
|
|||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.1)
|
||||||
project(lua LANGUAGES C VERSION 5.4.4)
|
project(lua LANGUAGES C VERSION 5.4.4)
|
||||||
enable_testing()
|
|
||||||
|
|
||||||
option(LUA_SUPPORT_DL "Support dynamic loading of compiled modules" OFF)
|
option(LUA_SUPPORT_DL "Support dynamic loading of compiled modules" OFF)
|
||||||
option(LUA_BUILD_AS_CXX "Build lua as C++" OFF)
|
option(LUA_BUILD_AS_CXX "Build lua as C++" OFF)
|
||||||
option(LUA_ENABLE_SHARED "Build dynamic liblua" ON)
|
option(LUA_ENABLE_SHARED "Build dynamic liblua" ON)
|
||||||
|
option(LUA_ENABLE_TESTING "Build and run tests" ON)
|
||||||
|
|
||||||
enable_language(CXX)
|
enable_language(CXX)
|
||||||
|
if(LUA_ENABLE_TESTING)
|
||||||
|
enable_testing()
|
||||||
|
endif()
|
||||||
|
|
||||||
if(${PROJECT_NAME} STREQUAL ${CMAKE_PROJECT_NAME})
|
if(${PROJECT_NAME} STREQUAL ${CMAKE_PROJECT_NAME})
|
||||||
set(TOP_LEVEL TRUE)
|
set(TOP_LEVEL TRUE)
|
||||||
@ -21,7 +25,8 @@ else()
|
|||||||
option(LUA_BUILD_COMPILER "Build luac compiler" ON)
|
option(LUA_BUILD_COMPILER "Build luac compiler" ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
add_subdirectory(lua-5.4.4)
|
add_subdirectory(lua-5.4.4)
|
||||||
|
|
||||||
add_test(NAME lua-testsuite COMMAND lua -e "_U=true" all.lua WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lua-5.4.4-tests)
|
if(LUA_ENABLE_TESTING)
|
||||||
|
add_test(NAME lua-testsuite COMMAND lua -e "_U=true" all.lua WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lua-5.4.4-tests)
|
||||||
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user