mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
update samples and benchmarks build, work on ci scripts
This commit is contained in:
parent
9cdf31065c
commit
ba533688c3
|
@ -10,7 +10,14 @@ environment:
|
|||
- STATIC: ON
|
||||
|
||||
init: []
|
||||
install: []
|
||||
install:
|
||||
- git clone https://github.com/Microsoft/vcpkg
|
||||
- cd vcpkg
|
||||
- powershell -exec bypass scripts\bootstrap.ps1
|
||||
- vcpkg install cryptopp zlib
|
||||
- vcpkg integrate install
|
||||
- cd ..
|
||||
|
||||
before_build:
|
||||
- git submodule update --init
|
||||
- cmake -H. -Bbuild -G"Visual Studio 14 2015 Win64" -DSTATIC=%STATIC% -DSAMPLES=ON -DBENCHMARKS=ON
|
||||
|
|
|
@ -17,7 +17,7 @@ matrix:
|
|||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-6
|
||||
- g++-6 zlib cryptopp
|
||||
env:
|
||||
- COMPILER=g++-6
|
||||
- COVERAGE=OFF
|
||||
|
|
|
@ -1,28 +1,19 @@
|
|||
cmake_minimum_required(VERSION 3.1)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/common.cmake)
|
||||
project(${LIBRARY_NAME}.benchmarks VERSION ${LIBRARY_VERSION} LANGUAGES CXX)
|
||||
project(xlnt.benchmarks)
|
||||
|
||||
if(NOT COMBINED_PROJECT)
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../source ${CMAKE_CURRENT_BINARY_DIR}/source)
|
||||
add_subdirectory(${LIBRARY_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/source)
|
||||
endif()
|
||||
|
||||
include_directories(${LIBRARY_INCLUDE_DIR})
|
||||
|
||||
file(GLOB SAMPLE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
||||
|
||||
if(NOT MSVC)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
find_package(Threads REQUIRED)
|
||||
endif()
|
||||
|
||||
foreach(SAMPLE_SOURCE IN ITEMS ${SAMPLE_SOURCES})
|
||||
get_filename_component(SAMPLE_NAME ${SAMPLE_SOURCE} NAME_WE)
|
||||
set(SAMPLE_EXECUTABLE benchmark-${SAMPLE_NAME})
|
||||
add_executable(${SAMPLE_EXECUTABLE} ${SAMPLE_SOURCE})
|
||||
target_link_libraries(${SAMPLE_EXECUTABLE} ${LIBRARY_NAME})
|
||||
if(NOT MSVC)
|
||||
target_link_libraries(${SAMPLE_EXECUTABLE} Threads::Threads)
|
||||
endif()
|
||||
target_link_libraries(${SAMPLE_EXECUTABLE} xlnt)
|
||||
endforeach()
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/data
|
||||
|
|
|
@ -1,28 +1,22 @@
|
|||
cmake_minimum_required(VERSION 3.1)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/common.cmake)
|
||||
project(${LIBRARY_NAME}.samples VERSION ${LIBRARY_VERSION} LANGUAGES CXX C)
|
||||
project(xlnt.samples)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
if(NOT COMBINED_PROJECT)
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../source ${CMAKE_CURRENT_BINARY_DIR}/source)
|
||||
add_subdirectory(${LIBRARY_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/source)
|
||||
endif()
|
||||
|
||||
include_directories(${LIBRARY_INCLUDE_DIR})
|
||||
|
||||
file(GLOB SAMPLE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
||||
|
||||
if(NOT MSVC)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
find_package(Threads REQUIRED)
|
||||
endif()
|
||||
|
||||
foreach(SAMPLE_SOURCE IN ITEMS ${SAMPLE_SOURCES})
|
||||
get_filename_component(SAMPLE_NAME ${SAMPLE_SOURCE} NAME_WE)
|
||||
set(SAMPLE_EXECUTABLE sample-${SAMPLE_NAME})
|
||||
add_executable(${SAMPLE_EXECUTABLE} ${SAMPLE_SOURCE})
|
||||
target_link_libraries(${SAMPLE_EXECUTABLE} ${LIBRARY_NAME})
|
||||
if(NOT MSVC)
|
||||
target_link_libraries(${SAMPLE_EXECUTABLE} Threads::Threads)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/data
|
||||
|
|
Loading…
Reference in New Issue
Block a user