Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ghost opened this issue Aug 5, 2021 · 0 comments
Open

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

ghost opened this issue Aug 5, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Aug 5, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants