Skip to content

Commit

Permalink
Enable PIC in all code under the tiledb directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
teo-tsirpanis committed Oct 23, 2023
1 parent dc437bd commit bc2abf2
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tiledb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ cmake_policy(SET CMP0063 NEW)
# * CMAKE_HP_PTHREADS_INIT - If the found thread library is the HP thread library.
find_package(Threads REQUIRED)

# Compile all core sources with PIC
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

############################################################
# Subdirectories
############################################################
Expand Down Expand Up @@ -446,9 +449,6 @@ add_custom_target(
COMMENT "Re-generate ${MGC_GZIPPED_BIN_INPUT_FILE} for embedded magic.mgc support"
)

# Compile all core sources with PIC
set_property(TARGET TILEDB_CORE_OBJECTS PROPERTY POSITION_INDEPENDENT_CODE ON)

target_include_directories(TILEDB_CORE_OBJECTS
PRIVATE
"${TILEDB_CORE_INCLUDE_DIR}"
Expand All @@ -472,9 +472,6 @@ if (WIN32 AND TILEDB_STATIC)
baseline # $<TARGET_OBJECTS:baseline>
)

# Compile all core sources with PIC
set_property(TARGET TILEDB_CORE_OBJECTS_STATIC PROPERTY POSITION_INDEPENDENT_CODE ON)

target_compile_definitions(TILEDB_CORE_OBJECTS_STATIC
PRIVATE
-DTILEDB_STATIC_DEFINE
Expand Down

0 comments on commit bc2abf2

Please sign in to comment.