mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
GitHub Actions: Add libxls and tests
PiperOrigin-RevId: 454835693 Change-Id: I575ef9519ca829a2d4815e2dde4348cb9a42f36c
This commit is contained in:
parent
45d4b1ba5b
commit
3cb19e7378
1
.github/workflows/ubuntu-cmake-contrib.yml
vendored
1
.github/workflows/ubuntu-cmake-contrib.yml
vendored
|
@ -18,6 +18,7 @@ jobs:
|
||||||
- libidn2
|
- libidn2
|
||||||
- libraw
|
- libraw
|
||||||
- libtiff
|
- libtiff
|
||||||
|
- libxls
|
||||||
- lodepng
|
- lodepng
|
||||||
- pffft
|
- pffft
|
||||||
ignore-errors: [true]
|
ignore-errors: [true]
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
cmake_minimum_required(VERSION 3.13..3.22)
|
cmake_minimum_required(VERSION 3.13..3.22)
|
||||||
project(sapi_libxls C CXX)
|
project(sapi_libxls C CXX)
|
||||||
include(CTest)
|
include(CTest)
|
||||||
|
include(GoogleTest)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||||
|
@ -28,7 +29,7 @@ endif()
|
||||||
|
|
||||||
FetchContent_Declare(libxls
|
FetchContent_Declare(libxls
|
||||||
GIT_REPOSITORY https://github.com/libxls/libxls.git
|
GIT_REPOSITORY https://github.com/libxls/libxls.git
|
||||||
GIT_TAG 448240067919707eb95fb009f76f3fdb439b1427
|
GIT_TAG 448240067919707eb95fb009f76f3fdb439b1427 # 2021-01-04
|
||||||
)
|
)
|
||||||
|
|
||||||
FetchContent_GetProperties(libxls)
|
FetchContent_GetProperties(libxls)
|
||||||
|
@ -72,7 +73,6 @@ add_library(libxls STATIC
|
||||||
"${libxls_SOURCE_DIR}/src/xls.c"
|
"${libxls_SOURCE_DIR}/src/xls.c"
|
||||||
"${libxls_SOURCE_DIR}/src/xlstool.c"
|
"${libxls_SOURCE_DIR}/src/xlstool.c"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(libxls PUBLIC
|
target_include_directories(libxls PUBLIC
|
||||||
"${libxls_SOURCE_DIR}"
|
"${libxls_SOURCE_DIR}"
|
||||||
"${libxls_SOURCE_DIR}/include"
|
"${libxls_SOURCE_DIR}/include"
|
||||||
|
@ -102,10 +102,10 @@ target_include_directories(sapi_libxls INTERFACE
|
||||||
"${PROJECT_BINARY_DIR}"
|
"${PROJECT_BINARY_DIR}"
|
||||||
)
|
)
|
||||||
|
|
||||||
if(SAPI_ENABLE_EXAMPLES)
|
if(SAPI_BUILD_EXAMPLES)
|
||||||
add_subdirectory(example)
|
add_subdirectory(example)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(SAPI_ENABLE_TESTS)
|
if(BUILD_TESTING AND SAPI_BUILD_TESTING)
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -25,4 +25,6 @@ target_link_libraries(sapi_libxls_test
|
||||||
sapi::test_main
|
sapi::test_main
|
||||||
)
|
)
|
||||||
|
|
||||||
gtest_discover_tests(sapi_libxls_test PROPERTIES ENVIRONMENT "TEST_FILES_DIR=${PROJECT_SOURCE_DIR}/files")
|
gtest_discover_tests(sapi_libxls_test PROPERTIES
|
||||||
|
ENVIRONMENT "TEST_FILES_DIR=${PROJECT_SOURCE_DIR}/files"
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user