forked from qt-creator/qt-creator
Utils: Fix MinGW build
Amends a0f6e8dc04
The issue is that pthread.h is including <process.h>, which ends up to
utils/process.h since it's first in path.
Change-Id: I525384083b6952aded4b77c29d00d85f084c60f9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -1,7 +1,11 @@
|
|||||||
// Copyright (C) 2016 The Qt Company Ltd.
|
// Copyright (C) 2016 The Qt Company Ltd.
|
||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||||
|
|
||||||
#pragma once
|
#if defined(Q_CC_MINGW) && defined(WIN_PTHREADS_H) && !defined(_INC_PROCESS)
|
||||||
|
// Arrived here via <pthread.h> which wants to include <process.h>
|
||||||
|
#include_next <process.h>
|
||||||
|
#elif !defined(UTILS_PROCESS_H)
|
||||||
|
#define UTILS_PROCESS_H
|
||||||
|
|
||||||
#include "utils_global.h"
|
#include "utils_global.h"
|
||||||
|
|
||||||
@@ -217,3 +221,5 @@ public:
|
|||||||
} // namespace Utils
|
} // namespace Utils
|
||||||
|
|
||||||
QTC_DECLARE_CUSTOM_TASK(ProcessTask, Utils::ProcessTaskAdapter);
|
QTC_DECLARE_CUSTOM_TASK(ProcessTask, Utils::ProcessTaskAdapter);
|
||||||
|
|
||||||
|
#endif // UTILS_PROCESS_H
|
||||||
|
|||||||
@@ -39,4 +39,5 @@ extend_qtc_plugin(ClangFormat
|
|||||||
tests/clangformat-test.h
|
tests/clangformat-test.h
|
||||||
DEFINES
|
DEFINES
|
||||||
TESTDATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/tests/data"
|
TESTDATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/tests/data"
|
||||||
|
EXPLICIT_MOC tests/clangformat-test.h
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -13,4 +13,5 @@ extend_qtc_plugin(Vcpkg
|
|||||||
CONDITION WITH_TESTS
|
CONDITION WITH_TESTS
|
||||||
SOURCES
|
SOURCES
|
||||||
vcpkg_test.cpp vcpkg_test.h
|
vcpkg_test.cpp vcpkg_test.h
|
||||||
|
EXPLICIT_MOC vcpkg_test.h
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user