# Cannot compile Slicer on Mac - macOS Sierra + clang 9 + cmake 3.9.1

**URL:** https://discourse.slicer.org/t/cannot-compile-slicer-on-mac-macos-sierra-clang-9-cmake-3-9-1/1104
**Category:** Development
**Tags:** build
**Created:** [September 22, 2017, 6:27pm UTC](https://discourse.slicer.org/t/cannot-compile-slicer-on-mac-macos-sierra-clang-9-cmake-3-9-1/1104 "2017-09-22T18:27:59Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![blowekamp](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/blowekamp/32/1386_2.png) [@blowekamp](https://discourse.slicer.org/u/blowekamp)
#### Post date: [September 22, 2017, 8:34pm UTC](https://discourse.slicer.org/t/cannot-compile-slicer-on-mac-macos-sierra-clang-9-cmake-3-9-1/1104/9 "2017-09-22T20:34:52Z")

</div>

Friday after noon ramblings on this issue:

Further experimentation yields that if SimpleITK is configured with the CMAKE\_CXX\_STANDARD flags must not be null for CMAKE. Therefor I presume Slicers Superbuild is explicitly setting the standard. ( Why not c++03?)

I would consider not passing these CMAKE\_CXX\_STANDARD flags for this problematic case to SimpleITK. When on OS X, and the standard version is less that 11 and the OS X SDK is greater that 10.7? These flags should not be passed. This will enable SimpleITK to set the flag as need.

While SimpleITK could manipulate the CMAKE\_CXX\_STANARD flag for this case, because older cmake’s try\_compile does not respect this option it would yield inconsistent and trouble prone behavior. There are a lot of factors that effect this situation… I’ll have to think about it further…

Compiling ITK with C++98 while compiling SimpleITK C++11, is not ideal, but all the tests seem to pass for the wrapping. The problem may be if SimpleITK C++ interface is used with this mixed standard configuration.

---

_[View the full topic](https://discourse.slicer.org/t/cannot-compile-slicer-on-mac-macos-sierra-clang-9-cmake-3-9-1/1104)._
