Skip to content

Commit

Permalink
cmake: enable CMAKE_POSITION_INDEPENDENT_CODE
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Jul 8, 2024
1 parent 6858c3b commit 53e1275
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion cmake/cpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,14 @@ set(THREAD_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)

include(FetchContent)

set(FETCHCONTENT_QUIET OFF)
set(FETCHCONTENT_UPDATES_DISCONNECTED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_Fortran_COMPILER OFF)

# ##############################################################################
# ABSEIL-CPP
# ##############################################################################
message(CHECK_START "Fetching Abseil-cpp")
list(APPEND CMAKE_MESSAGE_INDENT " ")
set(ABSL_USE_SYSTEM_INCLUDES ON)
Expand All @@ -59,6 +66,9 @@ FetchContent_MakeAvailable(absl)
list(POP_BACK CMAKE_MESSAGE_INDENT)
message(CHECK_PASS "fetched")

# ##############################################################################
# Protobuf
# ##############################################################################
message(CHECK_START "Fetching Protobuf")
list(APPEND CMAKE_MESSAGE_INDENT " ")
set(protobuf_BUILD_TESTS OFF)
Expand Down

0 comments on commit 53e1275

Please # to comment.