使用cmake构建C ++时处理#import(tlh)

时间:2018-11-29 16:06:21

标签: c++ cmake

我正在更改应用程序的构建系统以使用cmake。 我们有一些带有#import的C ++文件(编译时生成.tlh),这些文件必须在其他源文件之前构建,并且在 CMakeLists.txt 中找不到任何指定依赖项的方法。

指定中间文件目录(.obj所在的位置)将解决我的问题。

谢谢

我们有带有#import的cpp文件:

(function($, F){

    // Extend the Row.$create method to add an id attribute to each <tr>.
    F.Row.extend("$create", function(){
        // call the original method
        this._super();
        // get the current row values
        var values = this.val();
        // then add whatever attributes are required
        this.$el.attr("id", values["your-id-column-name"]);
    });

})(jQuery, FooTable);

使用import语句编译cpp时,导入会导致包含文件.tlh,其他cpp包括生成的.tlh文件,该文件会在cpp源文件之间建立依赖关系。

0 个答案:

没有答案