Skip to content

Commit 11e8ad6

Browse files
authored
Make c++17 default, link against onnxruntime if ONNX module is enabled (#76)
1 parent 6441be5 commit 11e8ad6

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

config/cc-gcc.make

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ CCFLAGS += -pipe
2727
CCFLAGS += -funsigned-char
2828
CCFLAGS += -fno-exceptions
2929
CFLAGS += -std=c99
30-
CXXFLAGS += -std=gnu++0x
30+
CXXFLAGS += -std=gnu++17
3131
CXXFLAGS += -Wno-unknown-pragmas
3232
#CCFLAGS += -pedantic
3333
CCFLAGS += -Wall

config/os-linux.make

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ TF_LDFLAGS += -Wl,-rpath -Wl,$(TF_COMPILE_BASE)/bazel-bin/tensorflow
6262
# USE_TENSORFLOW_MKL=1
6363
endif
6464

65+
66+
ifdef MODULE_ONNX
67+
LDFLAGS += -lonnxruntime
68+
ifndef MODULE_TENSORFLOW
69+
CXXFLAGS += -fexceptions
70+
endif
71+
endif
72+
6573
# -----------------------------------------------------------------------------
6674
# system Libraries
6775

0 commit comments

Comments
 (0)