mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
Fix PCH build failure with <bit> on non-C++20 compilers (#2646)
* Added benchmarks for on-demand get_int64 and get_double * Remove local IDE settings * Fix PCH build failure with <bit> on non-C++20 compilers * Update bench_dom_api.cpp
This commit is contained in:
+11
-2
@@ -92,13 +92,16 @@ add_library(simdjson ${SIMDJSON_SOURCES})
|
||||
add_library(simdjson::simdjson ALIAS simdjson)
|
||||
set(SIMDJSON_LIBRARIES simdjson)
|
||||
|
||||
# Check for <bit> header compatibility
|
||||
include(CheckIncludeFileCXX)
|
||||
check_include_file_cxx(bit SIMDJSON_HAS_BIT_HEADER)
|
||||
|
||||
# Enable precompiled headers for faster builds
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.16")
|
||||
target_precompile_headers(simdjson PRIVATE
|
||||
set(SIMDJSON_PRECOMPILE_HEADERS
|
||||
<algorithm>
|
||||
<array>
|
||||
<atomic>
|
||||
<bit>
|
||||
<cassert>
|
||||
<cctype>
|
||||
<cerrno>
|
||||
@@ -111,6 +114,12 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.16")
|
||||
<utility>
|
||||
<vector>
|
||||
)
|
||||
|
||||
if(SIMDJSON_HAS_BIT_HEADER)
|
||||
list(APPEND SIMDJSON_PRECOMPILE_HEADERS <bit>)
|
||||
endif()
|
||||
|
||||
target_precompile_headers(simdjson PRIVATE ${SIMDJSON_PRECOMPILE_HEADERS})
|
||||
endif()
|
||||
|
||||
if(SIMDJSON_BUILD_STATIC_LIB)
|
||||
|
||||
Reference in New Issue
Block a user