cmake: compile PIC with "-fPIC"
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
e531aa6289
commit
d942e06263
@ -95,6 +95,10 @@ add_subdirectory(lib/fmt EXCLUDE_FROM_ALL)
|
||||
endif(NOT CMAKE_CXX_FLAGS MATCHES "-fasynchronous-unwind-tables")
|
||||
endif(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
|
||||
if(NOT CMAKE_CXX_FLAGS MATCHES "-fPIC")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||
endif(NOT CMAKE_CXX_FLAGS MATCHES "-fPIC")
|
||||
|
||||
# inspired by https://medium.com/@alasher/colored-c-compiler-output-with-ninja-clang-gcc-10bfe7f2b949
|
||||
option (COLORS_FOREVER "Always produce ANSI-colored output (GNU/Clang only)." TRUE)
|
||||
if (${COLORS_FOREVER})
|
||||
|
Reference in New Issue
Block a user