Skip to content

Commit e6c83f0

Browse files
committedOct 3, 2021
use std::string_view only when V8PP_USE_STD_STRING_VIEW=1
add build option, use it in the generated config.hpp See #166 (cherry picked from commit ba4b891)
1 parent ee86bc7 commit e6c83f0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
 

‎CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ set(V8PP_HEADER_ONLY 0 CACHE BOOL "Header-only library")
2020
set(V8PP_ISOLATE_DATA_SLOT 0 CACHE STRING "v8::Isolate data slot number, used in v8pp for shared data")
2121
set(V8PP_PLUGIN_INIT_PROC_NAME "v8pp_module_init" CACHE STRING "v8pp plugin initialization procedure name")
2222
set(V8PP_PLUGIN_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX} CACHE STRING "v8pp plugin filename suffix")
23-
option(V8_COMPRESS_POINTERS "Use new V8 ABI with V8_COMPRESS_POINTERS and V8_31BIT_SMIS_ON_64BIT_ARCH" ON)
23+
set(V8_COMPRESS_POINTERS 1 CACHE BOOL "Use new V8 ABI with V8_COMPRESS_POINTERS and V8_31BIT_SMIS_ON_64BIT_ARCH")
2424

2525
if(BUILD_SHARED_LIBS AND WIN32)
2626
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS true)

‎v8pp/config.hpp.in

+2
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,6 @@ v8::Local<v8::Value> V8PP_PLUGIN_INIT_PROC_NAME(isolate)
5151
#define V8PP_IMPL
5252
#endif
5353

54+
#define V8PP_USE_STD_STRING_VIEW 1
55+
5456
#endif // V8PP_CONFIG_HPP_INCLUDED

0 commit comments

Comments
 (0)