Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: introduce an option ENABLE_INTERNAL_TESTS #103

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()