小编Bre*_*den的帖子

在一个简单的(?)项目中使用 emscripten 和 CMake

所以我有一个相当简单的 C++ 程序,它使用CGAL并使用 CMake 构建。我可以在没有 emscripten 的情况下成功构建并运行它:

cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "Unix Makefiles" .
[output looks good]
make
[command works]
Run Code Online (Sandbox Code Playgroud)

一切都很好,我可以运行输出,但是当我尝试像这样使用 Emscripten 时(这在过去对我有用):

cmake -DCMAKE_TOOLCHAIN_FILE=/home/brenden/emsdk_portable/emscripten/master/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "Unix Makefiles" .
[output looks good]
make
main.cpp:2:10: fatal error: 'CGAL/Triangulation_3.h' file not found
#include <CGAL/Triangulation_3.h>
         ^
1 error generated.
ERROR    root: compiler frontend failed to generate LLVM bitcode, halting
make[2]: *** [CMakeFiles/cgal_test.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/cgal_test.dir/all] Error 2
make: *** [all] Error 2
Run Code Online (Sandbox Code Playgroud)

这显然是行不通的。

我的 CMakeLists.txt 如下所示:

cmake_minimum_required(VERSION …
Run Code Online (Sandbox Code Playgroud)

c++ cmake cgal emscripten

5
推荐指数
1
解决办法
9510
查看次数

Gremlin 3在指定深度停止重复(java)

我想要一个在某个边缘类型上向下遍历的查询,直到它到达具有给定属性的顶点或者它到达起始顶点的给定距离.

当它碰到某个顶点类型时,我可以让这个遍历停止,但我不能让它停在给定的深度/距离.我使用"simplePath"和"count"步骤的方式一定有问题,但我不确定它是什么.

这是Java代码:

GraphTraversal<Vertex, TinkerGraph> traversal = g.V(start)
    .repeat(__.outE("type").subgraph("subGraph").inV())
    .until(
            __.or(
                //this line works just fine
                __.has("type", "one"),   
                //this line doesn't seem to do what I expect,
                //stop when the size of the path from "start" gets too long
                __.simplePath().count().is(P.gt(3))
            )
    )
    .cap("subGraph");
Run Code Online (Sandbox Code Playgroud)

那么当从"开始"顶点到当前顶点的路径大小大于3时,我需要做些什么来使这个遍历停止?

java gremlin tinkerpop

1
推荐指数
1
解决办法
2106
查看次数

标签 统计

c++ ×1

cgal ×1

cmake ×1

emscripten ×1

gremlin ×1

java ×1

tinkerpop ×1