Commit 2771e62b authored by reutelhuber's avatar reutelhuber
Browse files

Merge branch 'main' into '182-ism4-with-noise-signal-spectrum-appears-repeated-in-igf-region'

# Conflicts:
#   lib_com/options.h
parents 23344eef 1772896f
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -3,17 +3,21 @@
# Compiler output Unix
IVAS_cod
IVAS_dec
IVAS_rend
IVAS_crend_unit_test
obj/
*.a
*.o
*.P

# default CMake
build/**/*
build*/**/*

# Compiler output VS2017
IVAS_cod.exe
IVAS_dec.exe
IVAS_rend.exe
IVAS_crend_unit_test.exe
*.user
.vs/
Debug_*/
@@ -31,13 +35,10 @@ scripts/ivas_pytests/tests/unit_tests/crend/Release_*/
scripts/td_object_renderer/object_renderer_standalone/renderer_standalone
scripts/td_object_renderer/object_renderer_standalone/renderer_standalone.exe

# Prerenderer
scripts/prerenderer/IVAS_prerenderer
scripts/prerenderer/IVAS_prerenderer.exe

# General/scripts
.DS_Store
.vscode
.cache
*.log
*.bak
scripts/c-code_instrument/
@@ -46,6 +47,8 @@ scripts/ref/
scripts/test/
scripts/out/
scripts/self_test_summary.txt
tests/renderer/cut
tests/renderer/ref
tests/dut
tests/ref

@@ -53,3 +56,6 @@ tests/ref
__pycache__/
*.py[cod]
*$py.class

#history
.history/
+267 −116
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ workflow:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event' # Runs for merge requests
    - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Pushes to main
    - if: $CI_PIPELINE_SOURCE == 'schedule' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Scheduled in main
    - if: $CI_PIPELINE_SOURCE == "web"

stages:
  - maintenance
@@ -45,8 +46,21 @@ stages:
.get-previous-merge-commit-sha: &get-previous-merge-commit-sha
  - previous_merge_commit=$(git --no-pager log --merges HEAD~1 -n 1 --pretty=format:%H)

.merge_request_comparison_setup: &merge_request_comparison_setup
  ### build test binaries, initial clean for paranoia reasons
.mr-fetch-target-branch: &mr-fetch-target-branch
  # first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching
  # depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later
  - git branch -D $CI_MERGE_REQUEST_TARGET_BRANCH_NAME || true
  # needed when depth is lower than the number of commits in the branch
  - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME

.mr-get-target-commit: &mr-get-target-commit
  # compare to last target branch commit before pipeline was created
  - target_commit=$(git log $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -1 --oneline --before=${CI_PIPELINE_CREATED_AT} --format=%H)



.merge-request-comparison-setup-codec:
  &merge-request-comparison-setup-codec ### build test binaries, initial clean for paranoia reasons
  - make clean
  - mkdir build
  - cd build
