@@ -35,39 +35,40 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
35
35
# Flags used by exes and by the simdjson library (project-wide flags)
36
36
#
37
37
add_library (simdjson-flags INTERFACE )
38
+ add_library (simdjson-internal -flags INTERFACE )
38
39
if (MSVC )
39
- target_compile_options (simdjson-flags INTERFACE /nologo /D_CRT_SECURE_NO_WARNINGS)
40
- target_compile_options (simdjson-flags INTERFACE /WX /W3 /sdl)
40
+ target_compile_options (simdjson-internal - flags INTERFACE /nologo /D_CRT_SECURE_NO_WARNINGS)
41
+ target_compile_options (simdjson-internal - flags INTERFACE /WX /W3 /sdl)
41
42
else ()
42
- target_compile_options (simdjson-flags INTERFACE -fPIC)
43
+ target_compile_options (simdjson-internal - flags INTERFACE -fPIC)
43
44
if (NOT SIMDJSON_GOOGLE_BENCHMARKS) # Google Benchmark can't be compiled without warnings with -Weffc++
44
- target_compile_options (simdjson-flags INTERFACE -Weffc++)
45
+ target_compile_options (simdjson-internal - flags INTERFACE -Weffc++)
45
46
endif ()
46
- target_compile_options (simdjson-flags INTERFACE -Werror -Wall -Wextra -Wsign-compare -Wshadow -Wwrite-strings -Wpointer-arith -Winit-self -Wconversion -Wno-sign-conversion)
47
+ target_compile_options (simdjson-internal - flags INTERFACE -Werror -Wall -Wextra -Wsign-compare -Wshadow -Wwrite-strings -Wpointer-arith -Winit-self -Wconversion -Wno-sign-conversion)
47
48
endif ()
48
49
49
50
# Optional flags
50
51
option (SIMDJSON_IMPLEMENTATION_HASWELL "Include the haswell implementation" ON )
51
52
if (NOT SIMDJSON_IMPLEMENTATION_HASWELL)
52
- target_compile_definitions (simdjson-flags INTERFACE SIMDJSON_IMPLEMENTATION_HASWELL=0)
53
+ target_compile_definitions (simdjson-internal - flags INTERFACE SIMDJSON_IMPLEMENTATION_HASWELL=0)
53
54
endif ()
54
55
option (SIMDJSON_IMPLEMENTATION_WESTMERE "Include the westmere implementation" ON )
55
56
if (NOT SIMDJSON_IMPLEMENTATION_WESTMERE)
56
- target_compile_definitions (simdjson-flags INTERFACE SIMDJSON_IMPLEMENTATION_WESTMERE=0)
57
+ target_compile_definitions (simdjson-internal - flags INTERFACE SIMDJSON_IMPLEMENTATION_WESTMERE=0)
57
58
endif ()
58
59
option (SIMDJSON_IMPLEMENTATION_ARM64 "Include the arm64 implementation" ON )
59
60
if (NOT SIMDJSON_IMPLEMENTATION_ARM64)
60
- target_compile_definitions (simdjson-flags INTERFACE SIMDJSON_IMPLEMENTATION_ARM64=0)
61
+ target_compile_definitions (simdjson-internal - flags INTERFACE SIMDJSON_IMPLEMENTATION_ARM64=0)
61
62
endif ()
62
63
option (SIMDJSON_IMPLEMENTATION_FALLBACK "Include the fallback implementation" ON )
63
64
if (NOT SIMDJSON_IMPLEMENTATION_FALLBACK)
64
- target_compile_definitions (simdjson-flags INTERFACE SIMDJSON_IMPLEMENTATION_FALLBACK=0)
65
+ target_compile_definitions (simdjson-internal - flags INTERFACE SIMDJSON_IMPLEMENTATION_FALLBACK=0)
65
66
endif ()
66
67
67
68
option (SIMDJSON_EXCEPTIONS "Enable simdjson's exception-throwing interface" ON )
68
69
if (NOT SIMDJSON_EXCEPTIONS)
69
70
message (STATUS "simdjson exception interface turned off. Code that does not check error codes will not compile." )
70
- target_compile_definitions (simdjson-flags INTERFACE SIMDJSON_EXCEPTIONS=0)
71
+ target_compile_definitions (simdjson-internal - flags INTERFACE SIMDJSON_EXCEPTIONS=0)
71
72
endif ()
72
73
73
74
option (SIMDJSON_ENABLE_THREADS "Enable threaded operation" ON )
@@ -105,3 +106,4 @@ if(${CMAKE_C_COMPILER_ID} MATCHES "Intel") # icc / icpc
105
106
endif ()
106
107
107
108
install (TARGETS simdjson-flags EXPORT simdjson-config)
109
+ install (TARGETS simdjson-internal -flags EXPORT simdjson-config)
0 commit comments