# CMake Error at superbuild/cmake/SuperbuildMacros.cmake building ParaView

**URL:** https://discourse.paraview.org/t/cmake-error-at-superbuild-cmake-superbuildmacros-cmake-building-paraview/3016
**Category:** Development
**Created:** [November 21, 2019, 11:16am UTC](https://discourse.paraview.org/t/cmake-error-at-superbuild-cmake-superbuildmacros-cmake-building-paraview/3016 "2019-11-21T11:16:00Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![maria\_vlas](https://discourse.paraview.org/user_avatar/discourse.paraview.org/maria_vlas/32/2385_2.png) [@maria\_vlas](https://discourse.paraview.org/u/maria_vlas)
#### Post date: [November 21, 2019, 11:16am UTC](https://discourse.paraview.org/t/cmake-error-at-superbuild-cmake-superbuildmacros-cmake-building-paraview/3016/1 "2019-11-21T11:16:00Z")

</div>

I’m trying to build ParaView in MacOS. I went to the repository `https://gitlab.kitware.com/paraview/paraview/tree/master` which lead me to build paraview-superbuild  
`https://gitlab.kitware.com/paraview/paraview-superbuild/tree/v5.7.0``

Following instructions I executed

```auto
$ cd paraview-superbuild
$ git fetch origin # ensure you have the latest state from the main repo
$ git checkout v5.7.0 # replace `v5.7.0` with tag name of your choice
$ git submodule update

```

Then

```auto
$ mkdir build
$ cd build
$ cmake ..

```

And I’m getting the error

```auto
-- Found Git: /usr/local/bin/git (found version "2.21.0")
-- Determined source version for paraview: 5.7.0
CMake Error at superbuild/cmake/SuperbuildMacros.cmake:481 (message):
  The build tree appears to be inside of the git repository located at
  /Users/username/Desktop/dev/paraview/paraview-superbuild. This interferes
  with the way the superbuild applies patches to projects and is not
  supported. Please relocate the build tree to a directory which is not
  under a git repository.

```

What is happening here? Was cmake execute in the right folder? because there are more CMakeList.txt inside paraview-superbuild.

Thanks!

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [November 21, 2019, 6:22pm UTC](https://discourse.paraview.org/t/cmake-error-at-superbuild-cmake-superbuildmacros-cmake-building-paraview/3016/2 "2019-11-21T18:22:36Z")

</div>

The error says what it means to me at least 🙂 (wording improvements would be greatly appreciated). Your build tree is under a Git repository checkout (at the path given). We use `git apply` to apply patches to the sources that the superbuild builds and this changes behavior when the build tree is under a git repository in a way that can’t be worked around (AFAIK), so we error out on it. Basically, instead of `mkdir build`, use `mkdir ../build`.

---

<div class="post-metadata">

### Author: ![maria\_vlas](https://discourse.paraview.org/user_avatar/discourse.paraview.org/maria_vlas/32/2385_2.png) [@maria\_vlas](https://discourse.paraview.org/u/maria_vlas)
#### Post date: [November 21, 2019, 6:41pm UTC](https://discourse.paraview.org/t/cmake-error-at-superbuild-cmake-superbuildmacros-cmake-building-paraview/3016/3 "2019-11-21T18:41:44Z")

</div>

Okay, thanks for the reply.

I did  
`mkdir ../build`  
I`cmake ../paraview-superbuild`

But still got the same error 🤔

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [November 21, 2019, 9:57pm UTC](https://discourse.paraview.org/t/cmake-error-at-superbuild-cmake-superbuildmacros-cmake-building-paraview/3016/4 "2019-11-21T21:57:38Z")

</div>

Hmm. What path does it say the git repository is located at? Your build tree needs to be outside (I prefer a sibling directory, but it’s up to you) of that directory.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 9, 2020, 7:38am UTC](https://discourse.paraview.org/t/cmake-error-at-superbuild-cmake-superbuildmacros-cmake-building-paraview/3016/9 "2020-10-09T07:38:22Z")

</div>