@@ -54,6 +68,7 @@ stages:
  - make -j
  - mv IVAS_cod ../IVAS_cod_test
  - mv IVAS_dec ../IVAS_dec_test
  - mv IVAS_rend ..
  - cd ..
  - rm -rf build/*

@@ -61,14 +76,9 @@ stages:
  - source_branch_commit_sha=$(git rev-parse HEAD)

  ### checkout version to compare against
  # first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching
  # depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later
  - git branch -D $CI_MERGE_REQUEST_TARGET_BRANCH_NAME || true
  # needed when depth is lower than the number of commits in the branch
  - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
  - *mr-fetch-target-branch

  ### compare to last target branch commit before pipeline was created
  - target_commit=$(git log $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -1 --oneline --before=${CI_PIPELINE_CREATED_AT} --format=%H)
  - *mr-get-target-commit
  - git checkout $target_commit

  ### build reference binaries
@@ -200,16 +210,6 @@ build-unittests-linux:
    # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...<
    - ci/check_for_warnings.py $BUILD_OUTPUT || exit $?

build-prerenderer-linux:
  extends: 
    - .build-job-with-check-for-warnings
    - .rules-basis
  script:
    - *print-common-info
    - make -C scripts/prerenderer -j 2>&1 | tee $BUILD_OUTPUT
    # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...<
    - ci/check_for_warnings.py $BUILD_OUTPUT || exit $?

build-td-object-renderer-standalone-linux:
  extends:
    - .build-job-with-check-for-warnings
@@ -251,7 +251,6 @@ build-codec-sanitizers-linux:
    - *print-common-info
    - bash ci/build_codec_sanitizers_linux.sh


# ---------------------------------------------------------------
# Test jobs for merge requests
# ---------------------------------------------------------------
@@ -276,8 +275,7 @@ codec-smoke-test:
      - out/logs/
      - smoke_test_output.txt
      - smoke_test_output_plc.txt
    expose_as: 'Smoke test results'

    expose_as: "Smoke test results"

# code selftest testvectors with memory-sanitizer binaries
msan-on-merge-request-linux:
@@ -298,8 +296,7 @@ msan-on-merge-request-linux:
    paths:
      - scripts/ref/logs/
      - test_output.txt
    expose_as: 'Msan selftest results'

    expose_as: "Msan selftest results"

# code selftest testvectors with address-sanitizer binaries
asan-on-merge-request-linux:
@@ -320,8 +317,148 @@ asan-on-merge-request-linux:
    paths:
      - scripts/ref/logs/
      - test_output.txt
    expose_as: 'Asan selftest results'
    expose_as: "Asan selftest results"

# test external renderer executable
external-renderer-make-pytest:
  extends:
    - .test-job-linux
    - .rules-merge-request
  needs: ["build-codec-linux-make"]
  stage: test
  script:
    - make -j IVAS_rend
    - make -j unittests
    - make -j --directory scripts/td_object_renderer/object_renderer_standalone
    - python3 -m pytest -q --log-level ERROR -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer.py
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
    when: always
    paths:
      - report-junit.xml
    expose_as: "external renderer make pytest results"
    reports:
      junit:
        - report-junit.xml

# test external renderer executable with cmake + asan
external-renderer-cmake-asan-pytest:
  extends:
    - .test-job-linux
    - .rules-merge-request
  needs: ["build-codec-linux-cmake"]
  stage: test
  script:
    - python3 ci/disable_ram_counting.py
    - cmake -B cmake-build -G "Unix Makefiles" -DCLANG=asan -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true
    - cmake --build cmake-build -- -j
    - python3 -m pytest -q --log-level ERROR -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer.py
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
    when: always
    paths:
      - report-junit.xml
    expose_as: "external renderer cmake asan pytest results"
    reports:
      junit:
        - report-junit.xml

# test external renderer executable with cmake + msan
external-renderer-cmake-msan-pytest:
  extends:
    - .test-job-linux
    - .rules-merge-request
  needs: ["build-codec-linux-cmake"]
  stage: test
  script:
    - python3 ci/disable_ram_counting.py
    - cmake -B cmake-build -G "Unix Makefiles" -DCLANG=msan  -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true
    - cmake --build cmake-build -- -j
    - python3 -m pytest -q --log-level ERROR -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer.py
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
    when: always
    paths:
      - report-junit.xml
    expose_as: "external renderer cmake msan pytest results"
    reports:
      junit:
        - report-junit.xml

# test external renderer executable with cmake vs decoder renderer
# TODO @tmu @knj @sgi -> converted to script, decide whether to re-enable later
.external-renderer-cmake-vs-decoder-pytest:
  extends:
    - .test-job-linux
    - .rules-merge-request
  needs: ["build-codec-linux-cmake"]
  stage: test
  script:
    - cmake -B cmake-build -G "Unix Makefiles" -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true -DDEC_TO_REND_FLOAT_DUMP=true
    - cmake --build cmake-build -- -j
    - python3 -m pytest -q --log-level ERROR -n 1 -rA --junit-xml=report-junit.xml tests/renderer/test_renderer_vs_decoder.py
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
    when: always
    paths:
      - report-junit.xml
    expose_as: "external renderer cmake vs decoder results"
    reports:
      junit:
        - report-junit.xml

# compare external renderer bitexactness between target and source branch
external-renderer-pytest-on-merge-request:
  extends:
    - .test-job-linux
    - .rules-merge-request
  needs: ["build-codec-linux-make"]
  # TODO: set reasonable timeout, will most likely take less
  timeout: "20 minutes"
  stage: compare
  script:
    - *print-common-info

    # some helper variables - "|| true" to prevent failures from grep not finding anything
    - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[rend(erer)*[ -]*non[ -]*be\]") || true
    # TODO: needs splitting the test between reference and cut generation
    #- ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true

    # store the current commit hash
    - source_branch_commit_sha=$(git rev-parse HEAD)

    - *mr-fetch-target-branch
    - *mr-get-target-commit
    - git checkout $target_commit

    # build reference binaries
    - make -j IVAS_rend
    - mv IVAS_rend IVAS_rend_ref

    # back to source branch
    - git checkout $source_branch_commit_sha
    - make clean
    - make -j IVAS_rend

    # run test
    - exit_code=0
    - python3 -m pytest -q --log-level ERROR -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer_be_comparison.py || exit_code=$?
    - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true

    - *merge-request-comparison-check

  allow_failure:
    exit_codes:
      - 123
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
    when: always
    paths:
      - report-junit.xml
    expose_as: "pytest external renderer results"
    reports:
      junit:
        - report-junit.xml

# compare bit exactness between target and source branch
ivas-pytest-on-merge-request:
@@ -333,7 +470,7 @@ ivas-pytest-on-merge-request:
  timeout: "10 minutes"
  script:
    - *print-common-info
    - *merge_request_comparison_setup
    - *merge-request-comparison-setup-codec

    # some helper variables - "|| true" to prevent failures from grep not finding anything
    - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[non[ -]*be\]") || true
@@ -367,7 +504,7 @@ ivas-pytest-on-merge-request:
    when: always
    paths:
      - report-junit.xml
    expose_as: 'pytest ivas results'
    expose_as: "pytest ivas results"
    reports:
      junit:
        - report-junit.xml
@@ -381,7 +518,7 @@ evs-pytest-on-merge-request:
  timeout: "10 minutes"
  script:
    - *print-common-info
    - *merge_request_comparison_setup
    - *merge-request-comparison-setup-codec
    
    # some helper variables - "|| true" to prevent failures from grep not finding anything
    - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[evs[ -]*non[ -]*be\]") || true
@@ -412,7 +549,7 @@ evs-pytest-on-merge-request:
    when: always
    paths:
      - report-junit-evs.xml
    expose_as: 'pytest evs results'
    expose_as: "pytest evs results"
    reports:
      junit:
        - report-junit-evs.xml
@@ -492,7 +629,6 @@ be-2-evs-linux:
    - cd evs_be_test
    - python3 ../ci/run_evs_be_test.py


codec-comparison-on-main-push:
  extends:
    - .test-job-linux
@@ -567,11 +703,10 @@ codec-comparison-on-main-push:
    when: always
    paths:
      - report-junit.xml
    expose_as: 'Results of comparison to previous merge commit'
    expose_as: "Results of comparison to previous merge commit"
    reports:
      junit: report-junit.xml


# ---------------------------------------------------------------
# Scheduled jobs on main
# ---------------------------------------------------------------
@@ -583,159 +718,176 @@ codec-comparison-on-main-push:
  stage: test
  tags:
    - sanitizer_test_main
  timeout: "2 hours"
  artifacts:
    name: "$CI_JOB_NAME--main--sha-$CI_COMMIT_SHORT_SHA"
    when: always
    paths:
      - ep_015.g192
      # second wildcard is necessary to get encoder and no-PLC run logs
      - "CLANG*/logs*"
      - ./LOGS_PLC
      - ./LOGS_noPLC

