Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
8a4bca82
Unverified
Commit
8a4bca82
authored
Aug 08, 2022
by
Daniel Dinu
Committed by
GitHub
Aug 08, 2022
Browse files
fix(cmake): use case-insensitive CMAKE_BUILD_TYPE comparisons (#4078)
parent
29f4940c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
tools/pybind11NewTools.cmake
tools/pybind11NewTools.cmake
+3
-1
tools/pybind11Tools.cmake
tools/pybind11Tools.cmake
+3
-1
No files found.
tools/pybind11NewTools.cmake
View file @
8a4bca82
...
@@ -233,7 +233,9 @@ function(pybind11_add_module target_name)
...
@@ -233,7 +233,9 @@ function(pybind11_add_module target_name)
endif
()
endif
()
endif
()
endif
()
if
(
NOT MSVC AND NOT
${
CMAKE_BUILD_TYPE
}
MATCHES Debug|RelWithDebInfo
)
# Use case-insensitive comparison to match the result of $<CONFIG:cfgs>
string
(
TOUPPER
"
${
CMAKE_BUILD_TYPE
}
"
uppercase_CMAKE_BUILD_TYPE
)
if
(
NOT MSVC AND NOT
${
uppercase_CMAKE_BUILD_TYPE
}
MATCHES DEBUG|RELWITHDEBINFO
)
# Strip unnecessary sections of the binary on Linux/macOS
# Strip unnecessary sections of the binary on Linux/macOS
pybind11_strip
(
${
target_name
}
)
pybind11_strip
(
${
target_name
}
)
endif
()
endif
()
...
...
tools/pybind11Tools.cmake
View file @
8a4bca82
...
@@ -208,7 +208,9 @@ function(pybind11_add_module target_name)
...
@@ -208,7 +208,9 @@ function(pybind11_add_module target_name)
endif
()
endif
()
endif
()
endif
()
if
(
NOT MSVC AND NOT
${
CMAKE_BUILD_TYPE
}
MATCHES Debug|RelWithDebInfo
)
# Use case-insensitive comparison to match the result of $<CONFIG:cfgs>
string
(
TOUPPER
"
${
CMAKE_BUILD_TYPE
}
"
uppercase_CMAKE_BUILD_TYPE
)
if
(
NOT MSVC AND NOT
${
uppercase_CMAKE_BUILD_TYPE
}
MATCHES DEBUG|RELWITHDEBINFO
)
pybind11_strip
(
${
target_name
}
)
pybind11_strip
(
${
target_name
}
)
endif
()
endif
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment