-
Notifications
You must be signed in to change notification settings - Fork 152
re: Build debug libraries when CMAKE_BUILD_TYPE is set to Debug #241
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
base: master
Are you sure you want to change the base?
Changes from all commits
127ec49
ad9fe66
defd5f4
8cc39fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,10 +122,13 @@ add_python_extension(_testmultiphase REQUIRES IS_PY3 SOURCES _testmultiphase.c) | |
# debug tool to trace memory blocks allocated by Python | ||
add_python_extension(_tracemalloc BUILTIN REQUIRES IS_PY3 SOURCES hashtable.c _tracemalloc.c) | ||
add_python_extension(_weakref BUILTIN REQUIRES IS_PY3 SOURCES _weakref.c) | ||
math(EXPR _limited_api_version "${PY_VERSION_MAJOR} * 100 + ${PY_VERSION_MINOR}") | ||
if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should probably be something like :
That said, the approach should still be tweaked to handle the case of Visual Studio where There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dbrnz I had an other look at this, and if That way, we will be able to do something like this:
|
||
math(EXPR _limited_api_version "${PY_VERSION_MAJOR} * 100 + ${PY_VERSION_MINOR}") | ||
set(_limited_definition "Py_LIMITED_API=0x${_limited_api_version}0000") | ||
endif() | ||
add_python_extension(xxlimited REQUIRES IS_PY3 BUILD_TESTING | ||
SOURCES xxlimited.c | ||
DEFINITIONS Py_LIMITED_API=0x${_limited_api_version}0000 | ||
DEFINITIONS ${_limited_definition} | ||
NO_INSTALL | ||
) | ||
add_python_extension(xxsubtype BUILTIN REQUIRES IS_PY3 SOURCES xxsubtype.c) | ||
|
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.
Should be
WIN32
, that way building inDebug
on windows using Ninja will work as expected.