### --- sanitizer schedule A ---

.sanitizer-test-schedule-A:
  extends:
    - .sanitizer-test-template
  timeout: 2 hours 30 minutes


sanitizer-test-mono:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-A
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_A
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py mono mono --tests $SANITIZER_TESTS

sanitizer-test-stereo:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-A
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 1 hour
      start_in: 2 hours 30 minutes
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py stereo $OUT_FORMATS_CHANNEL_BASED --tests $SANITIZER_TESTS

sanitizer-test-stereodmxevs:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-A
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 2 hours
      start_in: 5 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py StereoDmxEVS mono --tests $SANITIZER_TESTS

sanitizer-test-ism1:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-A
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 3 hours
      start_in: 7 hours 30 minutes
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py ISM1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS

sanitizer-test-ism2:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-A
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 4 hours
      start_in: 10 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py ISM2 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS

sanitizer-test-ism3:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-A
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 6 hours
      start_in: 12 hours 30 minutes
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py ISM3 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS

sanitizer-test-ism4:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-A
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 8 hours
      start_in: 15 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py ISM4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS

sanitizer-test-mc-5_1:
  extends: .sanitizer-test-template
sanitizer-test-masa:
  extends: .sanitizer-test-schedule-A
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 10 hours
      start_in: 17 hours 30 minutes
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py MASA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS

