You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
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.
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 =)
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
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).
Activity
neilmacintosh commentedon Apr 17, 2017
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.
rianquinn commentedon Apr 17, 2017
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.
CaseyCarter commentedon Apr 17, 2017
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.
tiagomacarios commentedon Apr 18, 2017
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 =)
neilmacintosh commentedon Apr 18, 2017
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
rianquinn commentedon Apr 18, 2017
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).
neilmacintosh commentedon Apr 26, 2017
Tiago (@tiagomacarios) thanks for the PR to update our CMake usage. Does that address this issue for now?
tiagomacarios commentedon Apr 29, 2017
yup all good!