diff --git a/.appveyor.yml b/.appveyor.yml index 1c1e9b4b..b9a1927d 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -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 diff --git a/.travis.yml b/.travis.yml index d75c4d90..8668058d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ matrix: sources: - ubuntu-toolchain-r-test packages: - - g++-6 + - g++-6 zlib cryptopp env: - COMPILER=g++-6 - COVERAGE=OFF diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt index 8aae30fe..922f3e42 100644 --- a/benchmarks/CMakeLists.txt +++ b/benchmarks/CMakeLists.txt @@ -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 diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index 98f01c8d..06b887fd 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -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