### --- sanitizer schedule B ---

.sanitizer-test-schedule-B:
  extends:
    - .sanitizer-test-template
  timeout: 3 hours

sanitizer-test-mc-5_1:
  extends: .sanitizer-test-schedule-B
  rules:
    - if: $SANITIZER_SCHEDULE_B
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py 5_1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS

sanitizer-test-mc-5_1_2:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-B
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_B
      when: delayed
      start_in: 12 hours
      start_in: 3 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py 5_1_2 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS

sanitizer-test-mc-5_1_4:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-B
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_B
      when: delayed
      start_in: 14 hours
      start_in: 6 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py 5_1_4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS

sanitizer-test-mc-7_1:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-B
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_B
      when: delayed
      start_in: 16 hours
      start_in: 9 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py 7_1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS

sanitizer-test-mc-7_1_4:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-B
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_B
      when: delayed
      start_in: 18 hours
      start_in: 12 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py 7_1_4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS

sanitizer-test-masa:
  extends: .sanitizer-test-template
  rules:
    - if: $IS_SANITIZER_TEST_RUN
      when: delayed
      start_in: 20 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py MASA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS
### --- sanitizer schedule C ---

.sanitizer-test-schedule-C:
  extends:
    - .sanitizer-test-template
  timeout: 6 hours

sanitizer-test-sba:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-C
  rules:
    - if: $IS_SANITIZER_TEST_RUN
      when: delayed
      start_in: 22 hours
    - if: $SANITIZER_SCHEDULE_C
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py SBA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS

sanitizer-test-planarsba:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-C
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_C
      when: delayed
      start_in: 24 hours
      start_in: 6 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py PlanarSBA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS
@@ -790,4 +942,3 @@ pull-from-3gpp-forge:

    # Push to mirror, include tags. Option `-o ci.skip` tells GitLab to skip CI for the pushed commits (assumed already tested upstream)
    - git push --tags -o ci.skip "https://${GITLAB_USER_LOGIN}:${MIRROR_ACCESS_TOKEN}@${CI_REPOSITORY_URL#*@}" "HEAD:${CI_COMMIT_BRANCH}"
+29 −8
Original line number Diff line number Diff line
@@ -108,6 +108,9 @@ if(WMOPS)
  add_definitions("-DWMOPS=1")
endif()

if(DEC_TO_REND_FLOAT_DUMP)
  add_compile_definitions(DEC_TO_REND_FLOAT_DUMP)
endif()

project(stereo-evs)
set_property(GLOBAL PROPERTY USE_FOLDERS ON) # make Visual Studio projects look nicer
@@ -118,6 +121,7 @@ include_directories(
  lib_debug
  lib_dec
  lib_enc
  lib_rend
  lib_util
)

