Skip to content

Commit fef445a

Browse files
committed
properly guard {Process|Thread}Executor implementations
1 parent 21163e8 commit fef445a

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

cli/processexecutor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
#include "processexecutor.h"
2424

25-
#if !defined(_WIN32) && !defined(__MINGW32__)
25+
#ifdef HAS_THREADING_MODEL_FORK
2626

2727
#include "cppcheck.h"
2828
#include "errorlogger.h"

cli/processexecutor.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
#ifndef PROCESSEXECUTOR_H
2020
#define PROCESSEXECUTOR_H
2121

22+
#include "config.h"
23+
24+
#ifdef HAS_THREADING_MODEL_FORK
25+
2226
#include "cppcheck.h"
2327
#include "executor.h"
2428

@@ -72,4 +76,6 @@ class ProcessExecutor : public Executor {
7276

7377
/// @}
7478

79+
#endif // HAS_THREADING_MODEL_FORK
80+
7581
#endif // PROCESSEXECUTOR_H

cli/threadexecutor.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
#include "threadexecutor.h"
2020

21+
#ifdef HAS_THREADING_MODEL_THREAD
22+
2123
#include "config.h"
2224
#include "cppcheck.h"
2325
#include "errorlogger.h"
@@ -219,3 +221,5 @@ unsigned int ThreadExecutor::check()
219221

220222
return result;
221223
}
224+
225+
#endif // HAS_THREADING_MODEL_THREAD

cli/threadexecutor.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
#ifndef THREADEXECUTOR_H
2020
#define THREADEXECUTOR_H
2121

22+
#include "config.h"
23+
24+
#ifdef HAS_THREADING_MODEL_THREAD
25+
2226
#include "cppcheck.h"
2327
#include "executor.h"
2428

@@ -52,4 +56,6 @@ class ThreadExecutor : public Executor {
5256

5357
/// @}
5458

59+
#endif // HAS_THREADING_MODEL_THREAD
60+
5561
#endif // THREADEXECUTOR_H

0 commit comments

Comments
 (0)