2020-10-05 13:20:58 -04:00
Build procedure
2023-11-13 19:12:54 +00:00
The CMakeLists.txt at hip-tests/samples folder can be used for building and packaging samples.
2020-10-05 13:20:58 -04:00
2023-11-13 19:12:54 +00:00
CMakeLists.txt can support shared and static libs of hip-rocclr runtime.
The same steps can be followed for both.
2020-10-05 13:20:58 -04:00
2023-11-13 19:12:54 +00:00
1. To build a specific sample (e.g. 0_Intro/bit_extract) run ..
2020-10-05 13:20:58 -04:00
2023-11-13 19:12:54 +00:00
cd samples/0_Intro/bit_extract
2020-10-05 13:20:58 -04:00
2023-11-13 19:12:54 +00:00
mkdir -p build && cd build
2020-10-05 13:20:58 -04:00
2023-11-13 19:12:54 +00:00
cmake ..
2020-10-05 13:20:58 -04:00
2023-11-13 19:12:54 +00:00
make all
2. To build all samples together run ..
2020-10-05 13:20:58 -04:00
2023-11-13 19:12:54 +00:00
cd hip-tests
2020-10-05 13:20:58 -04:00
2020-10-12 10:27:33 -04:00
mkdir -p build && cd build
2020-10-05 13:20:58 -04:00
2020-10-12 10:27:33 -04:00
rm -rf * (to clear up)
2023-11-13 19:12:54 +00:00
cmake ../samples
2020-10-05 13:20:58 -04:00
2023-11-13 19:12:54 +00:00
make build_samples
2020-10-12 10:27:33 -04:00
2023-11-13 19:12:54 +00:00
In order to build specific samples (Intro, Utils or Cookbook) run ..
2020-10-09 21:13:34 -04:00
2023-11-13 19:12:54 +00:00
make build_intro
make build_utils
make build_cookbook
2023-02-16 07:17:59 +05:30
2023-11-13 19:12:54 +00:00
Note that if you want debug version, add "-DCMAKE_BUILD_TYPE=Debug" in cmake cmd.
2023-02-16 07:17:59 +05:30
2023-11-13 19:12:54 +00:00
3. To package samples and generate packages. From hip-tests/build
2023-02-16 07:17:59 +05:30
cmake ../samples
make package_samples
2023-12-11 03:43:30 +00:00
## Note: sample 2_Cookbook/22_cmake_hip_lang is current not included in toplevel cmake. To build this sample from toplevel cmake, uncomment Line 43 inside samples/2_Cookbook/CMakeLists.txt.