-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consider default C++ compiler in Makefile, defaulting to g++.
- Loading branch information
Showing
2 changed files
with
8 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
# Check if a default C++ compiler exists, otherwise use g++ | ||
CXX ?= g++ | ||
|
||
all: examples test-cpp11 test-cpp14 test-cpp20 | ||
examples: examples/main.cpp | ||
mkdir -p build | ||
g++ examples/main.cpp -Iinclude -o build/examples -std=c++11 -pthread -latomic | ||
$(CXX) examples/main.cpp -Iinclude -o build/examples -std=c++11 -pthread -latomic | ||
test: test-cpp11 | ||
test-cpp11: test/test.cpp | ||
mkdir -p build | ||
g++ test/test.cpp -Iinclude -Itest -o build/test -std=c++11 -pthread -latomic | ||
$(CXX) test/test.cpp -Iinclude -Itest -o build/test -std=c++11 -pthread -latomic | ||
test-cpp14: test/test.cpp | ||
mkdir -p build | ||
g++ test/test.cpp -Iinclude -Itest -o build/test-cpp14 -std=c++14 -pthread -latomic | ||
$(CXX) test/test.cpp -Iinclude -Itest -o build/test-cpp14 -std=c++14 -pthread -latomic | ||
test-cpp20: test/test.cpp | ||
mkdir -p build | ||
g++ test/test.cpp -Iinclude -Itest -o build/test-cpp20 -std=c++2a -pthread -latomic | ||
$(CXX) test/test.cpp -Iinclude -Itest -o build/test-cpp20 -std=c++2a -pthread -latomic | ||
clean: | ||
rm -rf build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters