Skip to content

Commit b7ea114

Browse files
authored
Fixes #101: python_wrapper_helper uses CMAKE_CXX_STANDARD (#103)
1 parent fff479a commit b7ea114

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

cmake/python-binding.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ set(PYTHON_WRAPPER_HELPER_DIR ${CMAKE_CURRENT_LIST_DIR}/python)
1313
function(generate_python_binding_source_code WORKING_DIR)
1414

1515
message(STATUS "Generating python binding source code at ${WORKING_DIR}" )
16-
configure_file(${PYTHON_WRAPPER_HELPER_DIR}/python_wrapper_helper.py python_wrapper_helper.py COPYONLY)
16+
configure_file(
17+
${PYTHON_WRAPPER_HELPER_DIR}/python_wrapper_helper.py.in
18+
python_wrapper_helper.py
19+
@ONLY
20+
)
1721

1822
set(PYTHON_CMD python)
1923
if ( PYTHON_BINDINGS )

cmake/python/python_wrapper_helper.py renamed to cmake/python/python_wrapper_helper.py.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ def generate_python_wrapper(header_directories, include_paths, library_name, cpp
7979
start_with_declarations=declarations)
8080

8181
# Set include dirs and cflags to avoid warnings and errors
82-
xml_generator_config.append_cflags("-std=c++11")
82+
xml_generator_config.append_cflags("-std=c++@CMAKE_CXX_STANDARD@")
83+
xml_generator_config.append_cflags("-Wno-error=invalid-constexpr")
8384

8485
for inc_dir in include_paths:
8586
xml_generator_config.include_paths.append(inc_dir)

doc/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
## Latest changes
33
* Use target python version for build
44
* Fix: Ensure maxSpeedOnAcceleration only limits the actual acceleration while reponse time.
5+
* `python_wrapper_helper.py` is now generated by cmake so that it uses the
6+
proper C++ standard.
57

68
## Release 4.4.0
79

0 commit comments

Comments
 (0)