Skip to content

Commit f0bdff0

Browse files
committed
format
1 parent d15a3a1 commit f0bdff0

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

CMakeLists.txt

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,21 @@ project(
2525
# Fixes for Linux wheels
2626
# =============================================================================
2727

28-
# Force PIE for all executables (idraw, nrniv, etc.)
29-
# This was the root cause of the original "invalid ELF header: RTLD_GLOBAL" error.
28+
# Force PIE for all executables (idraw, nrniv, etc.) This was the root cause of the original
29+
# "invalid ELF header: RTLD_GLOBAL" error.
3030
cmake_policy(SET CMP0083 NEW)
31-
set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "Force PIE for NEURON + InterViews" FORCE)
32-
33-
# Disable fragile dynamic X11 loading *only* for Linux wheels.
34-
# This was triggering the (null) RTLD_GLOBAL error.
35-
# macOS wheels and normal/local Linux builds keep the original default (ON).
36-
if(SKBUILD AND UNIX AND NOT APPLE)
37-
set(IV_ENABLE_X11_DYNAMIC OFF CACHE BOOL "Disable on Linux wheels" FORCE)
31+
set(CMAKE_POSITION_INDEPENDENT_CODE
32+
ON
33+
CACHE BOOL "Force PIE for NEURON + InterViews" FORCE)
34+
35+
# Disable fragile dynamic X11 loading *only* for Linux wheels. This was triggering the (null)
36+
# RTLD_GLOBAL error. macOS wheels and normal/local Linux builds keep the original default (ON).
37+
if(SKBUILD
38+
AND UNIX
39+
AND NOT APPLE)
40+
set(IV_ENABLE_X11_DYNAMIC
41+
OFF
42+
CACHE BOOL "Disable on Linux wheels" FORCE)
3843
endif()
3944

4045
# =============================================================================

0 commit comments

Comments
 (0)