drogonframework / drogonframework/drogon
FindFilesystem.cmake not work on clang20 in centos
- Dominant language
- C++
- Stars
- 14.3k
- Forks
- 1.4k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 14
Description
**Notice**
If you need support or clarification regarding the usage of Drogon in your project, visit the official Drogon support channel at [gitter](https://gitter.im/drogon-web/community)
Please create a new issue only if you think you have found a bug or if have a feature request/enhancement.
**Describe the bug**
In output
```
-- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED
-- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED - Failed
-- Performing Test CXX_FILESYSTEM_STDCPPFS_NEEDED
-- Performing Test CXX_FILESYSTEM_STDCPPFS_NEEDED - Failed
-- Performing Test CXX_FILESYSTEM_CPPFS_NEEDED
-- Performing Test CXX_FILESYSTEM_CPPFS_NEEDED - Failed
```
In FindFilesystem.cmake
```
#HACK: Needed to compile correctly on Yocto Linux
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
set(CMAKE_REQUIRED_FLAGS ${prev_req_flags} -std=c++17)
# ----------------------- should add this ------------------------
set(CMAKE_REQUIRED_LIBRARIES ${prev_libraries} -lstdc++)
endif ()
```
**To Reproduce**
Steps to reproduce the behavior:
1.install clang on centos 9
2.compile project use c++20
**Expected behavior**
```
-- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED
-- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED - Success
```
**Screenshots**
If applicable, add screenshots to help explain your problem.
Contributor guide
Assessment
This issue has not been assessed yet.