Lines Matching +full:default +full:- +full:build +full:- +full:release
6 Builds must use CMake 3.15 or higher as the build system generator. The
7 examples on this page show how to use it to generate build systems for NMake
8 (Windows) and Make (Linux and macOS), but CMake supports other build system
15 ### Configuring the build
17 To use CMake you must first configure the build. Create a build directory in
19 to generate the build system.
22 # Create a build directory
23 mkdir build
24 cd build
26 # Configure your build of choice, for example:
28 # x86-64 using a Visual Studio solution
29 cmake -G "Visual Studio 16 2019" -T ClangCL -DCMAKE_INSTALL_PREFIX=..\ ^
30 -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON ..
32 # x86-64 using NMake
33 cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=..\ ^
34 -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON ..
37 A single CMake configure can build multiple binaries for a single target CPU
39 will include the build variant as a postfix. It is possible to build any set of
42 Using the Visual Studio Clang-CL LLVM toolchain (`-T ClangCL`) is optional but
43 produces significantly faster binaries than the default toolchain. The C++ LLVM
48 Once you have configured the build you can use NMake to compile the project
49 from your build dir, and install to your target install directory.
52 # Run a build and install build outputs in `${CMAKE_INSTALL_PREFIX}/bin/`
53 cd build
64 ### Configuring the build
66 To use CMake you must first configure the build. Create a build directory
68 to generate the build system.
74 # Create a build directory
75 mkdir build
76 cd build
78 # Configure your build of choice, for example:
81 cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../ \
82 -DASTCENC_ISA_NEON=ON ..
84 # x86-64
85 cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../ \
86 -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON ..
88 # macOS universal binary build
89 cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../ ..
92 A single CMake configure can build multiple binaries for a single target CPU
94 will include the build variant as a postfix. It is possible to build any set of
97 For macOS, we additionally support the ability to build a universal binary.
98 This build includes SSE4.1 (`x86_64`), AVX2 (`x86_64h`), and NEON (`arm64`)
99 build slices in a single output binary. The OS will select the correct variant
100 to run for the machine being used. This is the default build target for a macOS
101 build, but single-target binaries can still be built by setting
102 `-DASTCENC_UNIVERSAL_BINARY=OFF` and then manually selecting the specific ISA
107 Once you have configured the build you can use Make to compile the project from
108 your build dir, and install to your target install directory.
111 # Run a build and install build outputs in `${CMAKE_INSTALL_PREFIX}/bin/`
113 cd build
114 make install -j16
122 ### Configuring the build
124 To use CMake you must first configure the build. Create a build directory
126 to generate the build system.
129 # Create a build directory
130 mkdir build
131 cd build
133 # Configure a universal build
134 cmake -G Xcode -DCMAKE_INSTALL_PREFIX=../ ..
139 Once you have configured the build you can use CMake to compile the project
140 from your build dir, and install to your target install directory.
143 cmake --build . --config Release
146 cmake --install . --config Release
149 ## Advanced build options
152 the build system.
154 ### Build Types
159 | ---------------- | -------------------------------------------------------- |
160 | Release | Optimized release build |
161 | RelWithDebInfo | Optimized release build with debug info |
162 | Debug | Unoptimized debug build with debug info |
164 Note that optimized release builds are compiled with link-time optimization,
170 option `-DASTCENC_SHAREDLIB=ON` at configure time. For macOS build targets the
171 shared library supports the same universal build configuration as the command
175 are an extra build output that are not currently used by the command line tool.
181 performance can be improved by limiting the block sizes supported in the build
182 by adding `-DASTCENC_BLOCK_MAX_TEXELS=<texel_count>` to to CMake command line
183 when configuring. Legal block sizes that are unavailable in a restricted build
186 ### Non-invariant builds
188 All normal builds are designed to be invariant, so any build from the same git
189 revision will produce bit-identical results for all compilers and CPU
191 not required you can specify `-DASTCENC_INVARIANCE=OFF` to enable additional
199 development purposes it is possible to build an intrinsic-free build which uses
200 no explicit SIMD acceleration (the compiler may still auto-vectorize).
202 To enable this binary variant add `-DASTCENC_ISA_NONE=ON` to the CMake command
217 To build unit tests add `-DASTCENC_UNITTEST=ON` to the CMake command line when
220 To run unit tests use the CMake `ctest` utility from your build directory after
224 cd build
225 ctest --verbose
231 supports it. To build binaries with ASAN checking enabled add `-DASTCENC_ASAN=ON`
237 development build for testing on e.g. different Arm CPU microarchitectures.
239 The build script below shows one possible route to building the command line tool for Android. Once
244 ANDROID_ABI=arm64-v8a
249 BUILD_DIR=build
251 mkdir -p ${BUILD_DIR}
255 -DCMAKE_INSTALL_PREFIX=./ \
256 -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
257 -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \
258 -DANDROID_ABI=${ANDROID_ABI} \
259 -DANDROID_ARM_NEON=ON \
260 -DANDROID_PLATFORM=android-21 \
261 -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang \
262 -DANDROID_TOOLCHAIN=clang \
263 -DANDROID_STL=c++_static \
264 -DARCH=aarch64 \
265 -DASTCENC_ISA_NEON=ON \
268 make -j16
271 ## Packaging a release bundle
273 We support building a release bundle of all enabled binary configurations in
274 the current CMake configuration using the `package` build target
278 * `-DASTCENC_PACAKGE=<arch>` to set the package architecture/variant name used
279 to name the package archive (not set by default).
282 # Run a build and package build outputs in `./astcenc-<ver>-<os>-<arch>.<fmt>`
283 cd build
284 make package -j16
298 - - -
300 _Copyright © 2019-2023, Arm Limited and contributors. All rights reserved._