Skip to content

Commit d0aed86

Browse files
committed
cmake/vtkCompilerExtras: Remove "--no-undefined" gcc linker flag
This commit will help building VTK python wheels by removing the flag preventing the use of undefined symbol. On Linux (and macOS), the python symbols are resolved at runtime against the python symbols exposed by either the python library or the python executable.
1 parent fb181d5 commit d0aed86

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CMake/vtkCompilerExtras.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
2020
set(VTK_EXTRA_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings")
2121
endif()
2222
set(CMAKE_SHARED_LINKER_FLAGS
23-
"${VTK_EXTRA_SHARED_LINKER_FLAGS} -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
23+
"${VTK_EXTRA_SHARED_LINKER_FLAGS} -Wl,-lc ${CMAKE_SHARED_LINKER_FLAGS}")
2424
set(CMAKE_MODULE_LINKER_FLAGS
25-
"${VTK_EXTRA_SHARED_LINKER_FLAGS} -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
25+
"${VTK_EXTRA_SHARED_LINKER_FLAGS} -Wl,-lc ${CMAKE_SHARED_LINKER_FLAGS}")
2626
set (CMAKE_EXE_LINKER_FLAGS
27-
"${VTK_EXTRA_SHARED_LINKER_FLAGS} -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
27+
"${VTK_EXTRA_SHARED_LINKER_FLAGS} -Wl,-lc ${CMAKE_SHARED_LINKER_FLAGS}")
2828
endif()
2929

3030
# Set up the debug CXX_FLAGS for extra warnings

0 commit comments

Comments
 (0)