PROJECT(main) CMAKE_MINIMUM_REQUIRED(VERSION 2.6) SET(CMAKE_SOURCE_DIR .) SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb") SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall") AUX_SOURCE_DIRECTORY(. DIR_SRCS) ADD_EXECUTABLE(main ${DIR_SRCS})
# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 3.5 # compile C with /usr/bin/cc # compile CXX with /usr/bin/c++ C_FLAGS = -g C_DEFINES = C_INCLUDES = -I/home/samba/math CXX_FLAGS = -O0 -Wall -g -ggdb CXX_DEFINES = CXX_INCLUDES = -I/home/samba/math
标签:SET,CMAKE,CXX,Wall,FLAGS,版本,release,cmake,DIR From: https://www.cnblogs.com/lishanyang/p/17036883.html