Skip to content

Build needs C++14 feature hint on MacOS #37

@mvorl

Description

@mvorl

When building on MacOS 10.13.6 using MacPort's CMake 3.18.4 and Apple LLVM version 10.0.0 (clang-1000.11.45.5), it fails due to

[  8%] Building CXX object CMakeFiles/axpbox.dir/src/AlphaCPU.cpp.o
In file included from .../axpbox/src/AliM1543C.cpp:266:
.../axpbox/src/AliM1543C.hpp:211:20: error: function definition does not declare parameters
  std::atomic_bool myThreadDead{false};
                   ^
.../axpbox/src/AliM1543C.cpp:496:21: **error: no member named 'make_unique' in namespace 'std'**
    myThread = std::make_unique<std::thread>([this](){ this->run(); });
               ~~~~~^
.../axpbox/src/AliM1543C.cpp:496:44: error: expected '(' for function-style cast or type construction
    myThread = std::make_unique<std::thread>([this](){ this->run(); });
                                ~~~~~~~~~~~^
.../axpbox/src/AliM1543C.cpp:496:46: error: expected expression
    myThread = std::make_unique<std::thread>([this](){ this->run(); });
                                             ^

Fix is to request C++14 features:
target_compile_features(axpbox PUBLIC cxx_std_14)

With this, there are only a few warnings about type mismatches between long and long long arguments.

Thanks for the great work on this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions