Skip to content

Commit 4f0bc51

Browse files
committed
cmake: fix ENABLE_LUAJIT_RANDOM_RA option
The CMake option ENABLE_LUAJIT_RANDOM_RA has been broken. The patch fixes that and enable this option in testing.
1 parent 6c8db3e commit 4f0bc51

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
7979
-DUSE_LUAJIT=ON -DENABLE_BUILD_PROTOBUF=OFF \
8080
-DENABLE_INTERNAL_TESTS=ON -DENABLE_LAPI_TESTS=ON \
81-
-DENABLE_COV=ON \
81+
-DENABLE_COV=ON -DENABLE_LUAJIT_RANDOM_RA=ON \
8282
-G Ninja -S . -B build
8383
if: ${{ matrix.LUA == 'luajit' }}
8484

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ set(CMAKE_INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_INCLUDE_PATH}
3333
include(SetBuildParallelLevel)
3434
include(SetHardwareArch)
3535

36-
if (ENABLE_LUAJIT_RANDOM_RA AND NOT IS_LUAJIT)
37-
message(FATAL_ERROR "Option ENABLE_LUAJIT_RANDOM_RA is LuaJIT-specific.")
38-
endif()
39-
4036
if (USE_LUA AND NOT LUA_VERSION)
4137
set(LUA_VERSION "master")
4238
endif()
@@ -71,6 +67,10 @@ endif ()
7167

7268
message(STATUS "Found ${LUA_VERSION_STRING}")
7369

70+
if (ENABLE_LUAJIT_RANDOM_RA AND NOT IS_LUAJIT)
71+
message(FATAL_ERROR "Option ENABLE_LUAJIT_RANDOM_RA is LuaJIT-specific.")
72+
endif()
73+
7474
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR
7575
NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
7676
message(FATAL_ERROR

0 commit comments

Comments
 (0)