[ 
https://issues.apache.org/jira/browse/XALANC-776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Roger Leigh reassigned XALANC-776:
----------------------------------

         Fix Version/s: 1.12
     Affects Version/s: 1.11
              Assignee: Roger Leigh  (was: Steven J. Hathaway)
    Remaining Estimate: 504h
     Original Estimate: 504h

> Add CMake build system
> ----------------------
>
>                 Key: XALANC-776
>                 URL: https://issues.apache.org/jira/browse/XALANC-776
>             Project: XalanC
>          Issue Type: Improvement
>          Components: XalanC
>    Affects Versions: 1.11
>            Reporter: Roger Leigh
>            Assignee: Roger Leigh
>            Priority: Major
>              Labels: build, cmake, patch
>             Fix For: 1.12
>
>         Attachments: 0001-Add-CMake-build-system.patch
>
>   Original Estimate: 504h
>  Remaining Estimate: 504h
>
> h4. Introduction
> The attached patch implements a CMake build for Xalan-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 on several platforms. The existing GNU autotools build and MSVC project 
> builds will continue to function and are unaffected by this addition.
> This is a companion to https://issues.apache.org/jira/browse/XERCESC-2077 
> which was merged last year and included in Xerces-C++ 3.2.0.  I mentioned 
> this work on the list last year in 
> https://marc.info/?l=xalan-dev&m=149748238016328&w=2
> 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 Xalan-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. 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 the 
> existing autoconf build logic.  The automake Makefile.am logic is directly 
> represented in the corresponding CMakeLists.txt files.
> Unfortunately, and unlike for Xerces, the Xalan Autoconf build is in a very 
> bad state, and it's become increasingly unusable over time.  It has these 
> major problems:
>  * No feature tests.  Platform-specific behaviour is hardcoded in 
> "Include/XXXDefinitions.hpp" files which is inflexible and not future-proof 
> as platforms evolve.  Autoconf feature tests could be used like in Xerces-C++
>  * No Autoconf enable/with options.  Configuration is with a hacky and 
> nonportable "runConfigure" script which works around the lack of options.
>  * MinGW64 is broken right now because of a lack of feature test for gmtime_r 
> / localtime_r, for example.  The static platform configuration says it 
> doesn't have these functions, but it does and the build breaks because Xalan 
> unnecessarily redefines them.
> The patch included here can't solve all these problems.  But right now I'm 
> finding it extremely hard to build and install Xalan on a range of platforms, 
> and the amount of effort required to patch all of the Project/Solution files, 
> Autoconf/Automake files and platform-specific headers is untenable.  This 
> CMake build will work on every platform.
> Some feature tests do require adding to the CMake build, replacing the 
> Platform-specific headers, but I've not done that in this inital patch, which 
> has a smaller scope of working with the existing headers without making any 
> major changes.
> I'm prepared to do the extra work to bring this up to the equivalent state as 
> already done for Xerces-C++ which will allow these libraries to build on all 
> contemporary platforms.  This includes fixing it to work with C++17 as 
> reported separately by another user.
>  
> Kind regards,
> Roger



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@xalan.apache.org
For additional commands, e-mail: dev-h...@xalan.apache.org

Reply via email to