[Cmake-commits] CMake branch, next, updated. v3.3.0-rc3-964-gf02de6c
Brad King
brad.king at kitware.com
Thu Jul 9 12:55:19 EDT 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via f02de6ccfe5fd8635350d73783818757230a8f85 (commit)
via 809159c9b7f7cfcb2addeaf968ef2dba740c3606 (commit)
via 9a1ef0dcfd5284801033c4915d58a856fbe29625 (commit)
from eae9367375076820fbb15d4f70360a4976a89218 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f02de6ccfe5fd8635350d73783818757230a8f85
commit f02de6ccfe5fd8635350d73783818757230a8f85
Merge: eae9367 809159c
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jul 9 12:55:18 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jul 9 12:55:18 2015 -0400
Merge topic 'OUTPUT_NAME-genex' into next
809159c9 Add generator expression support to OUTPUT_NAME target property
9a1ef0dc Help: Improve OUTPUT_NAME documentation formatting
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=809159c9b7f7cfcb2addeaf968ef2dba740c3606
commit 809159c9b7f7cfcb2addeaf968ef2dba740c3606
Author: Robert Goulet <robert.goulet at autodesk.com>
AuthorDate: Wed Jul 8 16:53:38 2015 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Jul 9 11:48:10 2015 -0400
Add generator expression support to OUTPUT_NAME target property
diff --git a/Help/prop_tgt/OUTPUT_NAME.rst b/Help/prop_tgt/OUTPUT_NAME.rst
index 24e57cd..f1bdb7c 100644
--- a/Help/prop_tgt/OUTPUT_NAME.rst
+++ b/Help/prop_tgt/OUTPUT_NAME.rst
@@ -7,6 +7,9 @@ This sets the base name for output files created for an executable or
library target. If not set, the logical target name is used by
default.
+Contents of ``OUTPUT_NAME`` and the variants listed below may use
+:manual:`generator expressions <cmake-generator-expressions(7)>`.
+
See also the variants:
* :prop_tgt:`OUTPUT_NAME_<CONFIG>`
diff --git a/Help/release/dev/OUTPUT_NAME-genex.rst b/Help/release/dev/OUTPUT_NAME-genex.rst
new file mode 100644
index 0000000..0a39820
--- /dev/null
+++ b/Help/release/dev/OUTPUT_NAME-genex.rst
@@ -0,0 +1,5 @@
+OUTPUT_NAME-genex
+-----------------
+
+* The :prop_tgt:`OUTPUT_NAME` target property and its variants learned to
+ support :manual:`generator expressions <cmake-generator-expressions(7)>`.
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 3353fbd..2b73e6f 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -4597,15 +4597,25 @@ std::string cmTarget::GetOutputName(const std::string& config,
// OUTPUT_NAME
props.push_back("OUTPUT_NAME");
+ std::string outName;
for(std::vector<std::string>::const_iterator i = props.begin();
i != props.end(); ++i)
{
- if(const char* outName = this->GetProperty(*i))
+ if (const char* outNameProp = this->GetProperty(*i))
{
- return outName;
+ outName = outNameProp;
+ break;
}
}
- return this->GetName();
+
+ if (outName.empty())
+ {
+ outName = this->GetName();
+ }
+
+ cmGeneratorExpression ge;
+ cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(outName);
+ return cge->Evaluate(this->Makefile, config);
}
//----------------------------------------------------------------------------
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index 0df42d9..df3f178 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -73,6 +73,12 @@ install(TARGETS testLibPerConfigDest EXPORT exp
DESTINATION lib/$<$<BOOL:$<CONFIG>>:$<CONFIG>>$<$<NOT:$<BOOL:$<CONFIG>>>:NoConfig>
)
+# Test OUTPUT_NAME properties with generator expressions
+add_library(testLib7 STATIC testLib7.c)
+set_property(TARGET testLib7 PROPERTY OUTPUT_NAME_DEBUG testLib7D-$<CONFIG>)
+set_property(TARGET testLib7 PROPERTY OUTPUT_NAME_RELEASE testLib7R-$<CONFIG>)
+set_property(TARGET testLib7 PROPERTY OUTPUT_NAME testLib7-$<CONFIG>)
+
# Work-around: Visual Studio 6 does not support per-target object files.
set(VS6)
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6")
@@ -446,7 +452,7 @@ install(
TARGETS
testExe1 testLib1 testLib2 testExe2 testLib3 testLib4 testExe3
testExe2lib testLib4lib testLib4libdbg testLib4libopt
- testLib6
+ testLib6 testLib7
testLibCycleA testLibCycleB
cmp0022NEW cmp0022OLD
systemlib
@@ -505,7 +511,7 @@ export(TARGETS testExe1 testLib1 testLib2 testLib3
NAMESPACE bld_
FILE ExportBuildTree.cmake
)
-export(TARGETS testExe2 testLib4 testLib5 testLib6 testExe3 testExe2lib
+export(TARGETS testExe2 testLib4 testLib5 testLib6 testLib7 testExe3 testExe2lib
testLib4lib testLib4libdbg testLib4libopt
testLibCycleA testLibCycleB
testLibPerConfigDest
diff --git a/Tests/ExportImport/Export/testLib7.c b/Tests/ExportImport/Export/testLib7.c
new file mode 100644
index 0000000..7acae9e
--- /dev/null
+++ b/Tests/ExportImport/Export/testLib7.c
@@ -0,0 +1 @@
+int testLib7(void) { return 0; }
diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt
index 17d983a..a74bad1 100644
--- a/Tests/ExportImport/Import/A/CMakeLists.txt
+++ b/Tests/ExportImport/Import/A/CMakeLists.txt
@@ -33,6 +33,7 @@ target_link_libraries(imp_testExe1
exp_testLib4
exp_testLib5
exp_testLib6
+ exp_testLib7
exp_testLibCycleA
exp_testLibPerConfigDest
)
@@ -66,6 +67,7 @@ target_link_libraries(imp_testExe1b
bld_testLib4
bld_testLib5
bld_testLib6
+ bld_testLib7
bld_testLibCycleA
bld_testLibPerConfigDest
)
diff --git a/Tests/ExportImport/Import/A/imp_testExe1.c b/Tests/ExportImport/Import/A/imp_testExe1.c
index 150fcef..56cdd2c 100644
--- a/Tests/ExportImport/Import/A/imp_testExe1.c
+++ b/Tests/ExportImport/Import/A/imp_testExe1.c
@@ -6,6 +6,7 @@ extern int testLib4();
extern int testLib4lib();
extern int testLib5();
extern int testLib6();
+extern int testLib7();
extern int testLibCycleA1();
extern int testLibPerConfigDest();
@@ -21,7 +22,7 @@ extern testLib4libcfg(void);
int main()
{
return (testLib2() + generated_by_testExe1() + testLib3() + testLib4()
- + testLib5() + testLib6() + testLibCycleA1()
+ + testLib5() + testLib6() + testLib7() + testLibCycleA1()
+ testLibPerConfigDest()
+ generated_by_testExe3() + testLib4lib() + testLib4libcfg());
}
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a1ef0dcfd5284801033c4915d58a856fbe29625
commit 9a1ef0dcfd5284801033c4915d58a856fbe29625
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jul 9 11:25:30 2015 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Jul 9 11:28:52 2015 -0400
Help: Improve OUTPUT_NAME documentation formatting
Also link to its variants.
diff --git a/Help/prop_tgt/CONFIG_OUTPUT_NAME.rst b/Help/prop_tgt/CONFIG_OUTPUT_NAME.rst
index f2c875e..a61c702 100644
--- a/Help/prop_tgt/CONFIG_OUTPUT_NAME.rst
+++ b/Help/prop_tgt/CONFIG_OUTPUT_NAME.rst
@@ -2,6 +2,7 @@
--------------------
Old per-configuration target file base name.
+Use :prop_tgt:`OUTPUT_NAME_<CONFIG>` instead.
-This is a configuration-specific version of OUTPUT_NAME. Use
-OUTPUT_NAME_<CONFIG> instead.
+This is a configuration-specific version of the :prop_tgt:`OUTPUT_NAME`
+target property.
diff --git a/Help/prop_tgt/OUTPUT_NAME.rst b/Help/prop_tgt/OUTPUT_NAME.rst
index 97bf010..24e57cd 100644
--- a/Help/prop_tgt/OUTPUT_NAME.rst
+++ b/Help/prop_tgt/OUTPUT_NAME.rst
@@ -6,3 +6,13 @@ Output name for target files.
This sets the base name for output files created for an executable or
library target. If not set, the logical target name is used by
default.
+
+See also the variants:
+
+* :prop_tgt:`OUTPUT_NAME_<CONFIG>`
+* :prop_tgt:`ARCHIVE_OUTPUT_NAME_<CONFIG>`
+* :prop_tgt:`ARCHIVE_OUTPUT_NAME`
+* :prop_tgt:`LIBRARY_OUTPUT_NAME_<CONFIG>`
+* :prop_tgt:`LIBRARY_OUTPUT_NAME`
+* :prop_tgt:`RUNTIME_OUTPUT_NAME_<CONFIG>`
+* :prop_tgt:`RUNTIME_OUTPUT_NAME`
diff --git a/Help/prop_tgt/OUTPUT_NAME_CONFIG.rst b/Help/prop_tgt/OUTPUT_NAME_CONFIG.rst
index 7bfbcbc..41b782f 100644
--- a/Help/prop_tgt/OUTPUT_NAME_CONFIG.rst
+++ b/Help/prop_tgt/OUTPUT_NAME_CONFIG.rst
@@ -3,4 +3,5 @@ OUTPUT_NAME_<CONFIG>
Per-configuration target file base name.
-This is the configuration-specific version of OUTPUT_NAME.
+This is the configuration-specific version of the :prop_tgt:`OUTPUT_NAME`
+target property.
-----------------------------------------------------------------------
Summary of changes:
Help/prop_tgt/CONFIG_OUTPUT_NAME.rst | 5 +++--
Help/prop_tgt/OUTPUT_NAME.rst | 13 +++++++++++++
Help/prop_tgt/OUTPUT_NAME_CONFIG.rst | 3 ++-
Help/release/dev/OUTPUT_NAME-genex.rst | 5 +++++
Source/cmTarget.cxx | 16 +++++++++++++---
Tests/ExportImport/Export/CMakeLists.txt | 10 ++++++++--
Tests/ExportImport/Export/testLib7.c | 1 +
Tests/ExportImport/Import/A/CMakeLists.txt | 2 ++
Tests/ExportImport/Import/A/imp_testExe1.c | 3 ++-
9 files changed, 49 insertions(+), 9 deletions(-)
create mode 100644 Help/release/dev/OUTPUT_NAME-genex.rst
create mode 100644 Tests/ExportImport/Export/testLib7.c
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list