Skip to content

Commit

Permalink
cmake: introduce an option ENABLE_INTERNAL_TESTS
Browse files Browse the repository at this point in the history
The patch introduce an option ENABLE_INTERNAL_TESTS, it is
disabled by default.

Follows up commit 2ec5436 ("libluamut: initial version").
  • Loading branch information
ligurio committed Aug 20, 2024
1 parent 3ddc43f commit 033f8f9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ jobs:
run: |
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
-DUSE_LUA=ON -DENABLE_BUILD_PROTOBUF=OFF \
-DENABLE_INTERNAL_TESTS=ON \
-G Ninja -S . -B build
if: ${{ matrix.LUA == 'lua' }}

- name: Running CMake (LuaJIT -current)
run: |
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
-DUSE_LUAJIT=ON -DENABLE_BUILD_PROTOBUF=OFF \
-DENABLE_INTERNAL_TESTS=ON \
-G Ninja -S . -B build
if: ${{ matrix.LUA == 'luajit' }}

Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ option(ENABLE_LUAJIT_RANDOM_RA "Enable randomness in a register allocation" OFF)
option(OSS_FUZZ "Enable support of OSS Fuzz" OFF)
option(ENABLE_BUILD_PROTOBUF "Enable building Protobuf library" ON)
option(ENABLE_BONUS_TESTS "Enable bonus tests" OFF)
option(ENABLE_INTERNAL_TESTS "Enable internal tests" OFF)

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
set(CMAKE_INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_INCLUDE_PATH})
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ is LuaJIT-specific.
- `OSS_FUZZ` enables support of OSS Fuzz.
- `ENABLE_BUILD_PROTOBUF` enables building Protobuf library, otherwise system
library is used.
- `ENABLE_INTERNAL_TESTS` enables internal tests.

### Running

Expand Down
4 changes: 3 additions & 1 deletion libluamut/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ target_include_directories(${LIB_LUA_CROSSOVER} PRIVATE ${LUA_INCLUDE_DIR})
target_compile_options(${LIB_LUA_CROSSOVER} PRIVATE ${CFLAGS})
add_dependencies(${LIB_LUA_CROSSOVER} ${LUA_TARGET})

add_subdirectory(tests)
if (ENABLE_INTERNAL_TESTS)
add_subdirectory(tests)
endif()

0 comments on commit 033f8f9

Please sign in to comment.