mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-12-01 19:27:53 +08:00
Update FindFilesystem.cmake to check for GNU instead of GCC for CMAKE_CXX_COMPILER_ID (#2211)
Some checks failed
Build & Test / windows/msvc - ${{ matrix.link }} (SHARED) (push) Has been cancelled
Build & Test / windows/msvc - ${{ matrix.link }} (STATIC) (push) Has been cancelled
Build & Test / macos (12) (push) Has been cancelled
Build & Test / macos (13) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:11], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:11], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:12], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:12], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:13], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:13], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:14], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:14], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:15], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:15], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:16], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:16], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:17], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:17], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ feature:coroutines ver:13], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ ver:10], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ ver:10], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ ver:11], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ ver:11], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ ver:12], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ ver:12], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ ver:13], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ ver:13], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ ver:9], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ ver:9], STATIC) (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
codespell / codespell (push) Has been cancelled
C++ / format (push) Has been cancelled
C++ / cpplint (push) Has been cancelled
Some checks failed
Build & Test / windows/msvc - ${{ matrix.link }} (SHARED) (push) Has been cancelled
Build & Test / windows/msvc - ${{ matrix.link }} (STATIC) (push) Has been cancelled
Build & Test / macos (12) (push) Has been cancelled
Build & Test / macos (13) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:11], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:11], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:12], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:12], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:13], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:13], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:14], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:14], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:15], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:15], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:16], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:16], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:17], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:clang++ ver:17], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ feature:coroutines ver:13], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ ver:10], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ ver:10], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ ver:11], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ ver:11], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ ver:12], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ ver:12], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ ver:13], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ ver:13], STATIC) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ ver:9], SHARED) (push) Has been cancelled
Build & Test / ubuntu (map[cxx:g++ ver:9], STATIC) (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
codespell / codespell (push) Has been cancelled
C++ / format (push) Has been cancelled
C++ / cpplint (push) Has been cancelled
This patch fixes a build issue encountered in our Amazon Linux 2 environment when integrating Drogon alongside other dependencies. The issue occurred because the filesystem check failed to compile when the compiler ID was set to "GNU", due to missing -std=c++17 flag. The existing CXX_FILESYSTEM_HAVE_FS check was looking for "GCC" instead of "GNU". "GNU" is the correct identifier for gcc according to CMake documentation (see https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html). Interestingly, this issue only manifested when Drogon was integrated alongside other dependencies. When Drogon was the sole project added to our build, compilation proceeded without error.
This commit is contained in:
parent
882c1d9ecd
commit
71b6d57cae
@ -212,7 +212,7 @@ if(CXX_FILESYSTEM_HAVE_FS)
|
||||
]] code @ONLY)
|
||||
|
||||
# HACK: Needed to compile correctly on Yocto Linux
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GCC" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
|
||||
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)
|
||||
endif ()
|
||||
|
Loading…
Reference in New Issue
Block a user