-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V9.12 Fix the lnk1189 problem #4596
base: stable
Are you sure you want to change the base?
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
sat) | ||
add_subdirectory(ortools/${SAMPLES}/samples) | ||
endforeach() | ||
# foreach(SAMPLES IN ITEMS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this (and below) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, it was my fault. I forgot to remove the comment. Very Very Sorry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, it was my fault. I forgot to remove the comment. Very Very Sorry.
@@ -30,6 +30,17 @@ message(STATUS "${PROJECT_NAME} version: ${PROJECT_VERSION}") | |||
|
|||
if(MSVC) | |||
set(CMAKE_CXX_STANDARD 20) | |||
# 设置源代码和执行字符集为 UTF-8(MSVC 2015 及以上支持 /utf-8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use english in comment
why MSVC 2015 ? we only support 2022...
@@ -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=======") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no STATE
and this log seems a debug log/dev to suppress imho
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry,this is my fault
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>") | ||
# message(STATE "set bigobj=======") | ||
add_compile_options(/bigobj) | ||
SET(CMAKE_CXX_FLAGS_DEBUG "/Od2") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why ? I prefer to be conservative and keep the cmake default debug configuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My releas compilation caused errors in lnk1189, and I found two solutions on the Internet, so I added both of them. The compilation time was too long, so I added both solutions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
# 设置堆栈保留大小为16MB(单位:字节) | ||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:104857600") | ||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /STACK:104857600") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please explain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set the stack retention size.
this seems to have been IA generated.... |
I'm not very good at English, so I have to use a translation software. |
cmake 3.31.3
vs2022
window10
编译debug版本总是报lnk1189的问题,现在修复了。
Compiling debug version always quote lnk1189 issue now fixed.