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

Adding CMake 3.4 check #394

Merged
merged 5 commits into from
Jan 9, 2020
Merged

Adding CMake 3.4 check #394

merged 5 commits into from
Jan 9, 2020

Conversation

henryiii
Copy link
Collaborator

@henryiii henryiii commented Jan 8, 2020

Reimplements and closes #321. Changes:

  • CLI11_CXX_STD -> CMAKE_CXX_STANDARD (only changed if set)
  • All versions of CMake checked to verify they configure (3.4 - 3.16)
  • Sanitizers and json now are downloaded if requested, much smaller recursive git checkout
  • Uses generator expressions (maybe too?) heavily
  • CLI11_BUILD_EXAMPLES_JSON asks for json example
  • As a nested project CLI11 should behave nicer

@henryiii henryiii force-pushed the henryiii-cmake34 branch 2 times, most recently from c4cec06 to a0a976a Compare January 8, 2020 15:38
@codecov
Copy link

codecov bot commented Jan 8, 2020

Codecov Report

Merging #394 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #394   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          12     12           
  Lines        3565   3580   +15     
=====================================
+ Hits         3565   3580   +15
Impacted Files Coverage Δ
include/CLI/Config.hpp 100% <0%> (ø) ⬆️
include/CLI/App.hpp 100% <0%> (ø) ⬆️
include/CLI/Error.hpp 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8570ffb...c137fbf. Read the comment docs.

@henryiii henryiii force-pushed the henryiii-cmake34 branch 3 times, most recently from 3ab9f65 to a864f65 Compare January 8, 2020 15:54
@henryiii henryiii force-pushed the henryiii-cmake34 branch 19 times, most recently from 69e86d0 to e53cd0f Compare January 8, 2020 21:39
@henryiii
Copy link
Collaborator Author

henryiii commented Jan 8, 2020

@all-contributors please add @slurps-mad-rips for packaging

@allcontributors
Copy link
Contributor

@henryiii

I couldn't determine any contributions to add, did you specify any contributions?
Please make sure to use valid contribution names.

@henryiii
Copy link
Collaborator Author

henryiii commented Jan 8, 2020

@all-contributors please add @slurps-mad-rips for platform work

@allcontributors
Copy link
Contributor

@henryiii

I've put up a pull request to add @slurps-mad-rips! 🎉

@henryiii henryiii marked this pull request as ready for review January 8, 2020 22:44
@henryiii henryiii requested a review from phlptp January 8, 2020 22:45
- name: Build
run: cmake --build build -j2

cmake-config:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how long does this take to run on all versions of cmake?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About 6 seconds each. Plus a little for the initial docker build, total is under 2 minutes.

Screen Shot 2020-01-08 at 8 31 29 PM

@phlptp
Copy link
Collaborator

phlptp commented Jan 8, 2020

I think I want to try this out on my windows system tonight just to make sure it all works correctly.

I like most of the changes, I agree the heavy use of generator expressions may or may not be desirable.

@henryiii
Copy link
Collaborator Author

henryiii commented Jan 9, 2020

I think I want to try this out on my windows system tonight just to make sure it all works correctly.

Please do, most importantly, I don't want to break anything.

@phlptp
Copy link
Collaborator

phlptp commented Jan 9, 2020

If the CLI11_INSTALL is set to OFF I get

Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
CMake 3.15.2
Configuring done
CMake Error: INSTALL(EXPORT) given unknown export "CLI11Targets"
Generating done

I am guessing somewhere something is not acknowledging that flag

@phlptp
Copy link
Collaborator

phlptp commented Jan 9, 2020

Ok, ran it through a bunch of different configurations on windows and MSYS.
There are a few warnings on some of the tests in Visual studio with C++17 mode enabled, not ones that are easily fixable right now. Everything else checks out as far as I can tell.

The CLI11_INSTALL=OFF error should be fixed or the option removed before merging though.

Longer term we may want to consider making the gtest options hidden so they don't even show up on the cmake-gui interface.

I think there might be a few things that need tweaking once CLI11 moves to have a compiled component(or at least the option of one)

Copy link
Collaborator

@phlptp phlptp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CLI11_INSTALL=OFF error should be fixed or the option removed.

@bruxisma
Copy link
Contributor

bruxisma commented Jan 9, 2020

The CLI11_INSTALL=OFF error should be fixed or the option removed.

For what its worth, older versions of CMake always add their items to the install target when used as a subdirectory, unless EXCLUDE_FROM_ALL is used when add_subdirectory is called.

(Also, sorry for dropping off the face of the earth for a bit. Life has been getting in the way. Thanks @henryiii for taking care of this ☺️)

@henryiii
Copy link
Collaborator Author

henryiii commented Jan 9, 2020

FWIW, macOS 10.14 + C++17 mode is broken:

In file included from /Users/runner/runners/2.163.1/work/1/s/tests/informational.cpp:4:
In file included from /Users/runner/runners/2.163.1/work/1/s/include/CLI/CLI.hpp:23:
/Users/runner/runners/2.163.1/work/1/s/include/CLI/Validators.hpp:276:34: error: 'status' is unavailable: introduced in macOS 10.15
    auto stat = std::filesystem::status(file, ec);

And the warnings on Windows for C++17 mode. Not related to this PR, though.

@henryiii henryiii merged commit 7f47f99 into master Jan 9, 2020
@henryiii henryiii deleted the henryiii-cmake34 branch January 9, 2020 14:54
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.

3 participants