Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
Power System Simulation and Optimization
DPsim
DPsim
Commits
bbbe1667
Commit
bbbe1667
authored
Apr 06, 2018
by
Steffen Vogel
🎅🏼
Browse files
python: fix compilation of DPsim extension in debug mode via setuptools
parent
267ee150
Changes
1
Hide whitespace changes
Inline
Side-by-side
setup.py
View file @
bbbe1667
...
...
@@ -36,17 +36,19 @@ class CMakeBuild(build_ext):
'-DBUILD_EXAMPLES=OFF'
]
cfg
=
'Debug'
if
self
.
debug
else
'Release'
build_args
=
[
'--config'
,
cfg
]
cmake_args
=
[
'-DCMAKE_BUILD_TYPE='
+
cfg
]
print
(
"building CMake extension in %s configuration"
%
cfg
)
if
platform
.
system
()
==
"Windows"
:
cmake_args
+=
[
'-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG='
+
extdir
]
cmake_args
+=
[
'-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE='
+
extdir
]
if
sys
.
maxsize
>
2
**
32
:
cmake_args
+=
[
'-A'
,
'x64'
]
build_args
+
=
[
'--'
,
'/m'
]
build_args
=
[
'--'
,
'/m'
]
else
:
cmake_args
+=
[
'-DCMAKE_LIBRARY_OUTPUT_DIRECTORY='
+
extdir
]
build_args
+
=
[
'--'
,
'-j4'
]
build_args
=
[
'--'
,
'-j4'
]
env
=
os
.
environ
.
copy
()
env
[
'CXXFLAGS'
]
=
'{} -DVERSION_INFO=
\\
"{}
\\
"'
.
format
(
env
.
get
(
'CXXFLAGS'
,
''
),
self
.
distribution
.
get_version
())
...
...
Write
Preview
Supports
Markdown
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