【发布时间】:2020-08-01 10:25:42
【问题描述】:
看完this的问题,我写了一个以
开头的MakefileCXX=g++
CXXFLAGS= -std=c++17 -Wall -O3 -g
ifeq ( $( shell uname ), "Linux" )
CXXFLAGS += -fopenmp
endif
LIBS= -pthread
INCLUDES = -I.
TARGETS= my targets...
仅当我在 linux 上编译而不是在 Mac 上编译时,我才需要传递 -fopenmp 标志。
我的问题是这不起作用,并且标志永远不会通过。
【问题讨论】:
标签: c++ linux makefile conditional-compilation