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

Fix/test building default #23

Merged
merged 2 commits into from
May 30, 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
4 changes: 3 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
BUILD_TESTING: ON
WITH_SWIG: ON
SWIG_WITH_PYTHON: ON

jobs:
test:
Expand All @@ -33,7 +35,7 @@ jobs:
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTING=${{env.BUILD_TESTING}}
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTING=${{env.BUILD_TESTING}} -DWITH_SWIG=${{env.WITH_SWIG}} -DSWIG_WITH_PYTHON=${{env.SWIG_WITH_PYTHON}}

- name: Build
# Build your program with the given configuration
Expand Down
6 changes: 1 addition & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,13 @@ set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--disable-new-dtags")

# Build flags
set(BUILDING_FOR_ANDROID OFF CACHE BOOL "Building for Android")
set(BUILD_TESTING OFF CACHE BOOL "Enable testing")

# Swig flags
set(WITH_SWIG OFF CACHE BOOL "Enable swigging")
set(SWIG_WITH_JAVA OFF CACHE BOOL "Swig to target-language java")
set(SWIG_WITH_PYTHON OFF CACHE BOOL "Swig to target-language python")

if (BUILD_TESTING)
set(WITH_SWIG ON)
set(SWIG_WITH_PYTHON ON)
endif()

if(SWIG_WITH_JAVA)
set(SWIG_TARGET_LANG java)
add_compile_definitions(WITH_SWIG)
Expand Down
Loading