# Clean CMake Files

If you run into an error like this

```bash
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/environment/regression-tests/contracts/eos
⚫ Scanning dependencies of target thezeostoken
◼️ [  1%] Creating directories for 'thezeostoken'
◼️ [  1%] No download step for 'thezeostoken'
◼️ [  2%] No patch step for 'thezeostoken'
◼️ [  2%] No update step for 'thezeostoken'
◼️ [  2%] Performing configure step for 'thezeostoken'
CMake Error: The current CMakeCache.txt directory /home/ubuntu/environment/regression-tests/contracts/eos/thezeostoken/CMakeCache.txt is different than the directory /contracts/thezeostoken where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
CMakeFiles/thezeostoken.dir/build.make:106: recipe for target 'thezeostoken-prefix/src/thezeostoken-stamp/thezeostoken-configure' failed
◼️ make[2]: *** [thezeostoken-prefix/src/thezeostoken-stamp/thezeostoken-configure] Error 1
◼️ make[1]: *** [CMakeFiles/thezeostoken.dir/all] Error 2
◼️ make: *** [all] Error 2
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/thezeostoken.dir/all' failed
Makefile:83: recipe for target 'all' failed
☹️ eos contracts compile failed, if you want to use docker add --docker
```

Or if you're swapping between CDT versions or having cmake issues in general..

{% hint style="warning" %}
If you're using a legacy CDT < v3.0.0 be sure to unbox, compile, test with --legacy-cdt
{% endhint %}

You can use the bash script below to clear those directories.

```bash
find ./contracts/eos/ -type d -name *prefix -prune -exec rm -rf {} \;
find ./contracts/eos/ -type d -name CMakeFiles -prune -exec rm -rf {} \;
find ./contracts/eos/ -type f -name 'CMakeCache.txt' -delete
find ./contracts/eos/ -type f -name 'Makefile' -delete
find ./contracts/eos/ -type f -name 'cmake_install.cmake' -delete
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.liquidapps.io/liquidapps-documentation/working-with-zeus-sdk/zeus-basics/compiling-contracts/clean-cmake-files.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
