Skip to content

Commit

Permalink
fix conflicts with cmake and existing Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdcvlsc committed Sep 10, 2023
1 parent 953de59 commit 9657c67
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.vscode
*.out
*.exe
*.exe

CMakeCache.txt
cmake_install.cmake
CMakeFiles
Makefile
28 changes: 15 additions & 13 deletions Makefile → makefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
OS := $(shell uname)

CXX=g++
CXX_STANDARD=-std=c++17
OS:=$(shell uname)
CXX:=g++
CXX_STANDARD:=-std=c++17

########################## link ##########################

LINK=dynamic
LINK:=dynamic

ifeq ($(LINK), dynamic)
LINKER=
LINKER:=
else ifeq ($(LINK), static)
LINKER=-static
LINKER:=-static
endif

########################## sanitizer ##########################

ifeq ($(CXX), clang++)
ADDRESS_SANITIZER=-fsanitize=address
THREADS_SANITIZER=-fsanitize=thread
ADDRESS_SANITIZER:=-fsanitize=address
THREADS_SANITIZER:=-fsanitize=thread
else
ADDRESS_SANITIZER=
THREADS_SANITIZER=
ADDRESS_SANITIZER:=
THREADS_SANITIZER:=
endif

########################## version ##########################

VERSION=portable
VERSION:=

ifeq ($(VERSION), portable)
COMPILATION_MSG="compiling portable version"
Expand All @@ -40,7 +39,7 @@ endif

########################## type ##########################

TYPE=release
TYPE:=release

ifeq ($(TYPE), release)
CXX_FLAGS=-O3 -Wall -Wextra
Expand All @@ -67,6 +66,9 @@ test:
clean:
@rm tests.out microbench.out

clean-cmake:
rm -r tests Makefile CMakeFiles cmake_install.cmake CMakeCache.txt

style:
@clang-format -i -style=file *.cpp *.hpp

Expand Down

0 comments on commit 9657c67

Please sign in to comment.