~bzoltan/kubuntu-packaging/decouple_cmake_plugin

« back to all changes in this revision

Viewing changes to src/shared/qbs/share/qbs/modules/cpp/windows-msvc.qbs

  • Committer: Timo Jyrinki
  • Date: 2013-11-15 12:25:23 UTC
  • mfrom: (1.1.28)
  • Revision ID: timo.jyrinki@canonical.com-20131115122523-i2kyamsu4gs2mu1m
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
    compilerName: "cl.exe"
20
20
 
21
21
    property bool generateManifestFiles: true
22
 
    property string toolchainInstallPath
23
 
    property string windowsSDKPath
 
22
    property path toolchainInstallPath
 
23
    property path windowsSDKPath
24
24
    property string architecture: qbs.architecture || "x86"
25
25
    staticLibraryPrefix: ""
26
26
    dynamicLibraryPrefix: ""
70
70
    }
71
71
 
72
72
    Transformer {
73
 
        condition: precompiledHeader !== undefined
74
 
        inputs: precompiledHeader
 
73
        condition: cPrecompiledHeader !== undefined
 
74
        inputs: cPrecompiledHeader
75
75
        Artifact {
76
76
            fileTags: ['obj']
77
77
            fileName: {
78
78
                var completeBaseName = FileInfo.completeBaseName(product.moduleProperty("cpp",
79
 
                        "precompiledHeader"));
80
 
                return ".obj/" + product.name + "/" + completeBaseName + '.obj'
 
79
                        "cPrecompiledHeader"));
 
80
                return ".obj/" + product.name + "/" + completeBaseName + '_c.obj'
81
81
            }
82
82
        }
83
83
        Artifact {
84
 
            fileTags: ['c++_pch']
85
 
            fileName: ".obj/" + product.name + "/" + product.name + '.pch'
 
84
            fileTags: ['c_pch']
 
85
            fileName: ".obj/" + product.name + "/" + product.name + '_c.pch'
86
86
        }
87
87
        prepare: {
88
88
            var platformDefines = ModUtils.moduleProperties(input, 'platformDefines');
91
91
            var systemIncludePaths = ModUtils.moduleProperties(input, 'systemIncludePaths');
92
92
            var cFlags = ModUtils.moduleProperties(input, 'platformCFlags').concat(
93
93
                        ModUtils.moduleProperties(input, 'cFlags'));
 
94
            return MSVC.prepareCompiler(product, input, outputs, platformDefines, defines, includePaths, systemIncludePaths, cFlags, undefined)
 
95
        }
 
96
    }
 
97
 
 
98
    Transformer {
 
99
        condition: cxxPrecompiledHeader !== undefined
 
100
        inputs: cxxPrecompiledHeader
 
101
        explicitlyDependsOn: ["c_pch"]  // to prevent vc--0.pdb conflict
 
102
        Artifact {
 
103
            fileTags: ['obj']
 
104
            fileName: {
 
105
                var completeBaseName = FileInfo.completeBaseName(product.moduleProperty("cpp",
 
106
                        "cxxPrecompiledHeader"));
 
107
                return ".obj/" + product.name + "/" + completeBaseName + '_cpp.obj'
 
108
            }
 
109
        }
 
110
        Artifact {
 
111
            fileTags: ['cpp_pch']
 
112
            fileName: ".obj/" + product.name + "/" + product.name + '_cpp.pch'
 
113
        }
 
114
        prepare: {
 
115
            var platformDefines = ModUtils.moduleProperties(input, 'platformDefines');
 
116
            var defines = ModUtils.moduleProperties(input, 'defines');
 
117
            var includePaths = ModUtils.moduleProperties(input, 'includePaths');
 
118
            var systemIncludePaths = ModUtils.moduleProperties(input, 'systemIncludePaths');
94
119
            var cxxFlags = ModUtils.moduleProperties(input, 'platformCxxFlags').concat(
95
120
                        ModUtils.moduleProperties(input, 'cxxFlags'));
96
 
            return MSVC.prepareCompiler(product, input, outputs, platformDefines, defines, includePaths, systemIncludePaths, cFlags, cxxFlags)
 
121
            return MSVC.prepareCompiler(product, input, outputs, platformDefines, defines, includePaths, systemIncludePaths, undefined, cxxFlags)
97
122
        }
98
123
    }
99
124
 
101
126
        id: compiler
102
127
        inputs: ["cpp", "c"]
103
128
        auxiliaryInputs: ["hpp"]
104
 
        explicitlyDependsOn: ["c++_pch"]
 
129
        explicitlyDependsOn: ["c_pch", "cpp_pch"]
105
130
 
106
131
        Artifact {
107
132
            fileTags: ['obj']