Skip to content

CMake version #487

Closed
Closed

Description

@tiagomacarios

Is there a reason for using CMake 2.8.7 (2012?)?
If a newer version was used one could improve the CMake files to have a more modern pattern. GSL could be an interface target for example.

Activity

  1. neilmacintosh commented on Apr 17, 2017

    @neilmacintosh
    Contributor

    We started using a "lowest common denominator" version at first to ensure broad accessibility. We also want to use continuous integration in Git, although I don't think that is currently limiting us to 2.8.7 (I haven't checked recently to be honest).

    I'd be happy to look at a PR that upgrades the requirement if it demonstrates a function improvement that we can't have with today's CMake.

  2. rianquinn commented on Apr 17, 2017

    @rianquinn
    Contributor

    Neil MacIntosh (@neilmacintosh) One thing that I ran into with VS2017 is that it has a hacked up version of Git built into it, which breaks Windows Git SCM. Although the issue is not specific to CMake, it was showing up as an issue with CMake because ExternalProject_Add (something this repo might want to use in the future instead of submodules), was broken as a result. There is a fix for it in CMake, but it requires the latest 3.8.

    Just food for thought.

  3. CaseyCarter commented on Apr 17, 2017

    @CaseyCarter
    Contributor

    The rationale for using ancient cmake was that Travis CI uses cmake 2.8.ancient. The Travis and AppVeyor scripts now install a more recent version of cmake (IIRC 3.7.2) manually before they configure and build the tests.

  4. tiagomacarios commented on Apr 18, 2017

    @tiagomacarios
    MemberAuthor

    Not really sure what version would be good. If it is too old you cannot use newer CMake features, if it is too new people normally don't have it on their system. Anyway, I forked a branch were the CMake files use newer features.

    Main things:
    CMake itself will automatically check for c++14 support.
    GSL is now an INTERFACE and one only need to link against that interface (include paths and natvis files will be taken care automatically).
    When generating a VS project the gsl tests will be properly nested into a test subfolder.
    if(compiler) expression were modified to generator expressions.

    I can try to break this changes into smaller ones to see what the CI will accept or not. Let me know what you think.

    Rian Quinn (@rianquinn) What is the reason to use ExternalProject_Add instead of the submodule? Just curious. I normally think that submodules make things easier, but it is not unusual to find people that disagree =)

  5. neilmacintosh commented on Apr 18, 2017

    @neilmacintosh
    Contributor

    Thanks for the update Tiago (@tiagomacarios) I'd be happy to look at PRs that brought the changes over in discrete chunks.

    a) so we can ensure CI remains happy at each step
    b) because I like to review changes that are logically related rather than one big "all the CMake things" PR

  6. rianquinn commented on Apr 18, 2017

    @rianquinn
    Contributor

    Tiago (@tiagomacarios) ExternalProject_Add provides a bit more flexibility. As for us, we maintain our own patch of the GSL, and one of the things that we have to do is delete the sub-module since we don't want to install UnitTest++ in our prefix (as it doesn't compile / work in Cygwin which we need to support). ExternalProject_Add would not only provide a nice way to stay up-to-date, but it would make this part optional (could add an optional setting for cmake to turn off unit testing so that make install simply installs the headers).

  7. neilmacintosh commented on Apr 26, 2017

    @neilmacintosh
    Contributor

    Tiago (@tiagomacarios) thanks for the PR to update our CMake usage. Does that address this issue for now?

  8. tiagomacarios commented on Apr 29, 2017

    @tiagomacarios
    MemberAuthor

    yup all good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions