1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
6 #include "cmConfigure.h" // IWYU pragma: keep
11 #include "cmPlaceholderExpander.h"
13 class cmOutputConverter
;
15 class cmRulePlaceholderExpander
: public cmPlaceholderExpander
18 cmRulePlaceholderExpander(
19 std::map
<std::string
, std::string
> compilers
,
20 std::map
<std::string
, std::string
> variableMappings
,
21 std::string compilerSysroot
, std::string linkerSysroot
);
23 void SetTargetImpLib(std::string
const& targetImpLib
)
25 this->TargetImpLib
= targetImpLib
;
28 // Create a struct to hold the variables passed into
29 // ExpandRuleVariables
32 const char* CMTargetName
= nullptr;
33 const char* CMTargetType
= nullptr;
34 const char* TargetPDB
= nullptr;
35 const char* TargetCompilePDB
= nullptr;
36 const char* TargetVersionMajor
= nullptr;
37 const char* TargetVersionMinor
= nullptr;
38 const char* Language
= nullptr;
39 const char* AIXExports
= nullptr;
40 const char* Objects
= nullptr;
41 const char* Target
= nullptr;
42 const char* LinkLibraries
= nullptr;
43 const char* Source
= nullptr;
44 const char* AssemblySource
= nullptr;
45 const char* PreprocessedSource
= nullptr;
46 const char* DynDepFile
= nullptr;
47 const char* Output
= nullptr;
48 const char* Object
= nullptr;
49 const char* ObjectDir
= nullptr;
50 const char* ObjectFileDir
= nullptr;
51 const char* Flags
= nullptr;
52 const char* ObjectsQuoted
= nullptr;
53 const char* SONameFlag
= nullptr;
54 const char* TargetSOName
= nullptr;
55 const char* TargetInstallNameDir
= nullptr;
56 const char* Linker
= nullptr;
57 const char* LinkFlags
= nullptr;
58 const char* Manifests
= nullptr;
59 const char* LanguageCompileFlags
= nullptr;
60 const char* Defines
= nullptr;
61 const char* Includes
= nullptr;
62 const char* DependencyFile
= nullptr;
63 const char* DependencyTarget
= nullptr;
64 const char* FilterPrefix
= nullptr;
65 const char* SwiftLibraryName
= nullptr;
66 const char* SwiftModule
= nullptr;
67 const char* SwiftModuleName
= nullptr;
68 const char* SwiftOutputFileMapOption
= nullptr;
69 const char* SwiftSources
= nullptr;
70 const char* ISPCHeader
= nullptr;
71 const char* CudaCompileMode
= nullptr;
72 const char* Fatbinary
= nullptr;
73 const char* RegisterFile
= nullptr;
74 const char* Launcher
= nullptr;
77 // Expand rule variables in CMake of the type found in language rules
78 void ExpandRuleVariables(cmOutputConverter
* outputConverter
,
80 const RuleVariables
& replaceValues
);
83 std::string
ExpandVariable(std::string
const& variable
) override
;
85 std::string TargetImpLib
;
87 std::map
<std::string
, std::string
> Compilers
;
88 std::map
<std::string
, std::string
> VariableMappings
;
89 std::string CompilerSysroot
;
90 std::string LinkerSysroot
;
92 cmOutputConverter
* OutputConverter
= nullptr;
93 RuleVariables
const* ReplaceValues
= nullptr;