Fix for issue 1014. (#1015)

* Fix for issue 1014.

* Explanation.

Co-authored-by: Daniel Lemire <lemire@gmai.com>
This commit is contained in:
Daniel Lemire 2020-06-30 19:36:26 -04:00 committed by GitHub
parent 1a1e7edb02
commit 0ef4d90ad0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 37 additions and 11 deletions

View File

@ -7,8 +7,8 @@ project(simdjson
set(PROJECT_VERSION_MAJOR 0)
set(PROJECT_VERSION_MINOR 4)
set(PROJECT_VERSION_PATCH 4)
set(SIMDJSON_LIB_VERSION "0.4.4" CACHE STRING "simdjson library version")
set(PROJECT_VERSION_PATCH 5)
set(SIMDJSON_LIB_VERSION "0.4.5" CACHE STRING "simdjson library version")
set(SIMDJSON_LIB_SOVERSION "2" CACHE STRING "simdjson library soversion")
set(SIMDJSON_GITHUB_REPOSITORY https://github.com/simdjson/simdjson)

View File

@ -38,7 +38,7 @@ PROJECT_NAME = simdjson
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = "0.4.4"
PROJECT_NUMBER = "0.4.5"
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a

View File

@ -4,7 +4,7 @@
#define SIMDJSON_SIMDJSON_VERSION_H
/** The version of simdjson being used (major.minor.revision) */
#define SIMDJSON_VERSION 0.4.4
#define SIMDJSON_VERSION 0.4.5
namespace simdjson {
enum {
@ -19,7 +19,7 @@ enum {
/**
* The revision (major.minor.REVISION) of simdjson being used.
*/
SIMDJSON_VERSION_REVISION = 4
SIMDJSON_VERSION_REVISION = 5
};
} // namespace simdjson

View File

@ -1,4 +1,4 @@
/* auto-generated on Tue 30 Jun 2020 09:41:13 EDT. Do not edit! */
/* auto-generated on Tue Jun 30 19:29:34 EDT 2020. Do not edit! */
#include <iostream>
#include "simdjson.h"

View File

@ -1,4 +1,4 @@
/* auto-generated on Tue 30 Jun 2020 09:41:13 EDT. Do not edit! */
/* auto-generated on Tue Jun 30 19:29:34 EDT 2020. Do not edit! */
/* begin file src/simdjson.cpp */
#include "simdjson.h"

View File

@ -1,4 +1,4 @@
/* auto-generated on Tue 30 Jun 2020 09:41:13 EDT. Do not edit! */
/* auto-generated on Tue Jun 30 19:29:34 EDT 2020. Do not edit! */
/* begin file include/simdjson.h */
#ifndef SIMDJSON_H
#define SIMDJSON_H
@ -2040,7 +2040,7 @@ SIMDJSON_DISABLE_UNDESIRED_WARNINGS
#define SIMDJSON_SIMDJSON_VERSION_H
/** The version of simdjson being used (major.minor.revision) */
#define SIMDJSON_VERSION 0.4.4
#define SIMDJSON_VERSION 0.4.5
namespace simdjson {
enum {
@ -2055,7 +2055,7 @@ enum {
/**
* The revision (major.minor.REVISION) of simdjson being used.
*/
SIMDJSON_VERSION_REVISION = 4
SIMDJSON_VERSION_REVISION = 5
};
} // namespace simdjson

View File

@ -78,7 +78,17 @@ if(NOT MSVC)
## We output the library at the root of the current directory where cmake is invoked
## This is handy but Visual Studio will happily ignore us
set_target_properties(simdjson PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
MESSAGE( STATUS "Library output directory (does not apply to Visual Studio): " ${PROJECT_BINARY_DIR})
MESSAGE( STATUS "Library output directory: " ${PROJECT_BINARY_DIR})
############
# Please do not delete the following, our users want version numbers. See
# https://github.com/simdjson/simdjson/issues/1014
# https://github.com/simdjson/simdjson/issues/52
###########
set_target_properties(simdjson PROPERTIES VERSION ${SIMDJSON_LIB_VERSION} SOVERSION ${SIMDJSON_LIB_SOVERSION})
##########
# End of the do-not-delete message.
#########
endif()
#

View File

@ -177,4 +177,20 @@ endif()
# target_link_libraries(singleheader simdjson simdjson-flags)
# add_test(singleheader singleheader)
if(NOT MSVC)
######
# This tests is to guard us against ever again removing the soversion
# and version numbers from the library. See Bug
# https://github.com/simdjson/simdjson/issues/1014
#####
get_target_property(REPORTED_SIMDJSON_VERSION simdjson VERSION)
get_target_property(REPORTED_SIMDJSON_SOVERSION simdjson SOVERSION)
if(NOT ${REPORTED_SIMDJSON_VERSION} STREQUAL ${SIMDJSON_LIB_VERSION})
message(FATAL_ERROR "The library target does not have the proper version information." )
endif()
if(NOT ${REPORTED_SIMDJSON_SOVERSION} STREQUAL ${SIMDJSON_LIB_SOVERSION})
message(FATAL_ERROR "The library target does not have the proper soversion information." )
endif()
endif()
add_subdirectory(compilation_failure_tests)