Making the project tag in simdjson more explicit and disabling LTO (#452)
* Making the project tag in simdjson more explicit * Let us disable deliberately LTO.
This commit is contained in:
parent
ab6d4871d8
commit
33060738b6
|
@ -1,10 +1,23 @@
|
||||||
cmake_minimum_required(VERSION 3.9) # CMP0069 NEW
|
cmake_minimum_required(VERSION 3.9) # CMP0069 NEW
|
||||||
include(CheckIPOSupported)
|
|
||||||
check_ipo_supported(RESULT ltoresult)
|
if (NOT CMAKE_BUILD_TYPE)
|
||||||
if(ltoresult)
|
message(STATUS "No build type selected, default to Release")
|
||||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
project(simdjson
|
||||||
|
DESCRIPTION "Parsing gigabytes of JSON per second"
|
||||||
|
LANGUAGES CXX
|
||||||
|
)
|
||||||
|
|
||||||
|
# LTO seems to create all sorts of fun problems. Let us
|
||||||
|
# disable temporarily.
|
||||||
|
#include(CheckIPOSupported)
|
||||||
|
#check_ipo_supported(RESULT ltoresult)
|
||||||
|
#if(ltoresult)
|
||||||
|
#set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||||
|
#endif()
|
||||||
|
|
||||||
# usage: cmake -DSIMDJSON_DISABLE_AVX=on ..
|
# usage: cmake -DSIMDJSON_DISABLE_AVX=on ..
|
||||||
option(SIMDJSON_DISABLE_AVX "Forcefully disable AVX even if hardware supports it" OFF)
|
option(SIMDJSON_DISABLE_AVX "Forcefully disable AVX even if hardware supports it" OFF)
|
||||||
|
|
||||||
|
@ -14,12 +27,8 @@ set(CMAKE_MACOSX_RPATH OFF)
|
||||||
set(CMAKE_THREAD_PREFER_PTHREAD ON)
|
set(CMAKE_THREAD_PREFER_PTHREAD ON)
|
||||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
|
|
||||||
if (NOT CMAKE_BUILD_TYPE)
|
|
||||||
message(STATUS "No build type selected, default to Release")
|
|
||||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
project(simdjson)
|
|
||||||
set(SIMDJSON_LIB_NAME simdjson)
|
set(SIMDJSON_LIB_NAME simdjson)
|
||||||
set(PROJECT_VERSION_MAJOR 0)
|
set(PROJECT_VERSION_MAJOR 0)
|
||||||
set(PROJECT_VERSION_MINOR 2)
|
set(PROJECT_VERSION_MINOR 2)
|
||||||
|
|
|
@ -5,6 +5,14 @@ if(MSVC)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_cpp_test(basictests)
|
add_cpp_test(basictests)
|
||||||
|
|
||||||
|
## Next bit should not be needed!
|
||||||
|
#if(CMAKE_INTERPROCEDURAL_OPTIMIZATION)
|
||||||
|
# next line is a workaround for an odr-violation in basictests regarding the globals 0x432a40 and 0x52045c under clang
|
||||||
|
#set_tests_properties(basictests PROPERTIES
|
||||||
|
# ENVIRONMENT ASAN_OPTIONS="detect_odr_violation=0")
|
||||||
|
#endif()
|
||||||
|
|
||||||
add_cpp_test(jsoncheck)
|
add_cpp_test(jsoncheck)
|
||||||
add_cpp_test(jsonstream_test)
|
add_cpp_test(jsonstream_test)
|
||||||
add_cpp_test(pointercheck)
|
add_cpp_test(pointercheck)
|
||||||
|
|
Loading…
Reference in New Issue