-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ broken in cmake 3.7.0-rc2
While building the new gromacs 2016 release against the LLVM.org clang 3.9.0 compilers, in order to use its openmp support, I discovered that cmake 3.7.0-rc2 no longer honors the expected behavior for -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/.
Specially the gromacs build fails in...
CMAKE_OPTIONS="-DGMX_FFT_LIBRARY=fftw3 \
-DGMX_GPU="OFF" \
-DGMX_X11="ON" \
-DCMAKE_INSTALL_NAME_DIR=/sw/lib \
-DCMAKE_INSTALL_PREFIX=/sw \
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" \
-DCMAKE_OSX_SYSROOT:STRING=/"
if [ -f /sw/src/fink.build/gromacs-2016-1/gromacs-2016/INSTALL_MAKE_CHECK ]; then
CMAKE_OPTIONS="$CMAKE_OPTIONS -DREGRESSIONTEST_PATH=/sw/src/fink.build/gromacs-2016-1/gromacs-2016/regressiontests-2016"
fi
# no assembler support for AVX intrinsics until transition to clang
if [ "x86_64" == "x86_64" -o "x86_64" == "i386" ]; then
CMAKE_OPTIONS="$CMAKE_OPTIONS -DGMX_SIMD:STRING=SSE2"
fi
# first build/test/install standard library
cmake $CMAKE_OPTIONS ..
-- The C compiler identification is Clang 3.9.0
-- The CXX compiler identification is Clang 3.9.0
-- Check for working C compiler: /sw/bin/clang-3.9
-- Check for working C compiler: /sw/bin/clang-3.9 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /sw/bin/clang++-3.9
-- Check for working CXX compiler: /sw/bin/clang++-3.9 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Performing Test CXXFLAG_STD_CXX0X
-- Performing Test CXXFLAG_STD_CXX0X - Success
-- Performing Test CXX11_SUPPORTED
-- Performing Test CXX11_SUPPORTED - Success
-- Performing Test CXX11_STDLIB_PRESENT
-- Performing Test CXX11_STDLIB_PRESENT - Failed
CMake Error at cmake/gmxTestCXX11.cmake:138 (message):
This version of GROMACS requires C++11-compatible standard library. Please
use a newer compiler, or a newer standard library, or use the GROMACS 5.1.x
release. See the installation guide for details.
Call Stack (most recent call first):
CMakeLists.txt:164 (gmx_test_cxx11)
[CMakeError.log](/uploads/292cc44c089697527d7bf9eb8e253dce/CMakeError.log)
This issue doesn't occur under cmake 3.6.2.