Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake added #14

Merged
merged 18 commits into from Oct 18, 2015
Merged

CMake added #14

merged 18 commits into from Oct 18, 2015

Conversation

offa
Copy link
Collaborator

@offa offa commented Oct 17, 2015

This PR addes cmake as a second build tool.

Available:

  • Building of library and apps
  • Installation using make install
  • Travis CI (Matrix using both)
  • Generation of embedded content
  • Testing compiler for emplace()
  • Optional building / running of tests using gtest / gmock (default: OFF)
  • Configure file - Config.h (based on a custom template in cmake/)

Not (yet) available:

  • Building tests on CI using cmake

Since google has merged gtest / gmock into one project - gmock depends on gtest though - i'm not sure how to handle this case on CI. It seems gmock requires gtest but doesn't ship it anymore in one bundle (?).

At the moment cmake will look for both if tests are enabled, otherwise there's no dependency on gtest / gmock if disabled.

What's different to autoconf:

The cmake builds will use it's own Config.h (cmake directory); it has only a definition for HAVE_UNORDERED_MAP_EMPLACE, since i didn't see any usage of all the other flags. However, adding more options is simple enough.

@mattgodbolt
Copy link
Owner

Thanks for this great contribution. I will take a proper look over the next
day or two!
On Sat, Oct 17, 2015 at 10:47 AM, offa notifications@github.com wrote:

This PR addes cmake as a second build tool.
Available:

  • Building of library and apps
  • Installation using make install
  • Travis CI (Matrix using both)
  • Generation of embedded content
  • Testing compiler for emplace()
  • Optional building / running of tests using gtest / gmock (default:
    OFF)
  • Configure file - Config.h (based on a custom template in cmake/)

Not (yet) available:

  • Building tests on CI using cmake

Since google has merged gtest / gmock into one project - gmock depends on
gtest though - i'm not sure how to handle this case on CI. It seems gmock
requires gtest but doesn't ship it anymore in one bundle (?).

At the moment cmake will look for both if tests are enabled, otherwise
there's no dependency on gtest / gmock if disabled.
What's different to autoconf:

The cmake builds will use it's own Config.h (cmake directory); it has
only a definition for HAVE_UNORDERED_MAP_EMPLACE, since i didn't see any

usage of all the other flags. However, adding more options is simple enough.

You can view, comment on, or merge this pull request online at:

#14
Commit Summary

  • CMakeFiles added.
  • Some Improvements.
  • Dependencies fixed.
  • Call fix.
  • Configure file.
  • Map test integrated.
  • Embedded library.
  • Static lib removed.
  • Linking generated sources (WIP).
  • Embedded content linkage fixed.
  • Wall added.
  • Merge branch 'master' into cmake
  • Merge branch 'master' into cmake
  • Version set.
  • Install target added.
  • Travis builds using cmake added and cmake set to 2.8.x, since
    there's no v3.x availalbe on travis yet.
  • Apps added.
  • Tests added.

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#14.

@offa
Copy link
Collaborator Author

offa commented Oct 18, 2015

Great! 👍

With cmake i was able to cross-compile for an embedded Arm - seasocks works like a charm!

@mattgodbolt
Copy link
Owner

This is great stuff; thanks! I'll merge in and once we get a decent way of pointing at gmock I'll probably deprecate the old configure-based stuff in favour of CMake.

mattgodbolt added a commit that referenced this pull request Oct 18, 2015
CMake added. Currently alongside the autoconf build; with a view to it replacing autoconf sometime soon.
@mattgodbolt mattgodbolt merged commit 9ee6d50 into mattgodbolt:master Oct 18, 2015
@offa offa deleted the cmake branch October 19, 2015 14:06
@mattgodbolt
Copy link
Owner

I've updated the main build to work with Catch.hpp instead of
google{test,mock}. I also hacked about a bit and added most of the things I
thought the CMake approach was missing; can you check it still works for
you here?

Thanks!

On Sun, Oct 18, 2015 at 7:21 AM, offa notifications@github.com wrote:

Great! [image: 👍]

With cmake i was able to cross-compile for an embedded Arm - seasocks
works like a charm!


Reply to this email directly or view it on GitHub
#14 (comment).

Matt

@offa
Copy link
Collaborator Author

offa commented Oct 20, 2015

Everything fine so far.

@offa
Copy link
Collaborator Author

offa commented Oct 20, 2015

Just one thing: It's a bit hard to figure out, where a build failure comes from currently.

@offa
Copy link
Collaborator Author

offa commented Oct 20, 2015

I have addressed this in #15.

@mattgodbolt
Copy link
Owner

Thanks! Merged :)

@offa
Copy link
Collaborator Author

offa commented Oct 21, 2015

@mattgodbolt Can we add an option for Tests, so they can (optionally) be turned off?

@mattgodbolt
Copy link
Owner

Certainly! Feel free to send a PR, else I'll try and get to it later this
week.

On Wed, Oct 21, 2015 at 1:05 PM offa notifications@github.com wrote:

@mattgodbolt https://github.com/mattgodbolt Can we add an option for
Tests, so they can (optionally) be turned off?


Reply to this email directly or view it on GitHub
#14 (comment).

@offa
Copy link
Collaborator Author

offa commented Oct 22, 2015

Done: #20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants