Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
fbf40e20
Commit
fbf40e20
authored
Jun 16, 2005
by
Ken Martin
Browse files
ENH: add first cut at support for exe with same name as lib
parent
0fa75654
Changes
4
Hide whitespace changes
Inline
Side-by-side
Source/cmLocalUnixMakefileGenerator3.cxx
View file @
fbf40e20
...
...
@@ -1314,7 +1314,16 @@ cmLocalUnixMakefileGenerator3
targetFullPath
+=
".app/Contents/MacOS/"
;
}
#endif
targetFullPath
+=
target
.
GetName
();
// do we have a different executable name?
if
(
target
.
GetProperty
(
"OUTPUT_NAME"
))
{
targetFullPath
+=
target
.
GetProperty
(
"OUTPUT_NAME"
);
}
else
{
targetFullPath
+=
target
.
GetName
();
}
targetFullPath
+=
cmSystemTools
::
GetExecutableExtension
();
// Convert to the output path to use in constructing commands.
...
...
Source/cmLocalVisualStudio6Generator.cxx
View file @
fbf40e20
...
...
@@ -739,9 +739,11 @@ inline std::string removeQuotes(const std::string& s)
}
void
cmLocalVisualStudio6Generator
::
WriteDSPHeader
(
std
::
ostream
&
fout
,
const
char
*
libName
,
const
cmTarget
&
target
,
std
::
vector
<
cmSourceGroup
>
&
)
void
cmLocalVisualStudio6Generator
::
WriteDSPHeader
(
std
::
ostream
&
fout
,
const
char
*
libName
,
const
cmTarget
&
target
,
std
::
vector
<
cmSourceGroup
>
&
)
{
std
::
set
<
std
::
string
>
pathEmitted
;
...
...
@@ -948,7 +950,16 @@ void cmLocalVisualStudio6Generator::WriteDSPHeader(std::ostream& fout, const cha
std
::
string
extraLinkOptions
;
if
(
target
.
GetType
()
==
cmTarget
::
EXECUTABLE
)
{
extraLinkOptions
=
m_Makefile
->
GetRequiredDefinition
(
"CMAKE_EXE_LINKER_FLAGS"
);
extraLinkOptions
=
m_Makefile
->
GetRequiredDefinition
(
"CMAKE_EXE_LINKER_FLAGS"
);
// if the executable has an output name then add the appropriate flag
if
(
target
.
GetProperty
(
"OUTPUT_NAME"
))
{
libMultiLineOptions
+=
"# ADD LINK32 /out:"
;
libMultiLineOptions
+=
target
.
GetProperty
(
"OUTPUT_NAME"
);
libMultiLineOptions
+=
"
\n
"
;
}
}
if
(
target
.
GetType
()
==
cmTarget
::
SHARED_LIBRARY
)
{
...
...
Source/cmLocalVisualStudio7Generator.cxx
View file @
fbf40e20
...
...
@@ -726,7 +726,16 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
temp
=
m_ExecutableOutputPath
;
temp
+=
configName
;
temp
+=
"/"
;
temp
+=
libName
;
// do we have a different executable name?
if
(
target
.
GetProperty
(
"OUTPUT_NAME"
))
{
temp
+=
target
.
GetProperty
(
"OUTPUT_NAME"
);
}
else
{
temp
+=
libName
;
}
temp
+=
".exe"
;
fout
<<
"
\t\t\t\t
OutputFile=
\"
"
<<
this
->
ConvertToXMLOutputPathSingle
(
temp
.
c_str
())
<<
"
\"\n
"
;
for
(
std
::
map
<
cmStdString
,
cmStdString
>::
iterator
i
=
flagMap
.
begin
();
...
...
Source/cmSetTargetPropertiesCommand.h
View file @
fbf40e20
...
...
@@ -65,6 +65,8 @@ public:
"sources. PRE_INSTALL_SCRIPT specifies CMake script that is run "
"prior to installing the target. POST_INSTALL_SCRIPT specifies "
"CMake script that is run after target is installed. "
"The OUTPUT_NAME can be used to set an output name that is "
"used in place of the target name when creating executables."
"If not set here then it is set to target_EXPORTS by default "
"(with some substitutions if target is not a valid C identifier). "
"You can use and prop value pair you want and extract it later with "
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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