Skip to content
This repository

CMake? #10

Closed
Groovounet opened this Issue · 9 comments

3 participants

Christophe Riccio Lee Thomason Guillermo A. Amaral
Christophe Riccio

Hi,

This is a feature request not a bug: have you considered using CMake?
It makes the project very portable...

Thanks,
Christophe

Lee Thomason
Owner

I haven't, honestly. With only 2 cpp files, building is pretty straightforward. I wouldn't mind including a sub-directory with the CMake setup, but I don't want to take the time to test / maintain it.

Christophe Riccio

Using CMake directly provide support for any platform and compiler supported by CMake.
I think using CMake will reduce the among of effort for maintaining the solution.

With my pull request you benefit from out of source build why avoid to pollute the source with the compiler generated files.

I can also update the CMakeFiles to support CTest, giving you an easy test framework to expend your tests over time.

Guillermo A. Amaral

IMHO CMake seems like overkill for a single file solution that in reality should just be embedded into the target project, the build system used now is more focused on building the test file and that's it (Lee can correct me if I'm wrong). It might take more time to get CMake setup, the project configured and generated than it would building the actual code base itself.

But... as a CMake fan and avid user, I do see the pro's of having it around, specially if built inside a bigger CMake project (which I do myself).

I dunno, it's up to Lee.

Lee Thomason
Owner

Yes, I'm rather nervous about this. Portability is generally good, but any place the cmake/project framework doesn't work becomes a bug...and a bug in the project file for the test framework. Groovounet, I appreciate the patch, but this one feels like more work than the value it will add.

The current patches cover VC, XCode, and gcc, which is pretty broad coverage.

Christophe Riccio

I personal think that using a Visual C++ solution is an overkill. ;)

I also want to use TinyXML in a larger project but will separately.

Guillermo A. Amaral

@Groovounet This is how I "usually" use TX(2) with my project + CMake:

https://github.com/gamaral/marshmallow_h/tree/master/contrib/tinyxml2

That way I can update it automagically using git submodule, works pretty well. :)

Lee Thomason
Owner

Visual C++ overkill. :) Yeah, as my primary development platform, you are all burdened/benefited by that. :)

Lee Thomason
Owner

Once we had the example file issue nailed down, this made more sense. Integrated. Closing thread.

Christophe Riccio

Nice! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.