diff --git a/CMakeLists.txt b/CMakeLists.txt index d023d4c82ea..61e25d38b34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,17 @@ message(STATUS "${PROJECT_NAME} version: ${PROJECT_VERSION}") if(MSVC) set(CMAKE_CXX_STANDARD 20) + # 设置源代码和执行字符集为 UTF-8(MSVC 2015 及以上支持 /utf-8) + message(STATE "set utf-8=======") + add_compile_options("$<$:/utf-8>") + add_compile_options("$<$:/utf-8>") + # message(STATE "set bigobj=======") + add_compile_options(/bigobj) + SET(CMAKE_CXX_FLAGS_DEBUG "/Od2") + + # 设置堆栈保留大小为16MB(单位:字节) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:104857600") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /STACK:104857600") else() set(CMAKE_CXX_STANDARD 17) endif() @@ -443,22 +454,22 @@ include(dotnet) # Since samples mix all languages we must parse them once we have included all # .cmake files -foreach(SAMPLES IN ITEMS - algorithms - graph - glop - constraint_solver - linear_solver - ${MATH_OPT_DIR} - ${PDLP_DIR} - sat) - add_subdirectory(ortools/${SAMPLES}/samples) -endforeach() +# foreach(SAMPLES IN ITEMS +# algorithms +# graph +# glop +# constraint_solver +# linear_solver +# ${MATH_OPT_DIR} +# ${PDLP_DIR} +# sat) +# add_subdirectory(ortools/${SAMPLES}/samples) +# endforeach() # Same for examples -foreach(EXAMPLES IN ITEMS contrib cpp dotnet java python) - add_subdirectory(examples/${EXAMPLES}) -endforeach() +# foreach(EXAMPLES IN ITEMS contrib cpp dotnet java python) +# add_subdirectory(examples/${EXAMPLES}) +# endforeach() # Add tests in examples/tests -add_subdirectory(examples/tests) +# add_subdirectory(examples/tests)