Skip to content

Commit 8157e6a

Browse files
authored
Fix build with spaces
Building symenginepy as part of the SymForce build, I get an error currently if I try to build under a source directory with a space in the path: ``` [100%] Linking CXX shared library symengine_wrapper.cpython-38-x86_64-linux-gnu.so c++: error: test/build/symenginepy-prefix/src/symenginepy-build/build/lib.linux-x86_64-cpython-38/symengine/lib/version_script_symengine_wrapper.txt: No such file or directory make[5]: *** [symengine/lib/CMakeFiles/symengine_wrapper.dir/build.make:121: symengine/lib/symengine_wrapper.cpython-38-x86_64-linux-gnu.so] Error 1 make[4]: *** [CMakeFiles/Makefile2:132: symengine/lib/CMakeFiles/symengine_wrapper.dir/all] Error 2 make[3]: *** [Makefile:136: all] Error 2 error: error building project make[2]: *** [CMakeFiles/symenginepy.dir/build.make:86: symenginepy-prefix/src/symenginepy-stamp/symenginepy-build] Error 1 ``` This change seems to fix that. I'm not 100% sure in what scenarios this applies to a standalone build of symengine? But I figured I'd open a PR and propose this change Coming from here on the SymForce repo: symforce-org/symforce#414
1 parent bf8f69a commit 8157e6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/FindPython.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ macro(ADD_PYTHON_LIBRARY name)
130130
configure_file(${CMAKE_SOURCE_DIR}/cmake/version_script.txt
131131
${CMAKE_CURRENT_BINARY_DIR}/version_script_${name}.txt @ONLY)
132132
set_property(TARGET ${name} APPEND_STRING PROPERTY
133-
LINK_FLAGS " -Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/version_script_${name}.txt")
133+
LINK_FLAGS " \"-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/version_script_${name}.txt\"")
134134
ELSE()
135135
add_library(${name} SHARED ${ARGN})
136136
ENDIF()

0 commit comments

Comments
 (0)