File: CMakeLists.txt

package info (click to toggle)
mariadb-10.0 10.0.32-0%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 476,064 kB
  • sloc: cpp: 1,400,131; ansic: 832,140; perl: 54,391; sh: 41,304; pascal: 32,365; yacc: 14,921; xml: 5,257; sql: 4,667; cs: 4,647; makefile: 4,555; ruby: 4,465; python: 2,292; lex: 1,427; java: 941; asm: 295; awk: 54; php: 22; sed: 16
file content (47 lines) | stat: -rw-r--r-- 1,388 bytes parent folder | download | duplicates (2)
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
include_directories(..)
include_directories(../../src)
include_directories(../../src/tests)

find_library(JEMALLOC_STATIC_LIBRARY libjemalloc.a)

if (BUILD_TESTING)
  ## reference implementation with simple size-doubling buffer without
  ## jemalloc size tricks
  add_library(doubling_buffer_ftcxx STATIC
    doubling_buffer
    ../cursor
    )
  add_dependencies(doubling_buffer_ftcxx install_tdb_h)

  foreach (impl
      ftcxx
      doubling_buffer_ftcxx
      )
    foreach (with_jemalloc
        ON
        OFF
        )
      foreach (test
          buffer_test
          cursor_test
          )
        set(_testname ${impl}_${test})
        if (with_jemalloc AND JEMALLOC_STATIC_LIBRARY)
          set(_testname ${_testname}_j)
        endif ()
        add_executable(${_testname} ${test})
        if (with_jemalloc AND JEMALLOC_STATIC_LIBRARY)
          if (APPLE)
            target_link_libraries(${_testname} -Wl,-force_load ${JEMALLOC_STATIC_LIBRARY})
          else ()
            target_link_libraries(${_testname} -Wl,--whole-archive ${JEMALLOC_STATIC_LIBRARY} -Wl,--no-whole-archive)
          endif ()
        endif ()
        target_link_libraries(${_testname} ${impl})
        target_link_libraries(${_testname} ${LIBTOKUDB} ${LIBTOKUPORTABILITY})

        add_test(${_testname} ${_testname})
      endforeach ()
    endforeach ()
  endforeach ()
endif (BUILD_TESTING)