Skip to content

Commit 8764f42

Browse files
author
Daniel Lemire
committed
Fix for issue 1013.
1 parent 858036b commit 8764f42

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ add_subdirectory(windows)
4747
if(NOT(SIMDJSON_JUST_LIBRARY))
4848
add_subdirectory(dependencies) ## This needs to be before tools because of cxxopts
4949
add_subdirectory(tools) ## This needs to be before tests because of cxxopts
50+
add_subdirectory(singleheader)
5051
endif()
51-
add_subdirectory(singleheader)
52+
install(FILES singleheader/simdjson.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
5253

5354
#
5455
# Compile tools / tests / benchmarks

src/CMakeLists.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,16 @@ if(NOT MSVC)
8484
# Please do not delete the following, our users want version numbers. See
8585
# https://github.com/simdjson/simdjson/issues/1014
8686
# https://github.com/simdjson/simdjson/issues/52
87-
###########
88-
set_target_properties(simdjson PROPERTIES VERSION ${SIMDJSON_LIB_VERSION} SOVERSION ${SIMDJSON_LIB_SOVERSION})
87+
###########
88+
# We deliberately omit VERSION ${SIMDJSON_LIB_VERSION} since our version numbers do not follow
89+
# the sonumber. The important point is that the soversion matches ABI compatibility. In simdjson
90+
# version 0.2.0, 0.3.0 and 0.4.0 are not binary compatible.
91+
#
92+
# The soversion and the library version numbers are different numbers. It is common but
93+
# not universal that the major version number is also the soversion number. However, there
94+
# are notable exceptions. For example, glibc version 2.23 has a soversion of 6.
95+
############
96+
set_target_properties(simdjson PROPERTIES SOVERSION ${SIMDJSON_LIB_SOVERSION})
8997
##########
9098
# End of the do-not-delete message.
9199
#########

tests/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,10 @@ endif()
180180
if(NOT MSVC)
181181
######
182182
# This tests is to guard us against ever again removing the soversion
183-
# and version numbers from the library. See Bug
183+
# number from the library. See Bug
184184
# https://github.com/simdjson/simdjson/issues/1014
185185
#####
186-
get_target_property(REPORTED_SIMDJSON_VERSION simdjson VERSION)
187186
get_target_property(REPORTED_SIMDJSON_SOVERSION simdjson SOVERSION)
188-
if(NOT ${REPORTED_SIMDJSON_VERSION} STREQUAL ${SIMDJSON_LIB_VERSION})
189-
message(FATAL_ERROR "The library target does not have the proper version information." )
190-
endif()
191187
if(NOT ${REPORTED_SIMDJSON_SOVERSION} STREQUAL ${SIMDJSON_LIB_SOVERSION})
192188
message(FATAL_ERROR "The library target does not have the proper soversion information." )
193189
endif()

0 commit comments

Comments
 (0)