I have been trying to build IMP from source on Conda on my mac. It mostly goes well except in one file it gets flustered by a for-range loop (see Build output below). If I build using the same cmd-line just with --std=c++11, or std=c++14, or
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
 
ZjQcmQRYFpfptBannerEnd
I have been trying to build IMP from source on Conda on my mac. It mostly goes well except in one file it gets flustered by a for-range loop (see Build output below). If I build using the same cmd-line just with --std=c++11, or std=c++14, or std=c++17, it works just fine. Moreover, cmake does detect that it should work with C++11 (see CMake output below). Any ideas?
Thanks!
Barak

Build output:

(IMP_BUILD_py310) /Users/Shared/imp/fast_checks$ $ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DIMPATOM_COMPILATION -DIMP_EXECUTABLE -Iinclude -I/Users/Shared/imp/repository/modules/core/dependency/python-ihm/src -isystem /opt/local/include/eigen3 -w  -O3 -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk -MD -MT modules/atom/benchmark/CMakeFiles/IMP.atom-benchmark_md_charmm.cpp.dir/benchmark_md_charmm.cpp.o -MF modules/atom/benchmark/CMakeFiles/IMP.atom-benchmark_md_charmm.cpp.dir/benchmark_md_charmm.cpp.o.d -o modules/atom/benchmark/CMakeFiles/IMP.atom-benchmark_md_charmm.cpp.dir/benchmark_md_charmm.cpp.o -c /Users/Shared/imp/repository/modules/atom/benchmark/benchmark_md_charmm.cpp          

/Users/Shared/imp/repository/modules/atom/benchmark/benchmark_md_charmm.cpp:69:30: error: unexpected ':' in nested name specifier; did you mean '::'?

    for(atom::Hierarchy atom : atoms) {

                             ^

                             ::

/Users/Shared/imp/repository/modules/atom/benchmark/benchmark_md_charmm.cpp:69:32: error: definition or redeclaration of 'atoms' not allowed inside a function

    for(atom::Hierarchy atom : atoms) {

                        ~~~~~~ ^

/Users/Shared/imp/repository/modules/atom/benchmark/benchmark_md_charmm.cpp:69:32: error: no member named 'atoms' in namespace 'IMP::atom'

    for(atom::Hierarchy atom : atoms) {

                        ~~~~~~ ^

/Users/Shared/imp/repository/modules/atom/benchmark/benchmark_md_charmm.cpp:69:37: error: expected ';' in 'for' statement specifier

    for(atom::Hierarchy atom : atoms) {

                                    ^

/Users/Shared/imp/repository/modules/atom/benchmark/benchmark_md_charmm.cpp:69:37: error: expected ';' in 'for' statement specifier

/Users/Shared/imp/repository/modules/atom/benchmark/benchmark_md_charmm.cpp:70:17: error: unexpected namespace name 'atom': expected expression

      core::XYZ(atom).set_coordinates_are_optimized(true);

                ^

6 errors generated.


CMake output:
-- The C compiler identification is AppleClang 13.0.0.13000029

-- The CXX compiler identification is AppleClang 13.0.0.13000029

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped

-- Detecting C compile features

-- Detecting C compile features - done

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- Found Python3: /Users/Shared/Miniconda/envs/IMP_BUILD_py310/bin/python3.1 (found version "3.10.8") found components: Interpreter Development NumPy Development.Module Development.Embed 

-- Running check_common_problems

-- Running clean_build_dir

-- Running setup_cmake

-- clang version: 13.0.0

-- Using clang C++11 (or later) support