Discussion:
CMake support
Roger Leigh
2015-06-23 15:08:03 UTC
Permalink
Dear all,

Firstly, hello. I am Roger Leigh, a C++ developer currently working on
a project (Bio-Formats-C++) which makes use of Xerces-C++.

One of the parts of this role is integrating several upstream projects,
of which xerces is one, into a larger project which needs to build on
Unix/Linux/Windows. While the xerces-c project provides an
autotools-based build and several different visual studio solution
files, I was wondering if you had considered the use of a tool such as
CMake, which can generate solution files for all visual studio versions
(including 2015), Makefiles, and project files for a number of IDEs,
including Eclipse? This allows all the platforms to be supported well
from a common set of build rules, and means you don't need to maintain
separate solutions for each visual studio release.

The reason for asking is that over the course of the last few weeks,
I've converted several open source projects from autotools+separate msvc
builds to a unified cmake build and submitted these to their upstream
developers. If this is something you would find beneficial and useful,
then I would be happy to do the same for xerces-c. This can, of course,
co-exist with the existing build systems.


Kind regards,
Roger Leigh
--
Dr Roger Leigh -- Open Microscopy Environment
Wellcome Trust Centre for Gene Regulation and Expression,
College of Life Sciences, University of Dundee, Dow Street,
Dundee DD1 5EH Scotland UK Tel: (01382) 386364

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-***@xerces.apache.org
For additional commands, e-mail: c-dev-***@xerces.apache.org
r***@codelibre.net
2015-07-08 10:07:26 UTC
Permalink
Post by Roger Leigh
While the xerces-c project provides an
autotools-based build and several different visual studio solution
files, I was wondering if you had considered the use of a tool such as
CMake, which can generate solution files for all visual studio versions
(including 2015), Makefiles, and project files for a number of IDEs,
including Eclipse? This allows all the platforms to be supported well
from a common set of build rules, and means you don't need to maintain
separate solutions for each visual studio release.
I didn't see any response to this unless I missed it.

In the interim, I've been trying to use the provided VC solution/project
files, and I've run into some problems. The "ICU Debug" and "ICU Release"
configurations are broken for all the VC versions I've looked at (10, 11
and 12), likely applicable to all versions. They don't link against the
libicuuc[d].lib libraries for any of the x64 platform variants. And they
don't link against the debug library for the debug configuration variants.

The following patch demonstrates a possible fix for VC12, which should
apply to all previous versions as well.

Regarding CMake support, this discrepancy could have been easily avoided
by having a simple feature test and option for ICU support, rather than a
combinatorial explosion of configurations, platforms and VC versions. My
offer to add such support still stands, should you wish to take advantage
of it.

Kind regards,
Roger

$ diff -urN xerces-c-3.1.2.orig xerces-c-3.1.2
diff -urN
xerces-c-3.1.2.orig/projects/Win32/VC12/xerces-all/XercesLib/XercesLib.vcxproj
xerces-c-3.1.2/projects/Win32/VC12/xerces-all/XercesLib/XercesLib.vcxproj
---
xerces-c-3.1.2.orig/projects/Win32/VC12/xerces-all/XercesLib/XercesLib.vcxproj
2015-03-09 22:45:53.000000000 +0000
+++
xerces-c-3.1.2/projects/Win32/VC12/xerces-all/XercesLib/XercesLib.vcxproj
2015-07-08 09:34:52.888900100 +0000
@@ -1,4 +1,4 @@
-&#65279;<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
@@ -538,7 +538,7 @@
</ResourceCompile>
<Link>
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
-
<AdditionalDependencies>ws2_32.lib;advapi32.lib;icuuc.lib;%(AdditionalDependencies)</AdditionalDependencies>
+
<AdditionalDependencies>ws2_32.lib;advapi32.lib;icuucd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(TargetPath)</OutputFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -578,7 +578,7 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
-
<AdditionalDependencies>ws2_32.lib;advapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+
<AdditionalDependencies>ws2_32.lib;advapi32.lib;icuucd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(TargetPath)</OutputFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -669,7 +669,7 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
-
<AdditionalDependencies>ws2_32.lib;advapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+
<AdditionalDependencies>ws2_32.lib;advapi32.lib;icuuc.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(TargetPath)</OutputFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
--
Dr Roger Leigh -- Open Microscopy Environment
Wellcome Trust Centre for Gene Regulation and Expression,
College of Life Sciences, University of Dundee, Dow Street,
Dundee DD1 5EH Scotland UK Tel: (01382) 386364


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-***@xerces.apache.org
For additional commands, e-mail: c-dev-***@xerces.apache.org
Cantor, Scott
2015-07-09 03:11:38 UTC
Permalink
Post by r***@codelibre.net
I didn't see any response to this unless I missed it.
There is very little active energy around this project, you'll get a sense of that from the list archives.
Post by r***@codelibre.net
The following patch demonstrates a possible fix for VC12, which should
apply to all previous versions as well.
You can file issues and attach patches in Jira [1] so that if there ever is a release, there's at least the possibility it might get included. The mail archive alone won't lead to that generally.
Post by r***@codelibre.net
Regarding CMake support, this discrepancy could have been easily avoided
by having a simple feature test and option for ICU support, rather than a
combinatorial explosion of configurations, platforms and VC versions. My
offer to add such support still stands, should you wish to take advantage
of it.
Just a personal perspective, but everybody has their favorite tools and the one common denominator is that nobody else knows them and that means unless you're prepared to be "the" guy for an extended period, the payoff isn't generally worth it.

I'm not arguing for the current state, just noting the problem with anything that's not familiar to the masses. Features aren't usually enough.

-- Scott

[1] https://issues.apache.org/jira/browse/XERCESC

Т���������������������������������������������������������������������ХF�V�7V'67&�&R�R���â2�FWb�V�7V'67&�&T�W&6W2�6�R��&pФf�"FF�F����6����G2�R
Loading...