Notes |
|
(0027084)
|
Mikhail Titov
|
2011-07-27 15:50
|
|
Here is the workaround. One may add the following line after setting CPACK_OUTPUT_FILE_NAME :
set( CPACK_TEMPORARY_PACKAGE_FILE_NAME ${CMAKE_BINARY_DIR}/_CPack_Packages/win32/NSIS/${CPACK_OUTPUT_FILE_NAME} )
Looks ugly but it works.
For some reason the following doesn't work
set( CPACK_TEMPORARY_PACKAGE_FILE_NAME ${CPACK_TOPLEVEL_DIRECTORY}${CPACK_OUTPUT_FILE_NAME} )
as CPACK_TOPLEVEL_DIRECTORY is not defined at this moment(?) |
|
|
(0027085)
|
Mikhail Titov
|
2011-07-27 15:54
(edited on: 2011-07-27 15:55) |
|
I'm not sure if this will break anything
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 7e5b26d..cd38b3b 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -1055,7 +1055,7 @@ int cmCPackGenerator::DoPackage()
{
std::string tmpPF(this->GetOption("CPACK_OUTPUT_FILE_PREFIX"));
tempPackageFileName = it->c_str();
- tmpPF += "/"+cmSystemTools::GetFilenameName(*it);
+ tmpPF += "/"+this->GetOption("CPACK_OUTPUT_FILE_NAME");
packageFileName = tmpPF.c_str();
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Copy final package(s): "
<< (tempPackageFileName ? tempPackageFileName : "(NULL)" )
|
|
|
(0027087)
|
Eric NOULARD
|
2011-07-27 17:09
|
|
Hi Mikhail,
Try at least to run CPack related tests:
cd <CMAKE_BUILD_TREE>
ctest -R CPack
then you'll see what happen.
Regarding
"as CPACK_TOPLEVEL_DIRECTORY is not defined at this moment(?) "
because this is defined at "CPack-time" i.e. when CPack runs
when not at "CMake-time".
you may [probably]
set( CPACK_TEMPORARY_PACKAGE_FILE_NAME ${CPACK_TOPLEVEL_DIRECTORY}${CPACK_OUTPUT_FILE_NAME} )
from within a CPACK_PROJECT_CONFIG_FILE
http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#Overall_usage_.28common_to_all_generators.29 [^]
but not in your CMakeLists.txt. |
|
|
(0027091)
|
Mikhail Titov
|
2011-07-27 19:59
|
|
While I can't add two char*, the following did compile:
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 7e5b26d..a3fa6da 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -1055,7 +1055,8 @@ int cmCPackGenerator::DoPackage()
{
std::string tmpPF(this->GetOption("CPACK_OUTPUT_FILE_PREFIX"));
tempPackageFileName = it->c_str();
- tmpPF += "/"+cmSystemTools::GetFilenameName(*it);
+ tmpPF += "/";
+ tmpPF += this->GetOption("CPACK_OUTPUT_FILE_NAME");
packageFileName = tmpPF.c_str();
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Copy final package(s): "
<< (tempPackageFileName ? tempPackageFileName : "(NULL)" )
However I got this:
C:\workspace\CMake.build>"\Program Files\CMake 2.8\bin\ctest.exe" -R CPack
Test project C:/workspace/CMake.build
Guessing configuration NoConfig
Start 82: CPackComponents
1/6 Test 0000082: CPackComponents ............................. Passed 40.05 sec
Start 83: CPackComponentsForAll-ZIP-default
2/6 Test #83: CPackComponentsForAll-ZIP-default ........... Passed 16.63 sec
Start 84: CPackComponentsForAll-ZIP-OnePackPerGroup
3/6 Test 0000084: CPackComponentsForAll-ZIP-OnePackPerGroup ...***Failed 23.47 sec
Start 85: CPackComponentsForAll-ZIP-IgnoreGroup
4/6 Test 0000085: CPackComponentsForAll-ZIP-IgnoreGroup .......***Failed 11.92 sec
Start 86: CPackComponentsForAll-ZIP-AllInOne
5/6 Test 0000086: CPackComponentsForAll-ZIP-AllInOne .......... Passed 11.44 sec
Start 87: CPackTestAllGenerators
6/6 Test #87: CPackTestAllGenerators ...................... Passed 21.27 sec
67% tests passed, 2 tests failed out of 6
Total Test time (real) = 125.89 sec
The following tests FAILED:
84 - CPackComponentsForAll-ZIP-OnePackPerGroup (Failed)
85 - CPackComponentsForAll-ZIP-IgnoreGroup (Failed)
Errors while running CTest |
|
|
(0027093)
|
Eric NOULARD
|
2011-07-28 03:36
|
|
Yeah,
meaning the change is not valid,..yet :-(
If you want to take some time to learn the CPack code
I'll help you and I'm pretty sure you'll be able to
produce a valid patch.
Are you willing to try that road? |
|
|
(0027251)
|
Mikhail Titov
|
2011-08-19 19:53
|
|
Well, I realized that I can use existing methods to generate output name that I like more or less. CMake sources is a good reference how to get most of it. I guess this issue can be closed as invalid as CPACK_OUTPUT_FILE_NAME is not mentioned in documentation IIRC anyway. |
|
|
(0030442)
|
David Cole
|
2012-08-11 21:42
|
|
Sending old, never assigned issues to the backlog.
(The age of the bug, plus the fact that it's never been assigned to anyone means that nobody is actively working on it...)
If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^]
It's easy to re-activate a bug here if you can find a CMake developer who has the bandwidth to take it on, and ferry a fix through to our 'next' branch for dashboard testing.
|
|
|
(0041866)
|
Kitware Robot
|
2016-06-10 14:28
|
|
Resolving issue as `moved`.
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
|