Skip to content

Conversation

@Internal-Compiler-Error

The top-level CMakeLists.txt makes clang installations without stdc++ impossible to compile. It also allows non-standard C++. More can be found in the commit messages.

…akeLists.txt

The option deceleration is missing, yet it is used for setting up the
`stdlib=stdc++` flag for clang. Cmake option has the default value of `OFF`;
the value is negated in the if statement so by default the flag is appended
regardless of whether the machine has `stdc++` installed. Since some Clang
installations do not come with `stdc++`, the project cannot be built.

The default value is set to `ON` since LLVM's implementation of C++17 is not
yet complete. More can be found in the links below:
- [cppreference](https://en.cppreference.com/w/cpp/compiler_support)
- [libc++ on 17](https://libcxx.llvm.org/cxx1z_status.html)
- [libc++ homepage](https://libcxx.llvm.org/index.html)
By default if `CMAKE_CXX_EXTENSIONS` and `CMAKE_CXX_STANDARD_REQUIRED`
are not set, cmake would allow non-standard C++ extensions. For instance
it would pass `-std=gnu++17` instead of `-std=c++17` to GCC.
@Internal-Compiler-Error
Copy link
Author

Also, I would suggest making option wording positive. I.e. "build with LLVM lib" instead of "disable build with LLVM lib", since CMake options are OFF by default.

@Internal-Compiler-Error Internal-Compiler-Error changed the title Improve cross compiling Improve cross platform compliance Dec 30, 2019
@glynos glynos self-assigned this Dec 30, 2019
@glynos
Copy link
Member

glynos commented Dec 30, 2019

I am happy with the changes you made, but I can't merge while the Travis build is failing. Normally, this shouldn't be difficult to apply but I have no time to look at this.

How quickly do you need this integrated? Would you be able to take a look at the .travis.yml file yourself?

Thanks for the report and the interest in the library.

@glynos glynos merged commit 7139727 into cpp-netlib:master Jan 1, 2020
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.

2 participants