Skip to content

Commit 4a14f0e

Browse files
committed
Linux Clang compiler flags
1 parent 58ae777 commit 4a14f0e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmake/compilers.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ if(NOT abi_ok)
1010
endif()
1111
endif()
1212

13+
# fixes errors about needing -fPIE
14+
if(CMAKE_SYSTEM_NAME STREQUAL Linux AND CMAKE_CXX_COMPILER_ID STREQUAL Clang)
15+
set(CMAKE_POSITION_INDEPENDENT_CODE true)
16+
endif()
17+
1318
# --- compiler options
1419

1520
if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)

0 commit comments

Comments
 (0)