diff --git a/.appveyor.yml b/.appveyor.yml index 8f85e140..ca280af4 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -24,7 +24,7 @@ before_build: - git submodule update --init --recursive - mkdir build - cd build - - cmake -G "Visual Studio 14 2015" -D CMAKE_GENERATOR_PLATFORM=%platform% -D STATIC=%STATIC% -D SAMPLES=ON -D BENCHMARKS=ON .. + - cmake -G "Visual Studio 14 2015" -D CMAKE_GENERATOR_PLATFORM=%platform% -D STATIC=%STATIC% -D SAMPLES=ON -D BENCHMARKS=ON -D TESTS=ON .. build: project: build/xlnt_all.sln diff --git a/.circleci/config.yml b/.circleci/config.yml index fa2b3186..e3d2a887 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,7 +26,7 @@ jobs: steps: - checkout - run: git submodule update --init --recursive - - run: cmake -D XLNT_CXX_LANG=<< parameters.cxx-ver >> -D STATIC=<< parameters.static >> -D BENCHMARKS=<< parameters.benchmarks >> -D SAMPLES=<< parameters.samples >> -D COVERAGE=<< parameters.coverage >> -D CMAKE_BUILD_TYPE=<< parameters.build-type >> . + - run: cmake -D XLNT_CXX_LANG=<< parameters.cxx-ver >> -D STATIC=<< parameters.static >> -D BENCHMARKS=<< parameters.benchmarks >> -D TESTS=ON -D SAMPLES=<< parameters.samples >> -D COVERAGE=<< parameters.coverage >> -D CMAKE_BUILD_TYPE=<< parameters.build-type >> . - run: cmake --build . -- -j2 - run: ./tests/xlnt.test - when: diff --git a/CMakeLists.txt b/CMakeLists.txt index 04be58e9..a9ed23fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ endif() # Optional components -option(TESTS "Set to OFF to skip building test executable (in ./tests)" ON) +option(TESTS "Set to ON to build test executable (in ./tests)" OFF) option(SAMPLES "Set to ON to build executable code samples (in ./samples)" OFF) option(BENCHMARKS "Set to ON to build performance benchmarks (in ./benchmarks)" OFF) option(PYTHON "Set to ON to build Arrow conversion functions (in ./python)" OFF) diff --git a/README.md b/README.md index 742d3a72..18484d38 100644 --- a/README.md +++ b/README.md @@ -36,5 +36,17 @@ int main() Documentation for the current release of xlnt is available [here](https://tfussell.gitbooks.io/xlnt/content/). +## Building xlnt - Using vcpkg + +You can download and install xlnt using the [vcpkg](https://github.com/microsoft/vcpkg) dependency manager: + + git clone https://github.com/microsoft/vcpkg.git + cd vcpkg + ./bootstrap-vcpkg.sh + ./vcpkg integrate install + ./vcpkg install xlnt + +The xlnt port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/microsoft/vcpkg) on the vcpkg repository. + ## License xlnt is released to the public for free under the terms of the MIT License. See [LICENSE.md](https://github.com/tfussell/xlnt/blob/master/LICENSE.md) for the full text of the license and the licenses of xlnt's third-party dependencies. [LICENSE.md](https://github.com/tfussell/xlnt/blob/master/LICENSE.md) should be distributed alongside any assemblies that use xlnt in source or compiled form. diff --git a/include/xlnt/utils/numeric.hpp b/include/xlnt/utils/numeric.hpp index ed1eee83..90129133 100644 --- a/include/xlnt/utils/numeric.hpp +++ b/include/xlnt/utils/numeric.hpp @@ -51,7 +51,7 @@ constexpr Number abs(Number val) /// constexpr max /// template -constexpr typename std::common_type::type max(NumberL lval, NumberR rval) +constexpr typename std::common_type::type (max)(NumberL lval, NumberR rval) { return (lval < rval) ? rval : lval; } @@ -60,7 +60,7 @@ constexpr typename std::common_type::type max(NumberL lval, Nu /// constexpr min /// template -constexpr typename std::common_type::type min(NumberL lval, NumberR rval) +constexpr typename std::common_type::type (min)(NumberL lval, NumberR rval) { return (lval < rval) ? lval : rval; } diff --git a/include/xlnt/xlnt_config.hpp b/include/xlnt/xlnt_config.hpp index 73567629..642cd245 100644 --- a/include/xlnt/xlnt_config.hpp +++ b/include/xlnt/xlnt_config.hpp @@ -28,10 +28,14 @@ #ifdef XLNT_EXPORT #define XLNT_API __declspec(dllexport) #else +#ifdef XLNT_SHARED // For clients of the library, supress warnings about DLL interfaces for standard library classes #pragma warning(disable : 4251) #pragma warning(disable : 4275) #define XLNT_API __declspec(dllimport) +#else +#define XLNT_API +#endif #endif #else #define XLNT_API