Skip to content

Commit e34ee0b

Browse files
author
Rohan Yadav
committed
*: adjust build system to fix std::filesystem compiler errors
This commit updates the build system to link libstdc++fs if building on Lanka. This might not be needed for local development on Mac's, so it is hidden behind a flag. Set LANKA=ON before `make` to link it.
1 parent 3c5d4ba commit e34ee0b

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Makefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ TACO_OUT = results/taco/$(benches_name)benches_$(shell date +%Y_%m_%d_%H%M%S).cs
1717

1818
GRAPHBLAS := "OFF"
1919
OPENMP := "OFF"
20+
# Set LANKA=ON if compiling on the MIT Lanka cluster.
21+
ifeq ($(LANKA),)
22+
LANKA := "OFF"
23+
endif
2024

2125
export TACO_TENSOR_PATH = data/
2226

@@ -59,7 +63,7 @@ ifeq ($(VALIDATION_OUTPUT_PATH),)
5963
endif
6064

6165
taco/build/taco-bench: results check-and-reinit-submodules taco/benchmark/googletest
62-
mkdir -p taco/build/ && cd taco/build/ && cmake -DOPENMP=$(OPENMP) -DGRAPHBLAS=$(GRAPHBLAS) ../ && $(MAKE) taco-bench
66+
mkdir -p taco/build/ && cd taco/build/ && cmake -DOPENMP=$(OPENMP) -DGRAPHBLAS=$(GRAPHBLAS) -DLANKA=$(LANKA) ../ && $(MAKE) taco-bench
6367

6468
taco/benchmark/googletest: check-and-reinit-submodules
6569
if [ ! -d "taco/benchmark/googletest" ] ; then git clone https://github.com/google/googletest taco/benchmark/googletest; fi

taco/CMakeLists.txt

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
22
project(taco-bench)
33
set(CMAKE_BUILD_TYPE "release")
44
option(GRAPHBLAS "Build GraphBLAS benchmarks" OFF)
5+
option(LANKA "Build benchmarks for the Lanka cluster." OFF)
56

67
if(GRAPHBLAS)
78
message("-- Will build GraphBLAS benchmarks")
@@ -22,7 +23,11 @@ set(CMAKE_CXX_FLAGS "${C_CXX_FLAGS} -std=c++14")
2223

2324
add_executable(taco-bench ${TEST_SOURCES} bench.h)
2425
target_link_libraries(taco-bench benchmark::benchmark)
25-
target_link_libraries(taco-bench taco)
26+
target_link_libraries(taco-bench taco)4
27+
# Only link stdc++fs on lanka. Mac's don't need this set.
28+
if (LANKA)
29+
target_link_libraries(taco-bench stdc++fs)
30+
endif(LANKA)
2631
if(GRAPHBLAS)
2732
target_link_libraries(taco-bench graphblas)
2833
endif(GRAPHBLAS)

0 commit comments

Comments
 (0)