From 707abfb94145b8c82542b97ccc5492085eee1bba Mon Sep 17 00:00:00 2001 From: Teebonne <80053070+Teebonne@users.noreply.github.com> Date: Tue, 30 Aug 2022 00:45:23 +0100 Subject: [PATCH 1/7] option OFF by default for building test executable It seems better to leave the option OFF by default for building test executable --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From 381b33ecc74d8368c43baf17f33e53b8221d4fc5 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 1 Sep 2022 14:41:44 +0800 Subject: [PATCH 2/7] Add vcpkg installation instructions --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 742d3a72..80b72839 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/Mixlntosoft/vcpkg) dependency manager: + + git clone https://github.com/Mixlntosoft/vcpkg.git + cd vcpkg + ./bootstrap-vcpkg.sh + ./vcpkg integrate install + ./vcpkg install xlnt + +The xlnt port in vcpkg is kept up to date by Mixlntosoft team members and community contributors. If the version is out of date, please [xlnteate an issue or pull request](https://github.com/Mixlntosoft/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. From a6ff22e95b42d3bbbe2bfa41a823f631565c61b8 Mon Sep 17 00:00:00 2001 From: Teebonne <80053070+Teebonne@users.noreply.github.com> Date: Sat, 3 Sep 2022 22:28:38 +0100 Subject: [PATCH 3/7] Fixes error LNK2019: unresolved external symbol This fixes the error LNK2019: unresolved external symbol "__declspec(dllimport) public: that I had. --- include/xlnt/xlnt_config.hpp | 4 ++++ 1 file changed, 4 insertions(+) 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 From 73f518ca987a213ace044c37ab3b3b65fd5fc198 Mon Sep 17 00:00:00 2001 From: Teebonne <80053070+Teebonne@users.noreply.github.com> Date: Thu, 8 Sep 2022 20:42:17 +0100 Subject: [PATCH 4/7] Disambiguation from other max/min functions Disambiguation from other max/min functions --- include/xlnt/utils/numeric.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } From d88a84ff1b1ae020d3a4a410fb09dde7e811febb Mon Sep 17 00:00:00 2001 From: Teebonne <80053070+Teebonne@users.noreply.github.com> Date: Sun, 9 Oct 2022 16:45:55 +0100 Subject: [PATCH 5/7] Update .appveyor.yml --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From e9f937eefc2f512b2ff090f1fc22b6d9758c38a9 Mon Sep 17 00:00:00 2001 From: Teebonne <80053070+Teebonne@users.noreply.github.com> Date: Sun, 9 Oct 2022 16:46:51 +0100 Subject: [PATCH 6/7] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: From d9606cb0ae64afda335862ae2474cb13fcd648e8 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Mon, 10 Oct 2022 09:53:54 +0800 Subject: [PATCH 7/7] Apply review suggesstion --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 80b72839..18484d38 100644 --- a/README.md +++ b/README.md @@ -38,15 +38,15 @@ Documentation for the current release of xlnt is available [here](https://tfusse ## Building xlnt - Using vcpkg -You can download and install xlnt using the [vcpkg](https://github.com/Mixlntosoft/vcpkg) dependency manager: +You can download and install xlnt using the [vcpkg](https://github.com/microsoft/vcpkg) dependency manager: - git clone https://github.com/Mixlntosoft/vcpkg.git + 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 Mixlntosoft team members and community contributors. If the version is out of date, please [xlnteate an issue or pull request](https://github.com/Mixlntosoft/vcpkg) on the vcpkg repository. +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.