c++makefilecmakelists-options

How to set _GLIBCXX_USE_CXX11_ABI=0 in Makefile


In CMakelists.txt we can use add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=0), how can I set _GLIBCXX_USE_CXX11_ABI in makefile?


Solution

  • As @Alan Birtles said, I do it like this :

    g++ $^ -std=c++14 -D_GLIBCXX_USE_CXX11_ABI=0 $(INCLUDE) $(LIB) -o $@