c++ - gradle请参阅model.components.binaries.all的输出

标签 c++ debugging gradle

我有

all {
    if (toolChain in Gcc) {
        cppCompiler.args "--std=c++11",
        "-I", "${lib_base_path}",
        "-I", "${lib_base_path}${File.separator}include",
        "-I", "${jni_base_path}",
        "-I", "/usr/local/inclue/eigen3"
        linker.args "-L", "${lib_linker_path}", "-lcpp_pose",
            "-Wl,-rpath,${lib_linker_path}"
    } else if (toolChain in Clang) {
        cppCompiler.args "--std=c++11",
        "-I", "${lib_base_path}",
        "-I", "${lib_base_path}${File.separator}include",
        "-I", "${jni_base_path}",
        "-I", "/usr/local/inclue/eigen3"
        linker.args "-L", "${lib_linker_path}", "-lcpp_pose",
            "-Wl,-rpath,${lib_linker_path}"
    } else {
        throw GradleException("Tool chain " + toolChain +
                              " is not supported.")
    }
}

作为我的gradle.build文件中的一部分。但是当gradle建立时,我得到
fatal error: 'Eigen/Core' file not found
#include <Eigen/Core>
         ^
1 error generated.

包含标志中的/ usr / local / include / eigen3应该解决此问题。要调试gradle用于构建我的二进制文件的过程,我想看看要调试的compile语句。我该怎么做呢?

最佳答案

重新考虑了Google的内容后,我发现了以下信息:

https://discuss.gradle.org/t/debug-native-output/9508/2

答案在:

We generate an options file (build/tmp//options.txt) that has all of the common arguments. You can use -i or --info to see just the command line that's being executed (per source file) as well.

There's a hook withArguments...

关于c++ - gradle请参阅model.components.binaries.all的输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42632438/

相关文章:

c++ - 模板类作为STL容器参数

c# - 检测到 ContextSwitchDeadlock

java - Gradle:验证类列表在构建时的类路径中

c++ - 将三个不同类的对象存储在一个数组中

c++ - MFC - 在 DLL 卸载时扫描我的代码以查找任何剩余的计时器、事件、线程等

c++ - 如何将对象类的方法作为 std::function 传递?

debugging - 如何查看我的 HTTP 帖子?

c# - Windbg .load 扩展需要路径中的转义反斜杠 (\) 字符

gradle - 无法加载库 liblwjgl.so

gradle - 如何在gradle cmd中包含/排除junit5标签?