diff --git a/makefile b/makefile index a4999c8..21492fe 100644 --- a/makefile +++ b/makefile @@ -80,11 +80,19 @@ else endif endif + + +CMAKE_OSX_SYSROOT_FLAG = +ifeq ($(uname_S),Darwin) + SDK_PATH := $(shell $(CXX) -v 2>&1 | grep -- '--with-sysroot' | sed -E 's/.*--with-sysroot=([^ ]+).*/\1/') + CMAKE_OSX_SYSROOT_FLAG := -DCMAKE_OSX_SYSROOT=$(SDK_PATH) +endif + ifeq ($(LEIDEN), true) igraph: mkdir libs/igraph/build - cmake -S libs/igraph -B libs/igraph/build - cmake -S libs/igraph -B libs/igraph/build + cmake $(CMAKE_OSX_SYSROOT_FLAG) -DIEEE754_DOUBLE_ENDIANNESS_MATCHES=TRUE -DCMAKE_C_COMPILER=$(CC) -DCMAKE_CXX_COMPILER=$(CXX) -S libs/igraph -B libs/igraph/build + cmake $(CMAKE_OSX_SYSROOT_FLAG) -DIEEE754_DOUBLE_ENDIANNESS_MATCHES=TRUE -DCMAKE_C_COMPILER=$(CC) -DCMAKE_CXX_COMPILER=$(CXX) -S libs/igraph -B libs/igraph/build cmake --build libs/igraph/build else igraph: diff --git a/makefile_no_mimalloc b/makefile_no_mimalloc deleted file mode 100644 index 5ac570e..0000000 --- a/makefile_no_mimalloc +++ /dev/null @@ -1,67 +0,0 @@ -all: rapid-cluster - - -#################### - -ifdef MSVC # Avoid the MingW/Cygwin sections - uname_S := Windows -else # If uname not available => 'not' - uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') -endif - -ifeq ($(uname_S),Linux) - # check if CPU supports AVX2 - HAVE_AVX2=$(filter-out 0,$(shell grep avx2 /proc/cpuinfo | wc -l)) - OMP_FLAGS = -fopenmp - ABI_FLAGS = -fabi-version=6 -endif -ifeq ($(uname_S),Darwin) - # check if CPU supports SSE4.2 - HAVE_AVX2=$(filter-out 0,$(shell sysctl -n machdep.cpu.features machdep.cpu.leaf7_features| grep AVX2 - | wc -l)) - OMP_FLAGS = -Xpreprocessor -fopenmp - ABI_FLAGS = -endif - -## ################### -ROOT_DIR = . -MAIN_DIR = src -LIBS_DIR = src/kmc_api -MIMALLOC_INLUCDE_DIR = libs/mimalloc/include - -ifeq ($(STATIC_LINK), true) - LDFLAGS += - CFLAGS += -Wall -O3 -m64 -std=c++17 $(OMP_FLAGS) -static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive - CFLAGS_AVX2 += $(CFLAGS) -mavx2 -I $(LIBS_DIR) - CFLAGS += -mavx -I $(LIBS_DIR) -I $(MIMALLOC_INLUCDE_DIR) - CLINK = -lm -static -O3 -std=c++17 -mavx $(OMP_FLAGS) $(ABI_FLAGS) -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -else - LDFLAGS += - CFLAGS += -Wall -O3 -m64 -std=c++17 $(OMP_FLAGS) -pthread - CFLAGS_AVX2 += $(CFLAGS) -mavx2 -I $(LIBS_DIR) - CFLAGS += -mavx -I $(LIBS_DIR) -I $(MIMALLOC_INLUCDE_DIR) - CLINK = -lm -O3 -std=c++17 -pthread $(OMP_FLAGS) -mavx $(ABI_FLAGS) -endif - -MIMALLOC_OBJ=libs/mimalloc/mimalloc.o - -$(MIMALLOC_OBJ): - $(CC) -DMI_MALLOC_OVERRIDE -O3 -DNDEBUG -fPIC -Wall -Wextra -Wno-unknown-pragmas -fvisibility=hidden -Wstrict-prototypes -ftls-model=initial-exec -fno-builtin-malloc -std=gnu11 -c -I libs/mimalloc/include libs/mimalloc/src/static.c -o $(MIMALLOC_OBJ) - -OBJS := \ - $(MAIN_DIR)/console.o \ - $(MAIN_DIR)/conversion.o \ - $(MAIN_DIR)/distances.o \ - $(MAIN_DIR)/main.o \ - -%.o: %.cpp - $(CXX) $(CFLAGS) -c $< -o $@ - -rapid-cluster: $(OBJS) - $(CXX) $(CLINK) $(LDFLAGS) -o $(ROOT_DIR)/$@ $(OBJS) - -clean: - -rm $(MAIN_DIR)/*.o - -rm $(LIBS_DIR)/*.o - -rm $(MIMALLOC_OBJ) - -rm rapid-cluster - diff --git a/src/version.h b/src/version.h index b9f31c8..29cd203 100644 --- a/src/version.h +++ b/src/version.h @@ -8,12 +8,15 @@ // // ******************************************************************************************* -#define VERSION "1.1.3" -#define DATE "2024-10-21" +#define VERSION "1.1.4" +#define DATE "2024-11-06" /********* Version history ********* +1.1.4 (2024-11-06) +* macOS compilation fix: SDK setting for igraph. + 1.1.3 (2024-10-21) * Added `--version` switch.