Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lib_json/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ if(BUILD_SHARED_LIBS)
OUTPUT_NAME jsoncpp
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_SOVERSION}
POSITION_INDEPENDENT_CODE ON
POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS}
Copy link
Contributor

@SpaceIm SpaceIm Nov 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's the BUILD_SHARED_LIBS branch, so it's always ON in this block. And actually forcing POSITION_INDEPENDENT_CODE for a shared lib is useless because it's implicit in CMake. Therefore this line could be removed, it's misleading.

)

# Set library's runtime search path on OSX
Expand Down Expand Up @@ -180,7 +180,7 @@ if(BUILD_OBJECT_LIBS)
OUTPUT_NAME jsoncpp
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_SOVERSION}
POSITION_INDEPENDENT_CODE ON
POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS}
Copy link
Contributor

@SpaceIm SpaceIm Nov 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it really make sense? I would have removed it, that's all (same behavior than STATIC). I mean, BUILD_SHARED_LIBS is orthogonal to BUILD_OBJECT_LIBS.

)

# Set library's runtime search path on OSX
Expand Down