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

I’m trying to build ParaView in MacOS. I went to the repository which lead me to build paraview-superbuild

Following instructions I executed

$ 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


$ mkdir build
$ cd build
$ cmake ..

And I’m getting the error

-- 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.


The error says what it means to me at least :slight_smile: (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.

Okay, thanks for the reply.

I did
mkdir ../build
Icmake ../paraview-superbuild

But still got the same error :thinking:

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.