File: CMakeLists.txt

package info (click to toggle)
simdjson 4.3.1-4
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 31,396 kB
  • sloc: cpp: 195,760; ansic: 20,954; sh: 1,126; python: 885; makefile: 47; ruby: 25; javascript: 13
file content (50 lines) | stat: -rw-r--r-- 1,477 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
add_subdirectory(dom)


include_directories( . linux )
link_libraries(simdjson-windows-headers test-data)
link_libraries(simdjson)
if(SIMDJSON_STATIC_REFLECTION)
  add_compile_definitions(SIMDJSON_STATIC_REFLECTION=1)
endif(SIMDJSON_STATIC_REFLECTION)

add_executable(benchfeatures benchfeatures.cpp)
add_executable(get_corpus_benchmark get_corpus_benchmark.cpp)

if (TARGET benchmark::benchmark)
  link_libraries(benchmark::benchmark)
  add_executable(bench_parse_call bench_parse_call.cpp)
  add_executable(bench_dom_api bench_dom_api.cpp)
  if(SIMDJSON_EXCEPTIONS)
    add_executable(bench_ondemand bench_ondemand.cpp)
    if(TARGET yyjson)
      target_link_libraries(bench_ondemand PRIVATE yyjson)
    endif()
    if(TARGET rapidjson)
      target_link_libraries(bench_ondemand PRIVATE rapidjson)
    endif()
    if(TARGET sajson)
      target_link_libraries(bench_ondemand PRIVATE sajson)
    endif()
    if(TARGET nlohmann_json)
      target_link_libraries(bench_ondemand PRIVATE nlohmann_json)
    endif()
    if(TARGET boostjson)
      target_link_libraries(bench_ondemand PRIVATE boostjson)
    endif()
  endif()
endif()


include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-std=c++20" SIMDJSON_COMPILER_SUPPORTS_CXX20)
if(SIMDJSON_STATIC_REFLECTION)
  add_subdirectory(static_reflect)
else()
  if(SIMDJSON_EXCEPTIONS AND SIMDJSON_COMPILER_SUPPORTS_CXX20)
    add_subdirectory(from)
    add_subdirectory(car_builder)
  endif()
endif(SIMDJSON_STATIC_REFLECTION)