danvratil / qcoro

C++ Coroutines for Qt
https://qcoro.dvratil.cz
MIT License
331 stars 53 forks source link

`CheckAtomic.cmake` Fails on Windows with LLVM Clang #158

Closed DeveloperPaul123 closed 1 year ago

DeveloperPaul123 commented 1 year ago

I was trying to get qcoro to build with Ninja and LLVM Clang on Windows but it seems that the std::atomic check in CheckAtomic always fails.

Short log

1> [CMake] -- The CXX compiler identification is Clang 15.0.7 with GNU-like command-line
1> [CMake] -- Detecting CXX compiler ABI info
1> [CMake] -- Detecting CXX compiler ABI info - done
1> [CMake] -- Check for working CXX compiler: C:/Program Files/LLVM/bin/clang++.exe - skipped
1> [CMake] -- Detecting CXX compile features
1> [CMake] -- Detecting CXX compile features - done
1> [CMake] -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
1> [CMake] -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
1> [CMake] -- Looking for pthread_create in pthreads
1> [CMake] -- Looking for pthread_create in pthreads - not found
1> [CMake] -- Looking for pthread_create in pthread
1> [CMake] -- Looking for pthread_create in pthread - not found
1> [CMake] -- Check if compiler accepts -pthread
1> [CMake] -- Check if compiler accepts -pthread - no
1> [CMake] -- Found Threads: TRUE  
1> [CMake] -- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB
1> [CMake] -- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Failed
1> [CMake] -- Performing Test HAVE_CXX_ATOMICS_WITH_LIB
1> [CMake] -- Performing Test HAVE_CXX_ATOMICS_WITH_LIB - Failed
1> [CMake] CMake Error at cmake/CheckAtomic.cmake:37 (message):
1> [CMake]   Host compiler must support std::atomic!
1> [CMake] Call Stack (most recent call first):
1> [CMake]   CMakeLists.txt:44 (include)
1> [CMake] -- Configuring incomplete, errors occurred!

Cmake error/output logs:

CMakeError.log CMakeOutput.log