aboutsummaryrefslogtreecommitdiff
path: root/driver_library
diff options
context:
space:
mode:
authorMikael Olsson <mikael.olsson@arm.com>2023-04-18 12:36:33 +0200
committerMikael Olsson <mikael.olsson@arm.com>2023-04-20 16:01:51 +0200
commit4f795b3bdf69627ff114523f823b5f9c9003ec30 (patch)
tree741fe6ded9670c6bd568d71f860ccb245e213b8f /driver_library
parente7461c78b13a769b14dc4841571dfc6c276f349d (diff)
downloadethos-u-linux-driver-stack-4f795b3bdf69627ff114523f823b5f9c9003ec30.tar.gz
Fix compiler flag passing in Python API CMake file23.05-rc1
To support cross-compilation of the driver library Swig C wrapper for the Python API, the CMake file must pass on the C and CXX flags that have been setup by the build environment so that the correct flags, include paths etc are used when building the wrapper. Change-Id: I6288016056c5a4eeef1162ea2a9afb1e3ab4b86a
Diffstat (limited to 'driver_library')
-rw-r--r--driver_library/python/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/driver_library/python/CMakeLists.txt b/driver_library/python/CMakeLists.txt
index a16c612..41fcd1a 100644
--- a/driver_library/python/CMakeLists.txt
+++ b/driver_library/python/CMakeLists.txt
@@ -68,7 +68,7 @@ if(BUILD_PYTHON_WHL)
set(OUT_WHL "${CMAKE_CURRENT_BINARY_DIR}/pydriver.whl.timestamp")
add_custom_command(OUTPUT ${OUT_WHL}
COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green "Building Python binary package ..."
- COMMAND ${CMAKE_COMMAND} -E env ${DRIVER_ENV} CXX=${CMAKE_CXX_COMPILER} CC=${CMAKE_C_COMPILER} ${PYTHON_EXECUTABLE} ${SETUP_PY} bdist_wheel
+ COMMAND ${CMAKE_COMMAND} -E env ${DRIVER_ENV} CXX=${CMAKE_CXX_COMPILER} CXXFLAGS=${CMAKE_CXX_FLAGS} CC=${CMAKE_C_COMPILER} CFLAGS=${CMAKE_C_FLAGS} ${PYTHON_EXECUTABLE} ${SETUP_PY} bdist_wheel
COMMAND ${CMAKE_COMMAND} -E touch ${OUT_WHL}
DEPENDS ${OUT_WRAP})
endif()