Skip to content

Commit

Permalink
Fix null usage on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
andrjohns committed Apr 21, 2024
1 parent eb39304 commit c224139
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion make/tests
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,15 @@ HEADER_TESTS := $(addsuffix -test,$(call findfiles,src/stan,*.hpp))

ifeq ($(OS),Windows_NT)
DEV_NULL = nul
ifeq ($(IS_UCRT),true)
UCRT_NULL_FLAG = -S
endif
else
DEV_NULL = /dev/null
endif

%.hpp-test : %.hpp test/dummy.cpp
$(COMPILE.cpp) -O0 -include $^ -o $(DEV_NULL)
$(COMPILE.cpp) -O0 -include $^ $(UCRT_NULL_FLAG) -o $(DEV_NULL)

test/dummy.cpp:
@mkdir -p test
Expand Down

0 comments on commit c224139

Please sign in to comment.