@@ -131,21 +135,35 @@ endif()
file(GLOB libDebugSrcs "lib_debug/*.c")
file(GLOB libDebugHeaders "lib_debug/*.h")
add_library(lib_debug ${libDebugSrcs} ${libDebugHeaders})
target_link_libraries(lib_debug lib_com)

file(GLOB libEncSrcs "lib_enc/*.c")
file(GLOB libEncHeaders "lib_enc/*.h")
add_library(lib_enc ${libEncSrcs} ${libEncHeaders})
target_link_libraries(lib_enc lib_com lib_debug)

file(GLOB libRendSrcs "lib_rend/*.c")
file(GLOB libRendHeaders "lib_rend/*.h")
add_library(lib_rend ${libRendSrcs} ${libRendHeaders})
target_link_libraries(lib_rend lib_dec lib_com lib_debug) # Todo refactor: This dependency on lib_dec should be removed.

file(GLOB libDecSrcs "lib_dec/*.c")
file(GLOB libDecHeaders "lib_dec/*.h")
add_library(lib_dec ${libDecSrcs} ${libDecHeaders})
target_link_libraries(lib_dec lib_com lib_debug)
target_link_libraries(lib_dec lib_com lib_rend lib_debug)

file(GLOB libUtilSrcs "lib_util/*.c")
file(GLOB libUtilHeaders "lib_util/*.h")
add_library(lib_util ${libUtilSrcs} ${libUtilHeaders})

file(GLOB unitTestCRendSrcs "scripts/ivas_pytests/tests/unit_tests/crend/*.c")
file(GLOB unitTestCRendHeaders "scripts/ivas_pytests/tests/unit_tests/crend/*.h")
add_executable(IVAS_crend_unit_test ${unitTestCRendSrcs} ${unitTestCRendHeaders})
target_link_libraries(IVAS_crend_unit_test lib_rend lib_dec lib_util lib_com lib_debug)

add_executable(renderer_standalone "scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c")
target_link_libraries(renderer_standalone lib_rend lib_dec lib_util lib_com lib_debug)

add_executable(IVAS_cod apps/encoder.c)
target_link_libraries(IVAS_cod lib_enc lib_util)
if(WIN32)
@@ -158,11 +176,14 @@ if(WIN32)
  target_link_libraries(IVAS_dec Ws2_32)
endif()

if(${IVAS_BUILD_PRERENDERER})
  add_executable(IVAS_prerenderer
    scripts/prerenderer/prerenderer.c
    ${libEncSrcs}
    ${libDecSrcs}
  )
  target_link_libraries(IVAS_prerenderer lib_com lib_dec lib_debug lib_util)
add_executable(IVAS_rend apps/renderer.c)
target_link_libraries(IVAS_rend lib_rend lib_util)

if(COPY_EXECUTABLES_FROM_BUILD_DIR)
  # Optionally copy executables to the same place where Make puts them (useful for tests that expect executables in specific places)
  add_custom_command(TARGET IVAS_cod POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:IVAS_cod>" "${CMAKE_CURRENT_SOURCE_DIR}/")
  add_custom_command(TARGET IVAS_dec POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:IVAS_dec>" "${CMAKE_CURRENT_SOURCE_DIR}/")
  add_custom_command(TARGET IVAS_rend POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:IVAS_rend>" "${CMAKE_CURRENT_SOURCE_DIR}/")
  add_custom_command(TARGET IVAS_crend_unit_test POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:IVAS_crend_unit_test>" "${CMAKE_CURRENT_SOURCE_DIR}/scripts/ivas_pytests/tests/unit_tests/crend/")
  add_custom_command(TARGET renderer_standalone POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:renderer_standalone>" "${CMAKE_CURRENT_SOURCE_DIR}/scripts/td_object_renderer/object_renderer_standalone/")
endif()
+23 −11

File changed.

Preview size limit exceeded, changes collapsed.

+22 −0

File changed.

Preview size limit exceeded, changes collapsed.

Loading