Skip to content

Commit

Permalink
fix: no error report when 'build' folder is already exists on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
NichtsHsu committed Feb 18, 2024
1 parent e489a9e commit cd7b387
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ run-tests cc=default_cc: (build-tests cc)

nmake-tests:
nmake -f nmakefile
Get-ChildItem build -Filter *.exe | Foreach-Object { & $_.FullName }
Get-ChildItem {{ outpath }} -Filter *.exe | Foreach-Object { & $_.FullName }

clean:
rm -r ./build
rm -r {{ outpath }}
8 changes: 4 additions & 4 deletions nmakefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@

CC = cl
INCLUDES = ./include
CXXFLAGS = /std:c++20 /EHs /Wall /Fo./build/
OUTPATH = ./build
CXXFLAGS = /std:c++20 /EHs /Wall /Fo$(OUTPATH)

EXES = $(**:.cpp=.exe)

.SUFFIXES: .cpp .exe
all: tests\*.cpp
mkdir build
IF NOT EXIST $(OUTPATH) md $(OUTPATH)
$(MAKE) /f nmakefile $(EXES:tests=build)

{tests\}.cpp{build\}.exe:
$(CC) /I $(INCLUDES) $(CXXFLAGS) /Fe$@ $<

clean:
del /Q build
rd /s /q $(OUTPATH)

0 comments on commit cd7b387

Please sign in to comment.