Skip to content

Fail to build out of the box on Mac OS X #20

@ghost

Description

I have tried to build on Mac OS X and had to do the following fixes to make it pass:

diff --git a/cmake/FindGRPC.cmake b/cmake/FindGRPC.cmake
index df19edd..8c65838 100644
--- a/cmake/FindGRPC.cmake
+++ b/cmake/FindGRPC.cmake
@@ -77,7 +77,7 @@ endfunction()


 set(protobuf_MODULE_COMPATIBLE TRUE)
-  find_package(Protobuf CONFIG REQUIRED)
+  find_package(Protobuf REQUIRED)
   message(STATUS "Using protobuf ${Protobuf_VERSION}")

   set(PROTOBUF_LIBPROTOBUF protobuf::libprotobuf)

-> there is no Protobuf.Config.cmake file to be found

diff --git a/lib/tethys/tethys_graph.cpp b/lib/tethys/tethys_graph.cpp
index 1fee707..219e5bd 100644
--- a/lib/tethys/tethys_graph.cpp
+++ b/lib/tethys/tethys_graph.cpp
@@ -534,7 +534,7 @@ size_t TethysGraph::get_flow() const
     }

     size_t flow = 0;
-    for (const EdgePtr e_ptr : source.out_edges) {
+    for (const EdgePtr &e_ptr : source.out_edges) {
         // cppcheck-suppress useStlAlgorithm
         flow += edges[e_ptr].flow;
     }

The c++ compiler chokes on the lack of reference operator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions