Lines Matching +full:cmake +full:-

6 1. [Building the lib and applications](#building-the-library-and-applications)
7 - [Prerequisites](#prerequisites)
8 - [Get the code](#get-the-code)
9 - [Basics](#basic-build)
10 - [Configuration options](#configuration-options)
11 - [Dylib builds](#dylib-builds)
12 - [Debugging](#debugging)
13 - [Cross compiling](#cross-compiling)
14 - [Sanitizer support](#sanitizers)
15 - [MSVC builds](#microsoft-visual-studio-builds)
16 - [Xcode builds](#xcode-builds)
17 - [Emscripten builds](#emscripten-builds)
18 - [Extra Build Flags](#extra-build-flags)
19 - [Build with VMAF support](#build-with-vmaf)
20 2. [Testing the library](#testing-the-av1-codec)
21 - [Basics](#testing-basics)
22 - [Unit tests](#unit-tests)
23 - [Example tests](#example-tests)
24 - [Encoder tests](#encoder-tests)
25 - [IDE hosted tests](#ide-hosted-tests)
26 - [Downloading test data](#downloading-the-test-data)
27 - [Adding a new test data file](#adding-a-new-test-data-file)
28 - [Additional test data](#additional-test-data)
29 - [Sharded testing](#sharded-testing)
30 - [Running tests directly](#running-test_libaom-directly)
31 - [Running tests via CMake](#running-the-tests-via-the-cmake-build)
32 3. [Coding style](#coding-style)
33 4. [License header](#license-header)
34 5. [Submitting patches](#submitting-patches)
35 - [Login cookie](#login-cookie)
36 - [Contributor agreement](#contributor-agreement)
37 - [Testing your code](#testing-your-code)
38 - [Commit message hook](#commit-message-hook)
39 - [Upload your change](#upload-your-change)
40 - [Incorporating Reviewer Comments](#incorporating-reviewer-comments)
41 - [Submitting your change](#submitting-your-change)
42 - [Viewing change status](#viewing-the-status-of-uploaded-changes)
44 7. [Bug reports](#bug-reports)
46 ## Building the library and applications {#building-the-library-and-applications}
50 1. [CMake](https://cmake.org). See CMakeLists.txt for the minimum version
52 2. [Git](https://git-scm.com/).
54 the latest version of MinGW-w64 (clang64 or ucrt toolchains) are
60 present, yasm will be used by default. Pass -DENABLE_NASM=ON to cmake to
67 [EMSDK](https://kripken.github.io/emscripten-site/index.html).
69 ### Get the code {#get-the-code}
80 ### Basic build {#basic-build}
82 CMake replaces the configure step typical of many projects. Running CMake will
83 produce configuration and build files for the currently selected CMake
88 $ cmake path/to/aom
95 applies: On systems where cc and c++ are present in $PATH at the time CMake is
98 ### Configuration options {#configuration-options}
106 Both types of options are set at the time CMake is run. The following example
110 $ cmake path/to/aom -DENABLE_CCACHE=1 -DCONFIG_AV1_ENCODER=0
117 currently be found in the file `build/cmake/aom_config_defaults.cmake`.
119 ### Dylib builds {#dylib-builds}
122 CMake built in variable `BUILD_SHARED_LIBS`:
125 $ cmake path/to/aom -DBUILD_SHARED_LIBS=1
129 This is currently only supported on non-Windows targets.
138 $ cmake path/to/aom -DCMAKE_BUILD_TYPE=Debug
146 $ cmake path/to/aom -G Xcode -DCMAKE_CONFIGURATION_TYPES=Debug
149 For Visual Studio the in-IDE configuration controls should be used. Simply set
157 $ cmake path/to/aom -DAOM_TARGET_CPU=generic
160 ### Cross compiling {#cross-compiling}
164 architecture will be considered cross compiles. The AV1 CMake build handles
168 - arm64-ios.cmake
169 - arm64-linux-clang.cmake
170 - arm64-linux-gcc.cmake
171 - arm64-mingw-gcc.cmake
172 - armv7-ios.cmake
173 - armv7-linux-gcc.cmake
174 - armv7-mingw-gcc.cmake
175 - armv7s-ios.cmake
176 - ppc-linux-gcc.cmake
177 - riscv-linux-gcc.cmake
178 - x86-ios-simulator.cmake
179 - x86-linux.cmake
180 - x86-macos.cmake
181 - x86-mingw-gcc.cmake
182 - x86\_64-ios-simulator.cmake
183 - x86\_64-mingw-gcc.cmake
185 The following example demonstrates use of the x86-macos.cmake toolchain file on
189 $ cmake path/to/aom \
190 -DCMAKE_TOOLCHAIN_FILE=path/to/aom/build/cmake/toolchains/x86-macos.cmake
203 $ cmake path/to/aom -DAOM_TARGET_CPU=generic
213 Sanitizer integration is built-in to the CMake build system. To enable a
214 sanitizer, add `-DSANITIZE=<type>` to the CMake command line. For example, to
218 $ cmake path/to/aom -DSANITIZE=address
225 ### Microsoft Visual Studio builds {#microsoft-visual-studio-builds}
236 $ cmake path/to/aom -G "Visual Studio 17 2022"
238 # To create a Visual Studio 2022 solution for the 32-bit x86 target:
239 $ cmake path/to/aom -G "Visual Studio 17 2022" -A Win32
242 $ cmake path/to/aom -G "Visual Studio 16 2019"
244 # To create a Visual Studio 2019 solution for the 32-bit x86 target:
245 $ cmake path/to/aom -G "Visual Studio 16 2019" -A Win32
248 $ cmake --build .
252 `-D_WIN32_WINNT=0x0601`.
254 ### Xcode builds {#xcode-builds}
260 $ cmake path/to/aom -G Xcode
263 ### Emscripten builds {#emscripten-builds}
279 $ cmake path/to/aom \
280 -DENABLE_CCACHE=1 \
281 -DAOM_TARGET_CPU=generic \
282 -DENABLE_DOCS=0 \
283 -DENABLE_TESTS=0 \
284 -DCONFIG_ACCOUNTING=1 \
285 -DCONFIG_INSPECTION=1 \
286 -DCONFIG_MULTITHREAD=0 \
287 -DCONFIG_RUNTIME_CPU_DETECT=0 \
288 -DCONFIG_WEBM_IO=0 \
289 -DCMAKE_TOOLCHAIN_FILE=path/to/emsdk-portable/.../Emscripten.cmake
302 # executed cmake.
306 ### Extra build flags {#extra-build-flags}
310 - AOM\_EXTRA\_C\_FLAGS
311 - AOM\_EXTRA\_CXX\_FLAGS
312 - AOM\_EXTRA\_EXE\_LINKER\_FLAGS
319 $ cmake path/to/aom \
320 -DCMAKE_BUILD_TYPE=Release \
321 -DAOM_EXTRA_C_FLAGS=-UNDEBUG \
322 -DAOM_EXTRA_CXX_FLAGS=-UNDEBUG
325 ### Build with VMAF support {#build-with-vmaf}
332 $ cmake path/to/aom -DCONFIG_TUNE_VMAF=1
340 # --vmaf-model-path=path/to/model
343 ## Testing the AV1 codec {#testing-the-av1-codec}
345 ### Testing basics {#testing-basics}
351 #### 1. Unit tests: {#unit-tests}
358 # cmake build configuration directory.
359 $ cmake path/to/aom
360 # Note: The AV1 CMake build creates many test targets. Running make
365 #### 2. Example tests: {#example-tests}
371 $ cmake path/to/aom
377 $ path/to/aom/test/examples.sh --bin-path examples
380 #### 3. Encoder tests: {#encoder-tests}
388 $ cmake path/to/aom -DCONFIG_INTERNAL_STATS=1
431 ### IDE hosted tests {#ide-hosted-tests}
433 By default the generated projects files created by CMake will not include the
436 IDEs-- IDE behavior is to build all targets when selecting the build project
438 `ENABLE_IDE_TEST_HOSTING` variable must be enabled at CMake generation time:
442 # available, run cmake with the -G argument missing its
444 $ cmake path/to/aom -DENABLE_IDE_TEST_HOSTING=1 -G Xcode
447 ### Downloading the test data {#downloading-the-test-data}
449 The fastest and easiest way to obtain the test data is to use CMake to generate
456 $ cmake path/to/aom -G "Unix Makefiles"
458 $ make -j28 testdata
463 ### Adding a new test data file {#adding-a-new-test-data-file}
465 First, add the new test data file to the `aom-test-data` bucket of the
466 `aomedia-testing` project on Google Cloud Platform. You may need to ask someone
469 NOTE: When a new test data file is added to the `aom-test-data` bucket, its
474 $ gsutil acl ch -g all:R gs://aom-test-data/test-data-file-name
477 "test-data-file-name" in the `aom-test-data` bucket.
479 Once the new test data file has been added to `aom-test-data`, create a CL to
480 add the name of the new test data file to `test/test_data_util.cmake` and add
481 the SHA1 checksum of the new test data file to `test/test-data.sha1`. (The SHA1
485 ### Additional test data {#additional-test-data}
492 ### Sharded testing {#sharded-testing}
497 #### 1. Running test\_libaom directly: {#running-test_libaom-directly}
504 $ seq 0 $(( $GTEST_TOTAL_SHARDS - 1 )) \
505 | xargs -n 1 -P 0 -I{} env GTEST_SHARD_INDEX={} ./test_libaom
511 #### 2. Running the tests via the CMake build: {#running-the-tests-via-the-cmake-build}
518 # For make and ninja builds the -j parameter controls the number of shards
521 $ make -j10 runtests
526 CMake. A system with 24 cores can run 24 test shards using a value of 24 with
527 the `-j` parameter. When CMake is unable to detect the number of cores 10 shards
530 ## Coding style {#coding-style}
535 The coding style used by this project is enforced with clang-format using the
537 [.clang-format](https://chromium.googlesource.com/webm/aom/+/main/.clang-format)
540 You can download clang-format using your system's package manager, or directly
543 Output from clang-format varies by clang-format version, for best results your
544 version should match the one used on Jenkins. You can find the clang-format
545 version by reading the comment in the `.clang-format` file linked above.
550 # Apply clang-format to modified .c, .h and .cc files
551 $ clang-format -i --style=file \
552 $(git diff --name-only --diff-filter=ACMR '*.[hc]' '*.cc')
555 Check the .clang-format file for the version used to generate it if there is any
558 Some Git installations have clang-format integration. Here are some examples:
561 # Apply clang-format to all staged changes:
562 $ git clang-format
565 $ git clang-format -f
568 $ git clang-format -f -p
571 ## License header {#license-header}
590 ## Submitting patches {#submitting-patches}
597 ### Login cookie {#login-cookie}
605 this visit the [Gerrit review server](https://aomedia-review.googlesource.com)
608 ### Contributor agreement {#contributor-agreement}
617 ### Testing your code {#testing-your-code}
619 The testing basics are covered in the [testing section](#testing-the-av1-codec)
625 ### Commit message hook {#commit-message-hook}
627 Gerrit requires that each submission include a unique Change-Id. You can assign
628 one manually using git commit --amend, but it’s easier to automate it with the
629 commit-msg hook provided by Gerrit.
631 Copy commit-msg to the `.git/hooks` directory of your local repo. Here's an
635 …$ curl -Lo aom/.git/hooks/commit-msg https://chromium-review.googlesource.com/tools/hooks/commit-m…
637 # Next, ensure that the downloaded commit-msg script is executable:
638 $ chmod u+x aom/.git/hooks/commit-msg
642 [documentation](https://gerrit-review.googlesource.com/Documentation/user-changeid.html)
645 ### Upload your change {#upload-your-change}
650 $ git push https://aomedia-review.googlesource.com/aom HEAD:refs/for/main
653 ### Incorporating reviewer comments {#incorporating-reviewer-comments}
659 2. Recommit your edits using the --amend flag, for example:
662 $ git commit -a --amend
672 ### Submitting your change {#submitting-your-change}
689 ### Viewing the status of uploaded changes {#viewing-the-status-of-uploaded-changes}
692 [Gerrit](https://aomedia-review.googlesource.com/), sign in, and click My >
700 ## Bug reports {#bug-reports}