Skip to content

Commit 0a2bd24

Browse files
committed
Makefile: CUDA_INC to CUDA compiler instead of INC
Passing the parameter to MSVC compiler causes MinGW headers to be used which causes compilation fail. See: https://github.com/CESNET/UltraGrid/actions/runs/2059190533
1 parent be641a8 commit 0a2bd24

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Makefile.in

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ CUDA_FLAGS = @CUDA_FLAGS@ @CUDA_COMPUTE_ARGS@
1515
LDFLAGS = @LDFLAGS@
1616
LIBS += @LIBS@ @MATHLIBS@ -lm -pthread
1717
INC = -Isrc -I$(srcdir) -I$(srcdir)/src -I$(srcdir)/test -Idxt_compress \
18-
@CUDA_INC@ @INC@
18+
@INC@
19+
CUDA_INC = @CUDA_INC@ -Isrc -I$(srcdir)/src
1920
DECKLINK_PATH = @DECKLINK_PATH@
2021
DYLIBBUNDLER = @DYLIBBUNDLER@
2122
DYLIBBUNDLER_FLAGS += @DYLIBBUNDLER_FLAGS@
@@ -294,12 +295,12 @@ POSTPROCESS_DEPS = \
294295
# Pattern rule for compiling CUDA files
295296
%.o: %.cu
296297
$(MKDIR_P) $(dir $@)
297-
"$(CUDA_COMPILER)" $(CUDA_FLAGS) $(INC) -c $< -o $@
298-
"$(CUDA_COMPILER)" $(CUDA_FLAGS) $(INC) -M $< > $*.d
298+
"$(CUDA_COMPILER)" $(CUDA_FLAGS) $(CUDA_INC) -c $< -o $@
299+
"$(CUDA_COMPILER)" $(CUDA_FLAGS) $(CUDA_INC) -M $< > $*.d
299300
$(POSTPROCESS_DEPS)
300301
%.lib: %.cu
301302
$(MKDIR_P) $(dir $@)
302-
"$(CUDA_COMPILER)" $(CUDA_FLAGS) -DEXPORT_DLL_SYMBOLS $(INC) -MD --shared $< -o $*.dll
303+
"$(CUDA_COMPILER)" $(CUDA_FLAGS) -DEXPORT_DLL_SYMBOLS $(CUDA_INC) -MD --shared $< -o $*.dll
303304
touch $@
304305
$(POSTPROCESS_DEPS)
305306

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2159,6 +2159,7 @@ then
21592159

21602160
CUDA_INC="\"-I$CUDA_PATH/include\""
21612161
CUDA_COMPILER="$NVCC"
2162+
INC="$INC $CUDA_INC"
21622163

21632164
if test $ac_cv_sizeof_int_p -eq 8 -a $system = Linux
21642165
then

0 commit comments

Comments
 (0)