File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.9 ) # CMP0069 NEW
2- include ( CheckIPOSupported )
3- check_ipo_supported ( RESULT ltoresult )
4- if (ltoresult )
5- set (CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE )
2+
3+ if ( NOT CMAKE_BUILD_TYPE )
4+ message ( STATUS "No build type selected, default to Release" )
5+ set (CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE )
66endif ()
77
8+ project (simdjson
9+ DESCRIPTION "Parsing gigabytes of JSON per second"
10+ LANGUAGES CXX
11+ )
12+
13+ # LTO seems to create all sorts of fun problems. Let us
14+ # disable temporarily.
15+ #include(CheckIPOSupported)
16+ #check_ipo_supported(RESULT ltoresult)
17+ #if(ltoresult)
18+ #set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
19+ #endif()
20+
821# usage: cmake -DSIMDJSON_DISABLE_AVX=on ..
922option (SIMDJSON_DISABLE_AVX "Forcefully disable AVX even if hardware supports it" OFF )
1023
@@ -14,12 +27,8 @@ set(CMAKE_MACOSX_RPATH OFF)
1427set (CMAKE_THREAD_PREFER_PTHREAD ON )
1528set (THREADS_PREFER_PTHREAD_FLAG ON )
1629
17- if (NOT CMAKE_BUILD_TYPE )
18- message (STATUS "No build type selected, default to Release" )
19- set (CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE )
20- endif ()
2130
22- project (simdjson)
31+
2332set (SIMDJSON_LIB_NAME simdjson)
2433set (PROJECT_VERSION_MAJOR 0)
2534set (PROJECT_VERSION_MINOR 2)
Original file line number Diff line number Diff line change @@ -5,6 +5,14 @@ if(MSVC)
55endif ()
66
77add_cpp_test (basictests )
8+
9+ ## Next bit should not be needed!
10+ #if(CMAKE_INTERPROCEDURAL_OPTIMIZATION)
11+ # next line is a workaround for an odr-violation in basictests regarding the globals 0x432a40 and 0x52045c under clang
12+ #set_tests_properties(basictests PROPERTIES
13+ # ENVIRONMENT ASAN_OPTIONS="detect_odr_violation=0")
14+ #endif()
15+
816add_cpp_test (jsoncheck )
917add_cpp_test (jsonstream_test )
1018add_cpp_test (pointercheck )
You can’t perform that action at this time.
0 commit comments