Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dennis Klein
CMake
Commits
ac463841
Commit
ac463841
authored
Aug 27, 2016
by
Stephen Kelly
Browse files
Convert: Replace uses of Convert(NONE)
These are equivalent to ConvertToOutputFormat.
parent
998d9ee9
Changes
9
Hide whitespace changes
Inline
Side-by-side
Source/cmLocalCommonGenerator.cxx
View file @
ac463841
...
...
@@ -74,8 +74,7 @@ std::string cmLocalCommonGenerator::GetTargetFortranFlags(
for
(
std
::
vector
<
std
::
string
>::
const_iterator
idi
=
includes
.
begin
();
idi
!=
includes
.
end
();
++
idi
)
{
std
::
string
flg
=
modpath_flag
;
flg
+=
this
->
Convert
(
*
idi
,
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
flg
+=
this
->
ConvertToOutputFormat
(
*
idi
,
cmOutputConverter
::
SHELL
);
this
->
AppendFlags
(
flags
,
flg
);
}
}
...
...
Source/cmLocalGenerator.cxx
View file @
ac463841
...
...
@@ -1393,7 +1393,7 @@ std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib,
sp
+=
lib
.
substr
(
pos
);
// Convert to an output path.
return
this
->
Convert
(
sp
.
c_str
(),
NONE
,
format
);
return
this
->
Convert
ToOutputFormat
(
sp
.
c_str
(),
format
);
}
}
}
...
...
@@ -1489,7 +1489,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries,
for
(
std
::
vector
<
std
::
string
>::
const_iterator
fdi
=
fwDirs
.
begin
();
fdi
!=
fwDirs
.
end
();
++
fdi
)
{
frameworkPath
+=
fwSearchFlag
;
frameworkPath
+=
this
->
Convert
(
*
fdi
,
NONE
,
shellFormat
);
frameworkPath
+=
this
->
Convert
ToOutputFormat
(
*
fdi
,
shellFormat
);
frameworkPath
+=
" "
;
}
}
...
...
@@ -1535,7 +1535,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries,
for
(
std
::
vector
<
std
::
string
>::
iterator
ri
=
runtimeDirs
.
begin
();
ri
!=
runtimeDirs
.
end
();
++
ri
)
{
rpath
+=
cli
.
GetRuntimeFlag
();
rpath
+=
this
->
Convert
(
*
ri
,
NONE
,
shellFormat
);
rpath
+=
this
->
Convert
ToOutputFormat
(
*
ri
,
shellFormat
);
rpath
+=
" "
;
}
fout
<<
rpath
;
...
...
@@ -1605,7 +1605,7 @@ void cmLocalGenerator::AddArchitectureFlags(std::string& flags,
flags
+=
" "
;
flags
+=
sysrootFlag
;
flags
+=
" "
;
flags
+=
this
->
Convert
(
sysroot
,
NONE
,
SHELL
);
flags
+=
this
->
Convert
ToOutputFormat
(
sysroot
,
SHELL
);
}
if
(
deploymentTargetFlag
&&
*
deploymentTargetFlag
&&
deploymentTarget
&&
...
...
Source/cmLocalNinjaGenerator.cxx
View file @
ac463841
...
...
@@ -490,8 +490,8 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher(
output
=
this
->
Convert
(
outputs
[
0
],
cmOutputConverter
::
START_OUTPUT
,
cmOutputConverter
::
SHELL
);
}
else
{
output
=
this
->
Convert
(
outputs
[
0
],
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
output
=
this
->
ConvertToOutputFormat
(
outputs
[
0
],
cmOutputConverter
::
SHELL
);
}
}
vars
.
Output
=
output
.
c_str
();
...
...
Source/cmLocalUnixMakefileGenerator3.cxx
View file @
ac463841
...
...
@@ -602,8 +602,7 @@ std::string cmLocalUnixMakefileGenerator3::MaybeConvertWatcomShellCommand(
// lines with shell redirection operators.
std
::
string
scmd
;
if
(
cmSystemTools
::
GetShortPath
(
cmd
,
scmd
))
{
return
this
->
Convert
(
scmd
,
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
return
this
->
ConvertToOutputFormat
(
scmd
,
cmOutputConverter
::
SHELL
);
}
}
return
std
::
string
();
...
...
@@ -790,8 +789,8 @@ void cmLocalUnixMakefileGenerator3::WriteSpecialTargetsBottom(
std
::
string
runRule
=
"$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)"
;
runRule
+=
" --check-build-system "
;
runRule
+=
this
->
Convert
(
cmakefileName
,
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
runRule
+=
this
->
ConvertToOutputFormat
(
cmakefileName
,
cmOutputConverter
::
SHELL
);
runRule
+=
" 0"
;
std
::
vector
<
std
::
string
>
no_depends
;
...
...
@@ -995,8 +994,8 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
cmOutputConverter
::
SHELL
);
}
else
{
output
=
this
->
Convert
(
o
utput
s
[
0
],
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
output
=
this
->
Convert
ToO
utput
Format
(
outputs
[
0
]
,
cmOutputConverter
::
SHELL
);
}
}
vars
.
Output
=
output
.
c_str
();
...
...
@@ -1009,8 +1008,8 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
std
::
string
shellCommand
=
this
->
MaybeConvertWatcomShellCommand
(
cmd
);
if
(
shellCommand
.
empty
())
{
shellCommand
=
this
->
Convert
(
cmd
,
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
shellCommand
=
this
->
ConvertToOutputFormat
(
cmd
,
cmOutputConverter
::
SHELL
);
}
cmd
=
launcher
+
shellCommand
;
...
...
@@ -1681,8 +1680,8 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
std
::
string
runRule
=
"$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)"
;
runRule
+=
" --check-build-system "
;
runRule
+=
this
->
Convert
(
cmakefileName
,
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
runRule
+=
this
->
ConvertToOutputFormat
(
cmakefileName
,
cmOutputConverter
::
SHELL
);
runRule
+=
" 1"
;
commands
.
push_back
(
runRule
);
this
->
CreateCDCommand
(
commands
,
this
->
GetBinaryDirectory
(),
...
...
@@ -1895,8 +1894,7 @@ std::string cmLocalUnixMakefileGenerator3::GetRecursiveMakeCall(
// Call make on the given file.
std
::
string
cmd
;
cmd
+=
"$(MAKE) -f "
;
cmd
+=
this
->
Convert
(
makefile
,
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
cmd
+=
this
->
ConvertToOutputFormat
(
makefile
,
cmOutputConverter
::
SHELL
);
cmd
+=
" "
;
cmGlobalUnixMakefileGenerator3
*
gg
=
...
...
Source/cmLocalVisualStudioGenerator.cxx
View file @
ac463841
...
...
@@ -205,7 +205,7 @@ std::string cmLocalVisualStudioGenerator::ConstructScript(
if
(
workingDirectory
.
empty
())
{
script
+=
this
->
Convert
(
cmd
.
c_str
(),
START_OUTPUT
,
SHELL
);
}
else
{
script
+=
this
->
Convert
(
cmd
.
c_str
(),
NONE
,
SHELL
);
script
+=
this
->
Convert
ToOutputFormat
(
cmd
.
c_str
(),
SHELL
);
}
ccg
.
AppendArguments
(
c
,
script
);
...
...
Source/cmMakefileExecutableTargetGenerator.cxx
View file @
ac463841
...
...
@@ -135,8 +135,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
std
::
string
targetFullPathReal
=
outpath
+
targetNameReal
;
std
::
string
targetFullPathPDB
=
pdbOutputPath
+
targetNamePDB
;
std
::
string
targetFullPathImport
=
outpathImp
+
targetNameImport
;
std
::
string
targetOutPathPDB
=
this
->
Conver
t
(
targetFullPathPDB
,
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
std
::
string
targetOutPathPDB
=
this
->
LocalGenerator
->
ConvertToOutputForma
t
(
targetFullPathPDB
,
cmOutputConverter
::
SHELL
);
// Convert to the output path to use in constructing commands.
std
::
string
targetOutPath
=
this
->
Convert
(
targetFullPath
,
cmOutputConverter
::
START_OUTPUT
,
cmOutputConverter
::
SHELL
);
...
...
@@ -357,9 +357,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
vars
.
Manifests
=
manifests
.
c_str
();
if
(
this
->
GeneratorTarget
->
GetProperty
(
"LINK_WHAT_YOU_USE"
))
{
std
::
string
cmakeCommand
=
this
->
Convert
(
cmSystemTools
::
GetCMakeCommand
(),
cmLocalGenerator
::
NONE
,
cmLocalGenerator
::
SHELL
);
std
::
string
cmakeCommand
=
this
->
LocalGenerator
->
ConvertToOutputFormat
(
cmSystemTools
::
GetCMakeCommand
(),
cmLocalGenerator
::
SHELL
);
cmakeCommand
+=
" -E __run_iwyu --lwyu="
;
cmakeCommand
+=
targetOutPathReal
;
real_link_commands
.
push_back
(
cmakeCommand
);
...
...
Source/cmMakefileLibraryTargetGenerator.cxx
View file @
ac463841
...
...
@@ -310,8 +310,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
// Construct the output path version of the names for use in command
// arguments.
std
::
string
targetOutPathPDB
=
this
->
Conver
t
(
targetFullPathPDB
,
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
std
::
string
targetOutPathPDB
=
this
->
LocalGenerator
->
ConvertToOutputForma
t
(
targetFullPathPDB
,
cmOutputConverter
::
SHELL
);
std
::
string
targetOutPath
=
this
->
Convert
(
targetFullPath
,
cmOutputConverter
::
START_OUTPUT
,
cmOutputConverter
::
SHELL
);
std
::
string
targetOutPathSO
=
...
...
@@ -572,8 +572,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
vars
.
TargetInstallNameDir
=
""
;
}
else
{
// Convert to a path for the native build tool.
install_name_dir
=
this
->
LocalGenerator
->
Convert
(
install_name_dir
,
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
install_name_dir
=
this
->
LocalGenerator
->
Convert
ToOutputFormat
(
install_name_dir
,
cmOutputConverter
::
SHELL
);
vars
.
TargetInstallNameDir
=
install_name_dir
.
c_str
();
}
}
...
...
@@ -640,9 +640,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
cmSystemTools
::
ExpandListArgument
(
linkRule
,
real_link_commands
);
if
(
this
->
GeneratorTarget
->
GetProperty
(
"LINK_WHAT_YOU_USE"
)
&&
(
this
->
GeneratorTarget
->
GetType
()
==
cmState
::
SHARED_LIBRARY
))
{
std
::
string
cmakeCommand
=
this
->
Convert
(
cmSystemTools
::
GetCMakeCommand
(),
cmLocalGenerator
::
NONE
,
cmLocalGenerator
::
SHELL
);
std
::
string
cmakeCommand
=
this
->
LocalGenerator
->
ConvertToOutputFormat
(
cmSystemTools
::
GetCMakeCommand
(),
cmLocalGenerator
::
SHELL
);
cmakeCommand
+=
" -E __run_iwyu --lwyu="
;
cmakeCommand
+=
targetOutPathReal
;
real_link_commands
.
push_back
(
cmakeCommand
);
...
...
Source/cmMakefileTargetGenerator.cxx
View file @
ac463841
...
...
@@ -324,11 +324,11 @@ void cmMakefileTargetGenerator::MacOSXContentGeneratorType::operator()(
this
->
Generator
->
LocalGenerator
->
AppendEcho
(
commands
,
copyEcho
,
cmLocalUnixMakefileGenerator3
::
EchoBuild
);
std
::
string
copyCommand
=
"$(CMAKE_COMMAND) -E copy "
;
copyCommand
+=
this
->
Generator
->
Convert
(
input
,
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
copyCommand
+=
this
->
Generator
->
LocalGenerator
->
ConvertToOutputFormat
(
input
,
cmOutputConverter
::
SHELL
);
copyCommand
+=
" "
;
copyCommand
+=
this
->
Generator
->
Convert
(
output
,
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
copyCommand
+=
this
->
Generator
->
LocalGenerator
->
ConvertToOutputFormat
(
output
,
cmOutputConverter
::
SHELL
);
commands
.
push_back
(
copyCommand
);
this
->
Generator
->
LocalGenerator
->
WriteMakeRule
(
*
this
->
Generator
->
BuildFileStream
,
CM_NULLPTR
,
output
,
depends
,
commands
,
...
...
@@ -464,8 +464,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
}
// Get the output paths for source and object files.
std
::
string
sourceFile
=
this
->
Conver
t
(
source
.
GetFullPath
(),
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
std
::
string
sourceFile
=
this
->
LocalGenerator
->
ConvertToOutputForma
t
(
source
.
GetFullPath
(),
cmOutputConverter
::
SHELL
);
// Construct the build message.
std
::
vector
<
std
::
string
>
no_commands
;
...
...
@@ -516,8 +516,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
targetOutPathReal
=
this
->
Convert
(
targetFullPathReal
,
cmOutputConverter
::
START_OUTPUT
,
cmOutputConverter
::
SHELL
);
targetOutPathPDB
=
this
->
Conver
t
(
targetFullPathPDB
,
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
targetOutPathPDB
=
this
->
LocalGenerator
->
ConvertToOutputForma
t
(
targetFullPathPDB
,
cmOutputConverter
::
SHELL
);
targetOutPathCompilePDB
=
this
->
Convert
(
targetFullPathCompilePDB
,
cmOutputConverter
::
START_OUTPUT
,
cmOutputConverter
::
SHELL
);
...
...
@@ -539,7 +539,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
vars
.
TargetCompilePDB
=
targetOutPathCompilePDB
.
c_str
();
vars
.
Source
=
sourceFile
.
c_str
();
std
::
string
shellObj
=
this
->
Convert
(
obj
,
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
this
->
LocalGenerator
->
ConvertToOutputFormat
(
obj
,
cmOutputConverter
::
SHELL
);
vars
.
Object
=
shellObj
.
c_str
();
std
::
string
objectDir
=
this
->
GeneratorTarget
->
GetSupportDirectory
();
objectDir
=
this
->
Convert
(
objectDir
,
cmOutputConverter
::
START_OUTPUT
,
...
...
@@ -699,8 +699,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
std
::
vector
<
std
::
string
>
preprocessCommands
;
cmSystemTools
::
ExpandListArgument
(
preprocessRule
,
preprocessCommands
);
std
::
string
shellObjI
=
this
->
Convert
(
objI
,
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
std
::
string
shellObjI
=
this
->
LocalGenerator
->
ConvertToOutputFormat
(
objI
,
cmOutputConverter
::
SHELL
);
vars
.
PreprocessedSource
=
shellObjI
.
c_str
();
// Expand placeholders in the commands.
...
...
@@ -746,8 +746,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
std
::
vector
<
std
::
string
>
assemblyCommands
;
cmSystemTools
::
ExpandListArgument
(
assemblyRule
,
assemblyCommands
);
std
::
string
shellObjS
=
this
->
Convert
(
objS
,
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
std
::
string
shellObjS
=
this
->
LocalGenerator
->
ConvertToOutputFormat
(
objS
,
cmOutputConverter
::
SHELL
);
vars
.
AssemblySource
=
shellObjS
.
c_str
();
// Expand placeholders in the commands.
...
...
@@ -1576,8 +1576,8 @@ void cmMakefileTargetGenerator::CreateLinkLibs(
// Reference the response file.
linkLibs
=
responseFlag
;
linkLibs
+=
this
->
Convert
(
link_rsp
,
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
linkLibs
+=
this
->
LocalGenerator
->
ConvertToOutputFormat
(
link_rsp
,
cmOutputConverter
::
SHELL
);
}
}
...
...
@@ -1625,8 +1625,8 @@ void cmMakefileTargetGenerator::CreateObjectLists(
// Reference the response file.
buildObjs
+=
responseFlag
;
buildObjs
+=
this
->
Convert
(
objects_rsp
,
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
buildObjs
+=
this
->
LocalGenerator
->
ConvertToOutputFormat
(
objects_rsp
,
cmOutputConverter
::
SHELL
);
}
}
else
if
(
useLinkScript
)
{
if
(
!
useArchiveRules
)
{
...
...
@@ -1683,8 +1683,8 @@ void cmMakefileTargetGenerator::GenDefFile(
name_of_def_file
+=
std
::
string
(
"/"
)
+
this
->
GeneratorTarget
->
GetName
();
name_of_def_file
+=
".def"
;
std
::
string
cmd
=
cmSystemTools
::
GetCMakeCommand
();
cmd
=
this
->
Convert
(
cmd
,
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
cmd
=
this
->
LocalGenerator
->
ConvertToOutputFormat
(
cmd
,
cmOutputConverter
::
SHELL
);
cmd
+=
" -E __create_def "
;
cmd
+=
this
->
Convert
(
name_of_def_file
,
cmOutputConverter
::
START_OUTPUT
,
cmOutputConverter
::
SHELL
);
...
...
Source/cmNinjaNormalTargetGenerator.cxx
View file @
ac463841
...
...
@@ -543,8 +543,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
std
::
string
install_dir
=
this
->
GetGeneratorTarget
()
->
GetInstallNameDirForBuildTree
(
cfgName
);
if
(
!
install_dir
.
empty
())
{
vars
[
"INSTALLNAME_DIR"
]
=
localGen
.
Convert
(
install_dir
,
cmOutputConverter
::
NONE
,
cmOutputConverter
::
SHELL
);
vars
[
"INSTALLNAME_DIR"
]
=
localGen
.
Convert
ToOutputFormat
(
install_dir
,
cmOutputConverter
::
SHELL
);
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment