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

add travis task : compile and test under C++17 #2241

Open
wants to merge 2 commits into
base: develop
from

Conversation

@dota17
Copy link
Contributor

dota17 commented Jul 6, 2020

From #2213, we could know that JSON_HAS_CPP_17 is false in all travis jobs.
Thus, we should add a task to compile and test under CXX17.

@dota17 dota17 requested a review from nlohmann as a code owner Jul 6, 2020
@coveralls
Copy link

coveralls commented Jul 6, 2020

Coverage Status

Coverage remained the same at 100.0% when pulling 6a22533 on dota17:travis-task-cxx17 into eb7376b on nlohmann:develop.

.travis.yml Outdated Show resolved Hide resolved
@@ -218,6 +218,17 @@ matrix:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-9', 'ninja-build']

- os: linux

This comment has been minimized.

@nlohmann

nlohmann Jul 6, 2020

Owner

We already have a test case above that sets CXXFLAGS=-std=c++2a. Maybe this can be reused.

This comment has been minimized.

@dota17

dota17 Jul 7, 2020

Author Contributor

Unfortunately, It seems that CXXFLAGS=-std=c++1z didn't work under c++17.

.travis.yml Show resolved Hide resolved
@dota17 dota17 closed this Jul 14, 2020
@dota17 dota17 reopened this Jul 14, 2020
@dota17
Copy link
Contributor Author

dota17 commented Jul 14, 2020

Reopening.
I've made a little investigation.
In GCC, the -std= command-line option have C++98, C++11, C++14, C++17, C++2a, so c++2a is different from c++17.
In Clang, the same option are the same, but use -std=c++1y in Clang 3.4 and earlier.

@dota17
Copy link
Contributor Author

dota17 commented Jul 14, 2020

At the same time, I think we should update Ubuntu distribution in .travis.yml, because Precise and Trusty are EOL by Canonial.

@nlohmann
Copy link
Owner

nlohmann commented Jul 14, 2020

At the same time, I think we should update Ubuntu distribution in .travis.yml, because Precise and Trusty are EOL by Canonial.

As long as they are supported by Travis, I am fine with the working setup. I am afraid that the CI breaks if we are moving to a newer version.

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

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.