Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 4.0.1, Qt Creator 4.0.3
-
Windows 7 x64 Ultimate
MSYS2, Clang, GCC
Description
Qt Creator removes
//Result of TRY_COMPILE
THREADS_HAVE_PTHREAD_ARG:INTERNAL=TRUE
//Result of TRY_RUN
THREADS_PTHREAD_ARG:INTERNAL=2
from CMakeCache.txt, this causes my compile to fail when including a threads library, such as pthreads. This does not happen if I generate cmake files with cmake or cmake-gui.
The cmake source lines that include this would be
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
target_link_libraries(MyTarget Threads::Threads)
The obvious solution is to leave the CMakeCache.txt in tact after cmake generated it, or at least not remove pthread related information.