1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

debug tests Makefile: don't use -pthread when on Windows

Currently, I get the following error:

g++ -gdwarf-2 -pthread -o ../bin/MultiThreadRunControl.exe
MultiThreadRunControl.cc
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe:
cannot find -lpthread

I could install the pthreads package for mingw, and it would probably
work, but we don't use pthreads on windows, so it's better to just not
link with it.

Change-Id: I5deb58c5b69a98b77e9e9a4a744c6815c830cf20
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/37611
This commit is contained in:
Simon Marchi 2014-12-04 15:56:27 -05:00 committed by Marc Khouzam
parent e11e3d082e
commit c817c3aed5

View file

@ -10,10 +10,17 @@ BINS = $(patsubst %.c,$(BINDIR)/%.exe,$(SRC_C)) $(patsubst %.cc,$(BINDIR)/%.exe,
COREFILE = $(BINDIR)/core
CC = gcc
CFLAGS = -gdwarf-2 -pthread
CXX = g++
CXXFLAGS = -gdwarf-2 -pthread
CFLAGS = -gdwarf-2
CXXFLAGS = -gdwarf-2
# Don't try to use pthread on Windows
# The OS environment variable exists on Windows
ifneq ($(OS),Windows_NT)
CFLAGS += -pthread
CXXFLAGS += -pthread
endif
MKDIR = mkdir -p
RM = rm -f