File: CMakeLists.txt

package info (click to toggle)
embree 4.3.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 100,656 kB
  • sloc: cpp: 228,918; xml: 40,944; ansic: 2,685; python: 812; sh: 635; makefile: 228; csh: 42
file content (47 lines) | stat: -rw-r--r-- 2,335 bytes parent folder | download
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
## Copyright 2009-2021 Intel Corporation
## SPDX-License-Identifier: Apache-2.0

ADD_EXECUTABLE(embree_tests ../../kernels/embree.rc
  embree_tests.cpp
  kernels/kernels_tests.cpp
  common/common_tests.cpp)
TARGET_LINK_LIBRARIES(embree_tests tasking sys math embree)

if (EMSCRIPTEN)
    # Use "-s ALLOW_MEMORY_GROWTH=1" to allow the WASM heap to grow.

    # Use "-s PROXY_TO_PTHREAD=1" to move program execution to a worker thread, leaving the main
    # thread available to respond to requests for more worker threads. Without this flag, we'd need
    # to prepopulate a thread pool with enough threads for every unit test (with something like
    # "-s PTHREAD_POOL_SIZE=40"), otherwise the main thread would block as soon another thread is
    # launched. See https://emscripten.org/docs/porting/pthreads.html#additional-flags and
    # https://github.com/emscripten-core/emscripten/blob/main/src/settings.js#L1019.

    # Use "-s EXIT_RUNTIME=1" to exit the Node.js process when the main thread completes. Otherwise,
    # any worker threads (even completed threads) will keep the process alive. See
    # https://github.com/emscripten-core/emscripten/blob/main/src/settings.js#L91.

    # Use "-s NODERAWFS=1" to allow tests running on Node.js to access the system's files (through
    # Emscripten's "raw filesystem" backend). This is used by several unit tests to read test data.
    # See https://github.com/emscripten-core/emscripten/blob/main/src/settings.js#L898.

    # Use "-Wno-pthreads-mem-growth" to silence the warning "USE_PTHREADS + ALLOW_MEMORY_GROWTH may
    # run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271". Unit tests
    # don't run much (if any) non-wasm code.

    TARGET_LINK_OPTIONS(embree_tests PUBLIC
    "SHELL:-s ASSERTIONS=1"
    "SHELL:-s ALLOW_MEMORY_GROWTH=1"
    "SHELL:-s PROXY_TO_PTHREAD=1"
    "SHELL:-s EXIT_RUNTIME=1"
    -Wno-pthreads-mem-growth
  )
endif()

SET_PROPERTY(TARGET embree_tests PROPERTY FOLDER tutorials)
SET_PROPERTY(TARGET embree_tests APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
INSTALL(TARGETS embree_tests DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT examples)
SIGN_TARGET(embree_tests)

ADD_EMBREE_TEST_ECS(embree_tests embree_tests NO_REFERENCE NO_ISPC NO_SYCL)
SET_EMBREE_TEST_PROPERTIES(embree_tests PROPERTIES TIMEOUT 7000)