Sha256: 258817f0348536c3bb7b1add9562eb9fa9d411873531631b5df10568b2acf2dd

Contents?: true

Size: 1.95 KB

Versions: 16

Compression:

Stored size: 1.95 KB

Contents

cmake_minimum_required (VERSION 3.3.0 FATAL_ERROR)

set (examplesources
  cbor_to_jaxn.cpp
  cbor_to_json.cpp
  cbor_to_msgpack.cpp
  cbor_to_pretty_jaxn.cpp
  cbor_to_pretty_json.cpp
  cbor_to_ubjson.cpp
  jaxn_to_cbor.cpp
  jaxn_to_cplusplus.cpp
  jaxn_to_jaxn.cpp
  jaxn_to_msgpack.cpp
  jaxn_to_pretty_jaxn.cpp
  jaxn_to_ubjson.cpp
  json_to_cbor.cpp
  json_to_json.cpp
  json_to_msgpack.cpp
  json_to_pretty_json.cpp
  json_to_ubjson.cpp
  msgpack_to_cbor.cpp
  msgpack_to_jaxn.cpp
  msgpack_to_json.cpp
  msgpack_to_pretty_jaxn.cpp
  msgpack_to_pretty_json.cpp
  msgpack_to_ubjson.cpp
  printf_doubles.cpp
  ubjson_to_cbor.cpp
  ubjson_to_jaxn.cpp
  ubjson_to_json.cpp
  ubjson_to_msgpack.cpp
  ubjson_to_pretty_jaxn.cpp
  ubjson_to_pretty_json.cpp
  validate_event_order.cpp
  validate_integer.cpp
)

# file (GLOB ...) is used to validate the above list of example_sources
file (GLOB glob_example_sources RELATIVE ${CMAKE_CURRENT_LIST_DIR} *.cpp)

foreach (examplesourcefile ${examplesources})
  if (${examplesourcefile} IN_LIST glob_example_sources)
    list (REMOVE_ITEM glob_example_sources ${examplesourcefile})
  else ()
    message (SEND_ERROR "File ${examplesourcefile} is missing from src/example/json")
  endif ()
  get_filename_component (exename ${examplesourcefile} NAME_WE)
  set (exename "tao-json-example-${exename}")
  add_executable (${exename} ${examplesourcefile})
  target_link_libraries (${exename} PRIVATE taocpp::json)
  set_target_properties (${exename} PROPERTIES
    CXX_STANDARD 11
    CXX_STANDARD_REQUIRED ON
    CXX_EXTENSIONS OFF
  )
  if (MSVC)
    target_compile_options (${exename} PRIVATE /W4 /WX /utf-8)
  else ()
    target_compile_options (${exename} PRIVATE -pedantic -Wall -Wextra -Wshadow -Werror)
  endif ()
endforeach (examplesourcefile)

if (glob_example_sources)
  foreach (ignored_source_file ${glob_example_sources})
    message (SEND_ERROR "File ${ignored_source_file} in src/example/json is ignored")
  endforeach (ignored_source_file)
endif ()

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
couchbase-3.0.0.alpha.4-x86_64-linux ext/third_party/json/src/example/json/CMakeLists.txt
couchbase-3.0.0.alpha.4-x86_64-darwin-19 ext/third_party/json/src/example/json/CMakeLists.txt
couchbase-3.0.0.alpha.4-universal-darwin-19 ext/third_party/json/src/example/json/CMakeLists.txt
couchbase-3.0.0.alpha.4 ext/third_party/json/src/example/json/CMakeLists.txt
couchbase-3.0.0.alpha.3-x86_64-linux ext/third_party/json/src/example/json/CMakeLists.txt
couchbase-3.0.0.alpha.3-x86_64-darwin-19 ext/third_party/json/src/example/json/CMakeLists.txt
couchbase-3.0.0.alpha.3-universal-darwin-19 ext/third_party/json/src/example/json/CMakeLists.txt
couchbase-3.0.0.alpha.3 ext/third_party/json/src/example/json/CMakeLists.txt
couchbase-3.0.0.alpha.2-x86_64-linux ext/third_party/json/src/example/json/CMakeLists.txt
couchbase-3.0.0.alpha.2-x86_64-darwin-19 ext/third_party/json/src/example/json/CMakeLists.txt
couchbase-3.0.0.alpha.2-universal-darwin-19 ext/third_party/json/src/example/json/CMakeLists.txt
couchbase-3.0.0.alpha.2 ext/third_party/json/src/example/json/CMakeLists.txt
couchbase-3.0.0.alpha.1-x86_64-linux ext/third_party/json/src/example/json/CMakeLists.txt
couchbase-3.0.0.alpha.1-x86_64-darwin-19 ext/third_party/json/src/example/json/CMakeLists.txt
couchbase-3.0.0.alpha.1-universal-darwin-19 ext/third_party/json/src/example/json/CMakeLists.txt
couchbase-3.0.0.alpha.1 ext/third_party/json/src/example/json/CMakeLists.txt