Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
607654f7
Commit
607654f7
authored
Oct 13, 2015
by
Wenzel Jakob
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows fixes
parent
db028d68
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
CMakeLists.txt
+10
-2
example/run_test.py
+5
-1
No files found.
CMakeLists.txt
View file @
607654f7
...
@@ -80,8 +80,16 @@ add_library(example SHARED
...
@@ -80,8 +80,16 @@ add_library(example SHARED
# Don't add a 'lib' prefix to the shared library
# Don't add a 'lib' prefix to the shared library
set_target_properties
(
example PROPERTIES PREFIX
""
)
set_target_properties
(
example PROPERTIES PREFIX
""
)
# Write the output file directly into the 'example' directory
# Always write the output file directly into the 'example' directory (even on MSVC)
set_target_properties
(
example PROPERTIES LIBRARY_OUTPUT_DIRECTORY
${
PROJECT_SOURCE_DIR
}
/example
)
set
(
CompilerFlags
LIBRARY_OUTPUT_DIRECTORY LIBRARY_OUTPUT_DIRECTORY_RELEASE LIBRARY_OUTPUT_DIRECTORY_DEBUG
LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO
RUNTIME_OUTPUT_DIRECTORY RUNTIME_OUTPUT_DIRECTORY_RELEASE RUNTIME_OUTPUT_DIRECTORY_DEBUG
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO
)
foreach
(
CompilerFlag
${
CompilerFlags
}
)
set_target_properties
(
example PROPERTIES
${
CompilerFlag
}
${
PROJECT_SOURCE_DIR
}
/example
)
endforeach
()
if
(
WIN32
)
if
(
WIN32
)
if
(
MSVC
)
if
(
MSVC
)
...
...
example/run_test.py
View file @
607654f7
...
@@ -5,7 +5,7 @@ import subprocess
...
@@ -5,7 +5,7 @@ import subprocess
remove_unicode_marker
=
re
.
compile
(
r'u(\'[^\']*\')'
)
remove_unicode_marker
=
re
.
compile
(
r'u(\'[^\']*\')'
)
remove_long_marker
=
re
.
compile
(
r'([0-9])L'
)
remove_long_marker
=
re
.
compile
(
r'([0-9])L'
)
remove_hex
=
re
.
compile
(
r'0x[0-9a-f]+'
)
remove_hex
=
re
.
compile
(
r'0x[0-9a-f
A-F
]+'
)
shorten_floats
=
re
.
compile
(
r'([1-9][0-9]*\.[0-9]{4})[0-9]*'
)
shorten_floats
=
re
.
compile
(
r'([1-9][0-9]*\.[0-9]{4})[0-9]*'
)
...
@@ -23,6 +23,10 @@ def sanitize(lines):
...
@@ -23,6 +23,10 @@ def sanitize(lines):
line
=
line
.
replace
(
'example.'
,
''
)
line
=
line
.
replace
(
'example.'
,
''
)
line
=
line
.
replace
(
'method of builtins.PyCapsule instance'
,
''
)
line
=
line
.
replace
(
'method of builtins.PyCapsule instance'
,
''
)
line
=
line
.
strip
()
line
=
line
.
strip
()
if
sys
.
platform
==
'win32'
:
lower
=
line
.
lower
()
if
'constructor'
in
lower
or
'destructor'
in
lower
or
'ref'
in
lower
:
line
=
""
lines
[
i
]
=
line
lines
[
i
]
=
line
lines
=
'
\n
'
.
join
(
sorted
([
l
for
l
in
lines
if
l
!=
""
]))
lines
=
'
\n
'
.
join
(
sorted
([
l
for
l
in
lines
if
l
!=
""
]))
...
...
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