Using Local Copies

While you must download the examples to add Templates when you create new projects, the SDx IDE always downloads the examples into your local .Xilinx folder. The download directory cannot be changed from the SDx Examples dialog box. However, you may want to download the example files to a different location from the.Xilinx folder for a number of reasons.

You can use the git command from a command shell to specify a new destination folder for the downloaded examples:
git clone https://github.com/Xilinx/SDAccel_Examples 
<workspace>/examples

When you clone the SDAccel_Examples using the git command as shown above, you can use the example files as a resource of application and kernel code to use in your own projects. However, many of the files use include statements to include other example files that are managed in the Makefiles of the various examples. These include files are automatically populated into the src folder of a project when the Template is added through the New SDx Project wizard. However, you will need to locate these files and make them local to your project manually.

You can find the needed files by searching for the file from the location of the cloned repository. For example, you could run the following command from the examples folder to find the xcl2.hpp file needed for the vadd example:
find -name xcl2.hpp
In addition, the Makefile in each of the example projects has a special command to localize any include files into the project. Use the following form of the make command in the example project:
make local-files