# Build - Error in CMake GUI

**URL:** <https://discourse.slicer.org/t/build-error-in-cmake-gui/13267>\
**Category:** Support\
**Tags:** build\
**Created:** [August 31, 2020, 8:50pm UTC](https://discourse.slicer.org/t/build-error-in-cmake-gui/13267 "2020-08-31T20:50:43Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Valmar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/valmar/32/7948_2.png) [@Valmar](https://discourse.slicer.org/u/Valmar)\
**Post date:** [August 31, 2020, 8:50pm UTC](https://discourse.slicer.org/t/build-error-in-cmake-gui/13267/1 "2020-08-31T20:50:43Z")

</div>

![Screen Shot 2020-08-31 at 17.28.27](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/3/43d97a216f66f7d5cd47ff67c999611b0f6e4124.png)

If i remove the line 70, the other errors happened.  
error:  
CMake Error at CMake/SlicerInitializeOSXVariables.cmake:70 (message):  
CMAKE\_OSX\_DEPLOYMENT\_TARGET must be 10.13 or greater.  
Call Stack (most recent call first):  
CMakeLists.txt:31 (include)

How can i proceed here?

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [August 31, 2020, 9:34pm UTC](https://discourse.slicer.org/t/build-error-in-cmake-gui/13267/2 "2020-08-31T21:34:02Z")

</div>

What version of macOS are you running?  
What version of XCode are you using?

What area of Slicer development are you interested in?

---

<div class="post-metadata">

**Author:** ![Valmar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/valmar/32/7948_2.png) [@Valmar](https://discourse.slicer.org/u/Valmar)\
**Post date:** [August 31, 2020, 10:23pm UTC](https://discourse.slicer.org/t/build-error-in-cmake-gui/13267/3 "2020-08-31T22:23:40Z")

</div>

I`m using macOS Catalina 10.15.2 (19C57)  
Cmake: 3.18.2  
Xcode: Version 11.3 (11C29)

I just clone de Slicer and SlicerIGT github, create a new folder called Slicer-bin and Igt-bin. In the Cmake i put the “source code” = github cloned folder. In the “where to build the binaries” = -bin folders. I`m trying to build both of them to make some experiments.

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [August 31, 2020, 11:14pm UTC](https://discourse.slicer.org/t/build-error-in-cmake-gui/13267/4 "2020-08-31T23:14:09Z")

</div>

I would suggest not to do anything with SlicerIGT until you have a working Slicer build.

Have you built Slicer successfully yet?

---

<div class="post-metadata">

**Author:** ![Valmar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/valmar/32/7948_2.png) [@Valmar](https://discourse.slicer.org/u/Valmar)\
**Post date:** [August 31, 2020, 11:28pm UTC](https://discourse.slicer.org/t/build-error-in-cmake-gui/13267/5 "2020-08-31T23:28:44Z")

</div>

The present problem is in Slicer build. I did nothing with IGT yet.

---

<div class="post-metadata">

**Author:** ![Valmar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/valmar/32/7948_2.png) [@Valmar](https://discourse.slicer.org/u/Valmar)\
**Post date:** [September 1, 2020, 4:33pm UTC](https://discourse.slicer.org/t/build-error-in-cmake-gui/13267/6 "2020-09-01T16:33:14Z")

</div>

Any tips? I’m out of ideas.

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [September 1, 2020, 5:01pm UTC](https://discourse.slicer.org/t/build-error-in-cmake-gui/13267/7 "2020-09-01T17:01:07Z")

</div>

@Valmar Have you been following the macOS build instructions over at [https://slicer.readthedocs.io/en/latest/developer\_guide/build\_instructions/macos.html](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/macos.html) ?

@pieper Can you provide help for this macOS user?

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [September 1, 2020, 7:10pm UTC](https://discourse.slicer.org/t/build-error-in-cmake-gui/13267/8 "2020-09-01T19:10:45Z")

</div>

Hi @Valmar I start a fresh build using the cmake command line below. This satisfies the initial checks. After that first configuration you can use ccmake if you need to make further changes.

```auto
BUILD_TYPE=Debug
cmake \
	-DCMAKE_BUILD_TYPE:STRING=${BUILD_TYPE} \
	-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \
	-DQt5_VERSION:STRING=5.15 \
	-DQt5_DIR:PATH=/usr/local/Cellar/qt/5.15.0/lib/cmake/Qt5 \
	/Users/pieper/slicer/latest/Slicer

```

---

<div class="post-metadata">

**Author:** ![Valmar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/valmar/32/7948_2.png) [@Valmar](https://discourse.slicer.org/u/Valmar)\
**Post date:** [September 2, 2020, 5:18pm UTC](https://discourse.slicer.org/t/build-error-in-cmake-gui/13267/9 "2020-09-02T17:18:25Z")

</div>

Thank you @pieper! Cmake GUI isn`t working in this first step. The same problem appear again in the make step.

command used: make and SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk make -j20 (documentation)

error:  
CMake Error at CMake/SlicerInitializeOSXVariables.cmake:70 (message):  
CMAKE\_OSX\_DEPLOYMENT\_TARGET must be 10.13 or greater.  
Call Stack (most recent call first):  
CMakeLists.txt:31 (include)

– Configuring incomplete, errors occurred!  
make: \*\*\* [cmake\_check\_build\_system] Error 1  
valmarzinho@Valmarzinho Slicer-bin %

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [September 2, 2020, 7:18pm UTC](https://discourse.slicer.org/t/build-error-in-cmake-gui/13267/10 "2020-09-02T19:18:47Z")

</div>

Hmm, I don’t have that error. Are you sure you copied the cmake line that I pasted before? It sets `-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15` so that error should not happen…

---

<div class="post-metadata">

**Author:** ![Valmar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/valmar/32/7948_2.png) [@Valmar](https://discourse.slicer.org/u/Valmar)\
**Post date:** [September 2, 2020, 7:28pm UTC](https://discourse.slicer.org/t/build-error-in-cmake-gui/13267/11 "2020-09-02T19:28:38Z")

</div>

I reinstalled cmake, xcode and qt. I deleted the cmakeCache.

I used the cmake command that you passed me (changing the user name) and now it worked.

I’m waiting for the make to end!

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [September 2, 2020, 7:32pm UTC](https://discourse.slicer.org/t/build-error-in-cmake-gui/13267/12 "2020-09-02T19:32:25Z")

</div>

👍

Depending on your machine it can take a while. Using `make -j N` where N is the number of CPU cores available can speed things along nicely. Good luck.
