jp-embedded / scxmlcc

The SCXML state machine to C++ compiler
GNU General Public License v3.0
140 stars 34 forks source link

build with cmake #55

Closed aboseley closed 6 years ago

aboseley commented 6 years ago

Adds

Other ideas,

I could move all the cmake files to a separate cmake folder so they aren't scatter amongst the exiting directories, not sure what you think?

Currently the generation of the version header is done differently for windows and unix. I wanted to auto generate the same version in the cmake project - so I'm simply using 'git-describe' to generate teh version. There's obviously a good reason why your doing this differently in windows, so I've created a new file 'gitversion.h' to avoid messing up any existing version generation in the makefile.

jp-embedded commented 6 years ago

Very nice!

I don't think the cmake files needs to be moved to a seperate folder. The way you have made it makes the cmake files co-exist with the makefiles. I think that is fine.

Well the version is/should be the same on windows and unix. The thing is, the autorevision tool is currently not used on windows and therefore the postfix part of the version is currently left out on windows (in version.cpp) - I am mainly using linux. If it is possible to use the autorevision tool on windows I think that would be the best solution since autorevision is a more generic way of doing it. Anyway, the goal must be to use the same method on windows/unix/make/cmake. Note that the current method will work also when build from a zip file or even if the source is checked out using subversion.

Also, I think we should update the documentation regarding building with cmake.

I will merge in your request, but I think we should try to solve the above two.

Thanks again.

Bktero commented 6 years ago

Hey that's great! I was also working on a cmake build but the autorevision thing stopped me...