[jira] [Updated] (XERCESC-2077) Add CMake build system
[ https://issues.apache.org/jira/browse/XERCESC-2077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Roger Leigh updated XERCESC-2077: - Description: h4. Introduction The attached patch implements a CMake build for Xerces-C++. I have spent significant effort performing a "comprehensive" conversion of the existing GNU autotools and MSVC project file logic to a unified CMake build which supports all platforms with a single set of build files, as well as testing it exhaustively (see below). The existing GNU autotools build and MSVC project builds will continue to function and are unaffected by this addition. h5. References - http://mail-archives.apache.org/mod_mbox/xerces-c-dev/201302.mbox/browser - http://mail-archives.apache.org/mod_mbox/xerces-c-dev/201506.mbox/browser - https://github.com/rleigh-codelibre/xerces-c/tree/cmake-3.1 h4. Background CMake is a meta-build system which generates the build files for a specified build system, such as make, Visual Studio msbuild, nmake, ninja or a number of other build tools and IDEs. This allows Xerces-C++ to be built on any supported platform with the native tools for that platform. The reason why I originally needed this was due to the large maintenance burden of patching the provided Visual Studio project files, both for fixing bugs in those files and in being able to support versions of Visual Studio which aren't yet supported by the provided project files or for unsupported configurations e.g. Clang/C2, other platforms etc. The lack of an install target also meant that to integrate this with a larger build required manually copying bits out of the build tree. The cost of debugging and patching the existing project files for use in our CI builds was getting too great--maintaining and using this CMake build out of tree will be cheaper and more robust. However, given that other people have also requested such support in the past, I thought it might benefit others to have this merged upstream so that it would be available to the benefit of all. I have done a direct conversion of every autoconf option and feature test. Where there wasn't a direct CMake equivalent, I've written each feature test to exactly match the autoconf behaviour. The automake Makefile.am logic is directly represented in the corresponding CMakeLists.txt files. Broadly: ||Autotools||CMake|| |{{configure.ac}}, {{Makefile.am}}|{{CMakeLists.txt}}| |{{*/Makefile.am}}|{{*/CMakeLists.txt}}| |{{m4/*}}|{{cmake/*}}| |{{src/xercesc/util/Xerces_autoconf_config.hpp.in}}|{{src/xercesc/util/Xerces_autoconf_config.hpp.cmake.in}}| |_autoheader_|config.h.cmake.in| |{{tools/createdocs.sh}}|{{CMakeLists.txt}} (custom target)| |{{scripts/sanityTest.pl}}|{{cmake/XercesTest.cmake}} (direct support)| |{{scripts/sanityTest_ExpectedResult.log}}|{{test/expected/\*}}, {{samples/expected/\*}} (individual log files)| And there's a section added to the documentation giving an overview of how to use it, in the same style as the autotools section. h5. Enhancements over the existing build systems - Universal build for any platform and build system supported by CMake - Full support for feature and library detection on Windows, including discovery of ICU libraries; it's no longer static, using (long broken) ICU configurations in the project files - An install target now exists on Windows, so the various pieces don't need manually copying out of the build tree - Parallel build speed improvements when using ninja to replace make or msbuild; the speedup with the latter is significant - Export of CMake configuration in addition to pkg-config, to make Xerces-C++ integrate with downstream projects using Xerces-C++ and cmake; this includes all dependency information of the libraries Xerces was linked with, i.e. transitive dependencies. - Installs the HTML documentation - Targets are provided for regenerating the documentation (docs and apidocs) - Documentation can be edited and rebuilt from within Visual Studio - Unit tests can be run on all supported platforms - Unit tests can be run in parallel - Unit tests verify individual test output on all platforms - Unit tests can be run from within Visual Studio - All the Visual Studio projects are grouped into categories (Documentation, Library, Samples, Tests), making it neater and easier to navigate than with the existing solution files h5. Known differences: - The library naming differences have been resolved. On Unix platforms the libtool -release conventions are followed. On Windows with Visual Studio the project file conventions are followed. h4. Maintenance The logic in all files directly matches the corresponding autotools files to the maximum extent possible. For most updates to the autotools logic, the corresponding cmake change should be trivial and obvious, for example adding or removing source files from src/Makefile.am or altering the support
Re: Integrating CMake support for xerces
On 2017-05-17 17:30, Cantor, Scott wrote: On 5/17/17, 12:21 PM, "rle...@codelibre.net" wrote: I spoke too soon; it's not working for the VS generators on Windows when using multiple configurations. I'll fix this up tomorrow. FWIW, the names currently are the same for 32 and 64 builds. That probably is as much because of the timing of them being added, but it does also relate to the cross-platform point you had, people on Windows doing dual arch builds don't tend to use different names for the files (at least not that I've seen) since they tend to just copy their old makefiles and projects to 64-bit. The issue was more related to the debug/release DLL names in the .rc file than 32/64-bit names. I've fixed this detail up, and updated the patch is in JIRA. It should now work across to board. https://issues.apache.org/jira/secure/attachment/12868727/0002-cmake-Align-versioning-with-Autotools-and-Visual-Stu.patch Regards, Roger - To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: c-dev-h...@xerces.apache.org
[jira] [Updated] (XERCESC-2077) Add CMake build system
[ https://issues.apache.org/jira/browse/XERCESC-2077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Roger Leigh updated XERCESC-2077: - Attachment: 0002-cmake-Align-versioning-with-Autotools-and-Visual-Stu.patch Updated patch to match library versioning with the existing build systems. > Add CMake build system > -- > > Key: XERCESC-2077 > URL: https://issues.apache.org/jira/browse/XERCESC-2077 > Project: Xerces-C++ > Issue Type: New Feature > Components: Build >Affects Versions: 3.1.4 > Environment: All >Reporter: Roger Leigh > Labels: build, cmake, patch > Attachments: 0001-cmake-Add-CMake-build-system.patch, > 0001-cmake-Add-CMake-build-system-trunk.patch, > 0002-cmake-Align-versioning-with-Autotools-and-Visual-Stu.patch, > screenshot-xerces-ci-tests-trunk.png > > > h4. Introduction > The attached patch implements a CMake build for Xerces-C++. > I have spent significant effort performing a "comprehensive" conversion of > the existing GNU autotools and MSVC project file logic to a unified CMake > build which supports all platforms with a single set of build files, as well > as testing it exhaustively (see below). The existing GNU autotools build and > MSVC project builds will continue to function and are unaffected by this > addition. > h5. References > - http://mail-archives.apache.org/mod_mbox/xerces-c-dev/201302.mbox/browser > - http://mail-archives.apache.org/mod_mbox/xerces-c-dev/201506.mbox/browser > - https://github.com/rleigh-codelibre/xerces-c/tree/cmake-3.1 > h4. Background > CMake is a meta-build system which generates the build files for a specified > build system, such as make, Visual Studio msbuild, nmake, ninja or a number > of other build tools and IDEs. This allows Xerces-C++ to be built on any > supported platform with the native tools for that platform. > The reason why I originally needed this was due to the large maintenance > burden of patching the provided Visual Studio project files, both for fixing > bugs in those files and in being able to support versions of Visual Studio > which aren't yet supported by the provided project files or for unsupported > configurations e.g. Clang/C2, other platforms etc. The lack of an install > target also meant that to integrate this with a larger build required > manually copying bits out of the build tree. The cost of debugging and > patching the existing project files for use in our CI builds was getting too > great--maintaining and using this CMake build out of tree will be cheaper and > more robust. However, given that other people have also requested such > support in the past, I thought it might benefit others to have this merged > upstream so that it would be available to the benefit of all. > I have done a direct conversion of every autoconf option and feature test. > Where there wasn't a direct CMake equivalent, I've written each feature test > to exactly match the autoconf behaviour. The automake Makefile.am logic is > directly represented in the corresponding CMakeLists.txt files. Broadly: > ||Autotools||CMake|| > |{{configure.ac}}, {{Makefile.am}}|{{CMakeLists.txt}}| > |{{*/Makefile.am}}|{{*/CMakeLists.txt}}| > |{{m4/*}}|{{cmake/*}}| > |{{src/xercesc/util/Xerces_autoconf_config.hpp.in}}|{{src/xercesc/util/Xerces_autoconf_config.hpp.cmake.in}}| > |_autoheader_|config.h.cmake.in| > |{{tools/createdocs.sh}}|{{CMakeLists.txt}} (custom target)| > |{{scripts/sanityTest.pl}}|{{cmake/XercesTest.cmake}} (direct support)| > |{{scripts/sanityTest_ExpectedResult.log}}|{{test/expected/\*}}, > {{samples/expected/\*}} (individual log files)| > And there's a section added to the documentation giving an overview of how to > use it, in the same style as the autotools section. > h5. Enhancements over the existing build systems > - Universal build for any platform and build system supported by CMake > - Full support for feature and library detection on Windows, including > discovery of ICU libraries; it's no longer static, using (long broken) > ICU configurations in the project files > - An install target now exists on Windows, so the various pieces don't > need manually copying out of the build tree > - Parallel build speed improvements when using ninja to replace make > or msbuild; the speedup with the latter is significant > - Export of CMake configuration in addition to pkg-config, to make > Xerces-C++ integrate with downstream projects using Xerces-C++ and > cmake; this includes all dependency information of the libraries > Xerces was linked with, i.e. transitive dependencies. > - Installs the HTML documentation > - Targets are provided for regenerating the documentation (docs and > apidocs) > - Documentation can be edited and rebuilt from within Visual Studio > - Unit tests can be run on all supported platfo
[jira] [Updated] (XERCESC-2077) Add CMake build system
[ https://issues.apache.org/jira/browse/XERCESC-2077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Roger Leigh updated XERCESC-2077: - Attachment: (was: 0002-cmake-Align-versioning-with-Autotools-and-Visual-Stu.patch) > Add CMake build system > -- > > Key: XERCESC-2077 > URL: https://issues.apache.org/jira/browse/XERCESC-2077 > Project: Xerces-C++ > Issue Type: New Feature > Components: Build >Affects Versions: 3.1.4 > Environment: All >Reporter: Roger Leigh > Labels: build, cmake, patch > Attachments: 0001-cmake-Add-CMake-build-system.patch, > 0001-cmake-Add-CMake-build-system-trunk.patch, > screenshot-xerces-ci-tests-trunk.png > > > h4. Introduction > The attached patch implements a CMake build for Xerces-C++. > I have spent significant effort performing a "comprehensive" conversion of > the existing GNU autotools and MSVC project file logic to a unified CMake > build which supports all platforms with a single set of build files, as well > as testing it exhaustively (see below). The existing GNU autotools build and > MSVC project builds will continue to function and are unaffected by this > addition. > h5. References > - http://mail-archives.apache.org/mod_mbox/xerces-c-dev/201302.mbox/browser > - http://mail-archives.apache.org/mod_mbox/xerces-c-dev/201506.mbox/browser > - https://github.com/rleigh-codelibre/xerces-c/tree/cmake-3.1 > h4. Background > CMake is a meta-build system which generates the build files for a specified > build system, such as make, Visual Studio msbuild, nmake, ninja or a number > of other build tools and IDEs. This allows Xerces-C++ to be built on any > supported platform with the native tools for that platform. > The reason why I originally needed this was due to the large maintenance > burden of patching the provided Visual Studio project files, both for fixing > bugs in those files and in being able to support versions of Visual Studio > which aren't yet supported by the provided project files or for unsupported > configurations e.g. Clang/C2, other platforms etc. The lack of an install > target also meant that to integrate this with a larger build required > manually copying bits out of the build tree. The cost of debugging and > patching the existing project files for use in our CI builds was getting too > great--maintaining and using this CMake build out of tree will be cheaper and > more robust. However, given that other people have also requested such > support in the past, I thought it might benefit others to have this merged > upstream so that it would be available to the benefit of all. > I have done a direct conversion of every autoconf option and feature test. > Where there wasn't a direct CMake equivalent, I've written each feature test > to exactly match the autoconf behaviour. The automake Makefile.am logic is > directly represented in the corresponding CMakeLists.txt files. Broadly: > ||Autotools||CMake|| > |{{configure.ac}}, {{Makefile.am}}|{{CMakeLists.txt}}| > |{{*/Makefile.am}}|{{*/CMakeLists.txt}}| > |{{m4/*}}|{{cmake/*}}| > |{{src/xercesc/util/Xerces_autoconf_config.hpp.in}}|{{src/xercesc/util/Xerces_autoconf_config.hpp.cmake.in}}| > |_autoheader_|config.h.cmake.in| > |{{tools/createdocs.sh}}|{{CMakeLists.txt}} (custom target)| > |{{scripts/sanityTest.pl}}|{{cmake/XercesTest.cmake}} (direct support)| > |{{scripts/sanityTest_ExpectedResult.log}}|{{test/expected/\*}}, > {{samples/expected/\*}} (individual log files)| > And there's a section added to the documentation giving an overview of how to > use it, in the same style as the autotools section. > h5. Enhancements over the existing build systems > - Universal build for any platform and build system supported by CMake > - Full support for feature and library detection on Windows, including > discovery of ICU libraries; it's no longer static, using (long broken) > ICU configurations in the project files > - An install target now exists on Windows, so the various pieces don't > need manually copying out of the build tree > - Parallel build speed improvements when using ninja to replace make > or msbuild; the speedup with the latter is significant > - Export of CMake configuration in addition to pkg-config, to make > Xerces-C++ integrate with downstream projects using Xerces-C++ and > cmake; this includes all dependency information of the libraries > Xerces was linked with, i.e. transitive dependencies. > - Installs the HTML documentation > - Targets are provided for regenerating the documentation (docs and > apidocs) > - Documentation can be edited and rebuilt from within Visual Studio > - Unit tests can be run on all supported platforms > - Unit tests can be run in parallel > - Unit tests verify individual test output on all platforms > - Unit tests can be run fr