Alien-LibJQ

 view release on metacpan or  search on metacpan

jq/CMakeLists.txt  view on Meta::CPAN

#  option(MSVC_STATIC_RUNTIME "Build with static runtime" OFF)
#endif()
option(ENABLE_MAINTAINER_MODE "Enable maintainer mode" ON)
option(ENABLE_VALGRIND "Run tests under Valgrind" ON)
option(ENABLE_ASAN "Enable address sanitizer" OFF)
option(ENABLE_UBSAN "Enable undefined behavior sanitizer" OFF)
option(ENABLE_GCOV "Enable gcov code coverage tool" OFF)
option(ENABLE_DOCS "Build docs" ON)
option(ENABLE_ERROR_INJECTION "Build and test with error injection" OFF)
option(ENABLE_ALL_STATIC "Link jq with static libraries only" OFF)
option(ENABLE_PTHREAD_TLS "Enable use of pthread thread local storage" OFF)
option(WITH_ONIGURUMA "Try this for a non-standard install prefix of the oniguruma library" "yes")

# maintainer mode requires bison and flex
if(ENABLE_MAINTAINER_MODE)
  find_package(BISON 3.0 REQUIRED)
  find_package(FLEX REQUIRED)
endif()

find_program(VALGRIND_cmd valgrind DOC "valgrind is required to test jq")
if(NOT VALGRIND_cmd)

jq/CMakeLists.txt  view on Meta::CPAN

CHECK_STRUCT_HAS_MEMBER("struct tm"  __tm_gmtoff  time.h   HAVE_TM___TM_GMT_OFF  LANGUAGE C)
target_compile_definitions_if_true(
  HAVE_TM_TM_GMT_OFF
  HAVE_TM___TM_GMT_OFF
)

if(ENABLE_PTHREAD_TLS)
  set(THREADS_PREFER_PTHREAD_FLAG TRUE)
  find_package(Threads)
  if(CMAKE_USE_PTHREADS_INIT)
    #set(CMAKE_REQUIRED_LIBRARIES "pthread")
    check_symbol_exists(pthread_key_create  "pthread.h"  HAVE_PTHREAD_KEY_CREATE)
    check_symbol_exists(pthread_once        "pthread.h"  HAVE_PTHREAD_ONCE)
    check_symbol_exists(atexit              "stdlib.h"   HAVE_ATEXIT)
    target_compile_definitions_if_true(
      HAVE_PTHREAD_KEY_CREATE
      HAVE_PTHREAD_ONCE
      HAVE_ATEXIT
    )
    target_link_libraries(jq_compiler_flags Threads::Threads)
  endif()
endif()

jq/CMakeLists.txt  view on Meta::CPAN

  HAVE_SQRT
  HAVE_TAN
  HAVE_TANH
  HAVE_TGAMMA
  HAVE_TRUNC
  HAVE_Y0
  HAVE_Y1
  HAVE_YN
)

CHECK_C_SOURCE_COMPILES("static __thread int x = 1; int main() { return x; }" HAVE___THREAD)
target_compile_definitions_if_true(HAVE___THREAD)

TEST_BIG_ENDIAN(TEST_BYTE_ORDER_BIG_ENDIAN)
if(TEST_BYTE_ORDER_BIG_ENDIAN)
  target_compile_definitions(jq_compiler_flags INTERFACE IEEE_MC68k=1)
else()
  target_compile_definitions(jq_compiler_flags INTERFACE IEEE_8087=1)
endif()

set(HAVE_LIBONIG 0)



( run in 0.337 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )