cmake_minimum_required(VERSION 3.15)
project(TestProject)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX FLAGS -fexec-charset=GBK)
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
# 修改clion 内存
MATH(EXPR stack_size "4*1024*1024")
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--stack,${stack_size}")

add_executable(TestProject 1_01Package.cpp)
add_executable(2_wholePackage  2_wholePackage.cpp)
add_executable(3_multiplexPackage 3_multiplexPackage.cpp)
add_executable(4_mixPackage 4_mixPackage.cpp)
add_executable(5_TwoDimensionPackage 5_TwoDimensionPackage.cpp)
add_executable(6_GroupPackage 6_GroupPackage.cpp)
add_executable(7_DependOnPackage 7_DependOnPackage.cpp)
add_executable(8_GeneralizationPackage  8_GeneralizationPackage.cpp)
add_executable(9_ChangePackage  9_ChangePackage.cpp)

CMakeLists.txt

 

我是开了1000*1000的二维数据就报了异常,没有执行main函数,知道可以这样设置使用更大的内存。