[CMake] Top level directory with component install
I am using CPACK_ARCHIVE_COMPONENT_INSTALL to create separate tar files for each component, but when I enable it I no longer have a top level directory in the tar. For example, if archive component install is off then the tar files contains files with paths like foobar-1.2.3-Linux-x86_64/bin/foobar, but with component install on the paths are just bin/foobar. I tried turning CPACK_INCLUDE_TOPLEVEL_DIRECTORY on but it doesn't seem to help. Is this behavior on purpose and if so is it possible to change? -- Daniel ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Top level directory with component install
On Wed, Apr 27, 2011 at 08:49:56PM +0200, Eric Noulard wrote: 2011/4/27 Daniel Nelson tor...@connect2.com: I am using CPACK_ARCHIVE_COMPONENT_INSTALL to create separate tar files for each component, but when I enable it I no longer have a top level directory in the tar. For example, if archive component install is off then the tar files contains files with paths like foobar-1.2.3-Linux-x86_64/bin/foobar, but with component install on the paths are just bin/foobar. I tried turning CPACK_INCLUDE_TOPLEVEL_DIRECTORY on but it doesn't seem to help. Is this behavior on purpose and if so is it possible to change? This was not intentional, this is not really a bug because the component splitting wasn't available before but you can file a bug and we'll discuss what to do. Which version of CMake are you using? I'm using 2.8.4 from debian. Added an issue: http://public.kitware.com/Bug/view.php?id=12129 If it will help I could probably prepare a patch this weekend. -- Daniel ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] can I create all/fast target?
On Monday 16 August 2010 7:47:33 am naryniecki wrote: Hi, I only want add that when I run make t1/fast t2/fast from command line it works fine. Dnia 16 sierpnia 2010 15:33 naryniecki narynie...@o2.pl napisał(a): Hi, for each target in Makefile generated by cmake there is another target without scanning dependencies. for example for target Radio there is Radio/fast. dependencies scanning take half of time in our building process. And we need to be able to rebuild everything as fast as possible. but there is no all/fast target. We have to much targets to put them all in command line with /fast added. I tried to create custom target which depends on all other /fast targets. like: add_custom_target(ALL_FAST DEPENDS t1/fast t2/fast) but when I try to build ALL_FAST I get that there is no target t1/fast although make t1/fast works fine. How can I do it? br, Marek I'm not sure if you can make a fast version of the all target, but one of the things I have done on my project that has helped a lot is removing system from the dependency scanning. You can do this with the INCLUDE_REGULAR_EXPRESSION command, however it can be a little hard to use since you need a regular expression that matches everything you want to include. It also doesn't include the surrounding or as part of the expression which would make it easier to remove the system includes. I ended up patching my build of cmake so that I could set a variable that removed all the includes that used from the dependency scanning. This decreased my build times substantially. I'll attach the patch which I believe is against version 2.8.1, if you use it just do this to turn it on: set(CMAKE_EXCLUDE_SYSTEM_INCLUDES ON) -- Daniel Index: cmake/cmake/Source/cmDependsC.cxx === --- cmake.orig/cmake/Source/cmDependsC.cxx 2009-11-25 02:41:40.0 -0700 +++ cmake/cmake/Source/cmDependsC.cxx 2009-11-26 20:00:19.578125000 -0700 @@ -64,6 +64,11 @@ { complainRegex = cr; } + std::string excludeSystemVar = CMAKE_; + excludeSystemVar += lang; + excludeSystemVar += _EXCLUDE_SYSTEM_INCLUDES; + this-ExcludeSystemIncludes = +cmSystemTools::IsOn(mf-GetDefinition(excludeSystemVar.c_str())); } this-IncludeRegexLine.compile(INCLUDE_REGEX_LINE); @@ -445,6 +450,12 @@ // Match include directives. if(this-IncludeRegexLine.find(line.c_str())) { + if (this-IncludeRegexLine.match(3) == + this-ExcludeSystemIncludes) +{ +continue; +} + // Get the file being included. UnscannedEntry entry; entry.FileName = this-IncludeRegexLine.match(2); Index: cmake/cmake/Source/cmDependsC.h === --- cmake.orig/cmake/Source/cmDependsC.h 2009-11-13 11:32:54.0 -0700 +++ cmake/cmake/Source/cmDependsC.h 2009-11-25 02:57:51.640625000 -0700 @@ -54,6 +54,7 @@ std::string IncludeRegexLineString; std::string IncludeRegexScanString; std::string IncludeRegexComplainString; + bool ExcludeSystemIncludes; // Regex to transform #include lines. std::string IncludeRegexTransformString; Index: cmake/cmake/Source/cmLocalUnixMakefileGenerator3.cxx === --- cmake.orig/cmake/Source/cmLocalUnixMakefileGenerator3.cxx 2009-11-26 19:16:06.0 -0700 +++ cmake/cmake/Source/cmLocalUnixMakefileGenerator3.cxx 2009-11-26 19:49:58.109375000 -0700 @@ -489,11 +489,24 @@ this-Makefile-GetComplainRegularExpression()); infoFileStream )\n; + if (this-Makefile-IsOn(CMAKE_EXCLUDE_SYSTEM_INCLUDES)) +{ +infoFileStream + SET(CMAKE_C_EXCLUDE_SYSTEM_INCLUDES 1)\n; +} + infoFileStream SET(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})\n; infoFileStream SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})\n; + + if (this-Makefile-IsOn(CMAKE_EXCLUDE_SYSTEM_INCLUDES)) +{ +infoFileStream + SET(CMAKE_CXX_EXCLUDE_SYSTEM_INCLUDES + ${CMAKE_C_EXCLUDE_SYSTEM_INCLUDES})\n; +} } // ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] using install() with EXCLUDE_FROM_ALL
On Thursday 08 April 2010 8:40:54 am David Cole wrote: On Thu, Apr 8, 2010 at 10:28 AM, Daniel Nelson tor...@connect2.com wrote: On Wednesday 07 April 2010 10:37:54 pm Michael Wild wrote: On 8. Apr, 2010, at 3:39 , Ryan Pavlik wrote: You might consider just setting the EXCLUDE_FROM_ALL property on specific targets, instead of an entire subdirectory. Ryan On Wed, Apr 7, 2010 at 8:33 PM, Daniel Nelson tor...@connect2.com wrote: If I use add_subdirectory with the EXCLUDE_FROM_ALL option, then any files whose install commands are in that directory are not installed as part of 'make install'. Is this on purpose, and if so is there a way I can install these files? -- Daniel Also there is the OPTIONAL argument to the INSTALL command which might be of help here. Michael This is probably a pretty good workaround, but it's not ideal because I have several projects that add this directory, and I only want it to be excluded for some of them. So I'll end up needing to use a variable in the parent directory to control the EXCLUDE_FROM_ALL property. Then I need to use the OPTIONAL argument to prevent errors if I haven't built the directory, which means I won't be notified if a file is missing. What I'd really like to be able to do, is add new targets, and then manually set them to depend on whichever install commands I want. Then I could just run: make install/my_exclude_from_all_project. But it seems that the install commands are outside of the target system. Why not use the COMPONENT feature of the various install command signatures to separate your installables into components...? Then you can run: cd binary_dir cmake -D COMPONENT=MyComponent -P cmake_install.cmake and that will run just the install rules associated with the COMPONENT MyComponent... You could even add a custom target named install_my_component to do this via make install_my_component if you like... HTH, David This is a good tip and is something I have wanted to do on a different project but didn't know how, but it seems that it doesn't work if you use EXCLUDE_FROM_ALL. The install_manifest file for the component is empty if it was created in the subdirectory. So while you can use EXCLUDE_FROM_ALL to add a directory that you can build on demand, it seems that installing the items in the folder on demand is not possible. However, I think I can use a combination of these techniques: EXCLUDE_FROM_ALL only on the targets instead of the directories, and executing the cmake_install.cmake script by hand to get most of what I need. -- Daniel ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] using install() with EXCLUDE_FROM_ALL
On Wednesday 07 April 2010 10:37:54 pm Michael Wild wrote: On 8. Apr, 2010, at 3:39 , Ryan Pavlik wrote: You might consider just setting the EXCLUDE_FROM_ALL property on specific targets, instead of an entire subdirectory. Ryan On Wed, Apr 7, 2010 at 8:33 PM, Daniel Nelson tor...@connect2.com wrote: If I use add_subdirectory with the EXCLUDE_FROM_ALL option, then any files whose install commands are in that directory are not installed as part of 'make install'. Is this on purpose, and if so is there a way I can install these files? -- Daniel Also there is the OPTIONAL argument to the INSTALL command which might be of help here. Michael This is probably a pretty good workaround, but it's not ideal because I have several projects that add this directory, and I only want it to be excluded for some of them. So I'll end up needing to use a variable in the parent directory to control the EXCLUDE_FROM_ALL property. Then I need to use the OPTIONAL argument to prevent errors if I haven't built the directory, which means I won't be notified if a file is missing. What I'd really like to be able to do, is add new targets, and then manually set them to depend on whichever install commands I want. Then I could just run: make install/my_exclude_from_all_project. But it seems that the install commands are outside of the target system. -- Daniel ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] using install() with EXCLUDE_FROM_ALL
If I use add_subdirectory with the EXCLUDE_FROM_ALL option, then any files whose install commands are in that directory are not installed as part of 'make install'. Is this on purpose, and if so is there a way I can install these files? -- Daniel ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Removing default COMPILE_FLAGS
I believe CMAKE_CXX_FLAGS is consulted each time an add_library() or add_executable() call is processed. So you should be able to remove the flag, add the singleton library/executable, and put the flag back. tyler This is the first thing I tried, however it doesn't seem to work. I seems they are written to the flags.make files at the end, with whatever the final value of CMAKE_CXX_FLAGS is. -- Daniel ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Removing default COMPILE_FLAGS
I believe CMAKE_CXX_FLAGS is consulted each time an add_library() or add_executable() call is processed. So you should be able to remove the flag, add the singleton library/executable, and put the flag back. tyler This is the first thing I tried, however it doesn't seem to work. I seems they are written to the flags.make files at the end, with whatever the final value of CMAKE_CXX_FLAGS is. -- Daniel Actually, I think it uses whatever the final value of CMAKE_CXX_FLAGS is within the CMakeLists.txt file. Since I was setting the variable back to its original value in the same file with the target, the change was being undone, even though I was setting it back after adding the target. If I just leave the value changed and let the normal scoping rules undo the change, it works perfectly. Now that I think about it, this seems like the same way that include_directories() works. -- Daniel ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Mediawiki CMake syntax highlighting
On Sunday 29 November 2009 11:14:03 am David Doria wrote: I was wondering if there was any talk of adding cmake script support to mediawiki's source lang=X capability. It looks terrible if you just use text: http://www.cmake.org/Wiki/Paraview_Make_building_Paraview_plugin_optional And to make it look nice, you have to drastically alter the code (manual syntax highlighting): http://www.cmake.org/Wiki/Plugin_HowTo#Compiling_into_a_Shared_Library Any thoughts on this? Thanks, David I wrote a cmake highlighting for geshi earlier this year, if you install the geshi plugin for mediawiki, and place the attached file in your geshi folder, you should be able to get highlighting like so: source lang=cmake project(test) /source There are a few bugs, such as nested variables ${${foo}}, but it mostly works. I was going to fix that and then pass it along to the geshi guys, but I never got around to it. -- Daniel attachment: cmake.php ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMAKE_MAKE_PROGRAM is not set.
On Thursday 16 April 2009 8:29:11 am Piotr Dobrogost wrote: Hi I'm trying to use cmake 2.6-patch 3 on Vista x64 with VS2008 to build curl. After setting VC variables with vcvarsall.bat from VC's folder and after this command cmake -G NMake Makefiles ..\curl I'm getting this error CMake Error: CMake was unable to find a build program corresponding to NMake Makefiles. CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. I don't get this error in GUI. What's wrong? This usually means nmake.exe was not found in your PATH. It looks like it should have been set by vcvarsall.bat but I've haven't actually tried it, I usually build using nmake from a cygwin bash shell. -- Daniel ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] find_package question
On Friday 10 April 2009 2:59:11 pm Alexander Neundorf wrote: On Friday 10 April 2009, Robert Dailey wrote: I'm reading the guidelines for find package modules here: http://www.cmake.org/cgi-bin/viewcvs.cgi/Modules/readme.txt?root=CMakevi ew =markup No where in here do I see any mention of uppercase variable names. For example, if my find package is: FindFoo.cmake My return variables are: Foo_LIBRARIES Foo_INCLUDE_DIRS Foo_FOUND However, FindPackageHandleStandardArgs.cmake makes the FOUND variable all upper case, like so: FOO_FOUND What am I supposed to do? Uppercase or not? I notice that some pre-packaged find modules (like boost) do not use uppercase names, while others (like OpenGL) do use uppercase. Use uppercase, it's the majority of modules. Alex When you call find_package(), variables can be set inside the find script for arguments such as QUIET or REQUIRED. For FindFoo.cmake, these variables would be Foo_FIND_QUIETLY and Foo_FIND_REQUIRED respectively. I think it's ugly and confusing having some variable all in caps and others with a strange mixture of CamelCase and caps. Further a strict reading of Modules/readme.txt indicates that for a script FindFoo.cmake the variable set should be Foo_FOUND. So it seems to me that the find script itself really should be named in all caps, i.e. FindFOO.cmake. As things are now, most scripts are named FindFoo.cmake and most of them set FOO_FOUND. -- Daniel ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMAKE_MODULE_PATH Question
On Thursday 09 April 2009 11:58:55 am Robert Dailey wrote: Sorry, the missing $ was a typo. The problem was that I was doing: include( foo.cmake ) I should have been doing: include( foo ) Sorry for the mixup :) Thanks for the help guys! This was a silly screwup on my part :P Should actually work either way: include(foo) include(foo.cmake) So long as your script was named foo.cmake and not just foo. -- Daniel ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] set_property on sources causing extra files to be rebuilt
On Tuesday 24 March 2009 3:16:27 pm Alexander Neundorf wrote: On Tuesday 24 March 2009, Alexander Neundorf wrote: On Friday 20 March 2009, Daniel Nelson wrote: It looks like the projects flags.make is updated every time any compile flag or definition changes, and every object file in the project depends on flags.make. In the case of properties set using set_property() the only part of the flags.make that changes is the comment, so maybe it would be best to put these comments into a different file that is not a dependency? Do you have the same effect when you use SET_SOURCE_FILES_PROPERTIES() instead ? I checked, it has the same behaviour, also with cmake cvs. It is actually on purpose that the comments change, since this enforces the rebuilding of the object files if only the flags are changed. (if flags.make is generated without these comments, object files are not rebuilt when the flags are changed). Maybe it could be made more fine granular. Alex So it sounds like the only way to fix this would be to write a separate flags.make file for every object file that has compile/define flags set? I opened this as issue 8787 in the bug tracker. -- Daniel ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] set_property on sources causing extra fi les to be rebuilt
On Tuesday 24 March 2009 4:46:29 pm Clinton Stimpson wrote: Daniel Nelson wrote: On Tuesday 24 March 2009 3:16:27 pm Alexander Neundorf wrote: On Tuesday 24 March 2009, Alexander Neundorf wrote: On Friday 20 March 2009, Daniel Nelson wrote: It looks like the projects flags.make is updated every time any compile flag or definition changes, and every object file in the project depends on flags.make. In the case of properties set using set_property() the only part of the flags.make that changes is the comment, so maybe it would be best to put these comments into a different file that is not a dependency? Do you have the same effect when you use SET_SOURCE_FILES_PROPERTIES() instead ? I checked, it has the same behaviour, also with cmake cvs. It is actually on purpose that the comments change, since this enforces the rebuilding of the object files if only the flags are changed. (if flags.make is generated without these comments, object files are not rebuilt when the flags are changed). Maybe it could be made more fine granular. Alex So it sounds like the only way to fix this would be to write a separate flags.make file for every object file that has compile/define flags set? I opened this as issue 8787 in the bug tracker. Is your report a duplicate? See also: http://public.kitware.com/Bug/view.php?id=8642 Clint Yeah I guess it is a duplicate. -- Daniel ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] set_property on sources causing extra files to be rebuilt
It looks like the projects flags.make is updated every time any compile flag or definition changes, and every object file in the project depends on flags.make. In the case of properties set using set_property() the only part of the flags.make that changes is the comment, so maybe it would be best to put these comments into a different file that is not a dependency? ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] set_property on sources causing extra files to be rebuilt
I am using set_property to add extra compile flags to source files that are built using a precompiled header, but whenever a source file is added or removed it causes every file in the executable to be rebuilt. I have come up with a CMakeList that shows the issue. # cmake_minimum_required(VERSION 2.6) project(prop_test) set(sources foo.cpp bar.cpp main.cpp) add_executable(prop_test ${sources}) set_property(SOURCE foo.cpp main.cpp APPEND PROPERTY COMPILE_FLAGS -Wall) # If you compile the project using a Makefile generator, then remove foo.cpp from the sources variable and recompile, it will also recompile main.cpp and bar.cpp even though no compile flags have changed. If you then put foo.cpp back and build it will again rebuild main.cpp and bar.cpp. It seems that you will need to rebuild every source file that is used in the executable, even though nothing has changed. Is there a way around doing all this rebuilding? ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Why does dependency scanning in version 2.6 seem so slow?
Senanu Pearson wrote: Is there a way to speed up the dependency scan in version 2.6? As my cmake projects became larger I noticed that dependency scanning became a much larger percentage of my build time. My project used a pre-compiled header, which included parts of boost, Qt, and stl. This caused cmake's dependency scanning to consider every object file to include everything in the PCH. My depends.make grew to be about 10 MB each for all ten or so sub-projects in my greater project. The fix was to use INCLUDE_REGULAR_EXPRESSION to block headers that are not going to change from dependency scanning. Unfortunately you need to come up with a regex that matches only files you want to do dependency scanning on. I could never think of one that would work, so instead I made some changes to my copy of cmake. I decided that what I really wanted to do is exclude everything from dependency scanning that is included using angle brackets, and I added an additional argument to INCLUDE_REGULAR_EXPRESSION that would do this. Once I stopped following includes, my build times on a full rebuild decreased from about 10 minutes to 8 and the build time of building on an unmodified source tree dropped from 1m20s to about 20s. This is something I have meaning to put in as a feature request for along time, but just haven't had time. I should mention that I did this all when using 2.4 and I haven't noticed any speed difference with 2.6 ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to make ctest not buffer its output?
Alexander Neundorf wrote: On Thursday 04 December 2008, Hugo Heden wrote: Good day all, I use ctest --build-and-test to do some stuff that takes a long time. It seems that ctest buffers the output of its subcommands so that nothing is written (to the terminal) until at the end. This is a little unconvenient -- as a human I feel more comfortable actually seeing that something is happening. Is there a way I can force ctest to not buffer the output of subcommands, but rather just flush it? Does ctest -VV do what you want ? It switches to extra verbose mode. I submitted this some time ago as bug 0005814. I don't believe there is a way to view the output until the test finishes. -- Daniel ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Can't add empty directories when using CPack
Is it possible to add empty directories with cpack? If my CMakeLists.txt file is: project(empty-dir) set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}) file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/foo/bar/baz) install(DIRECTORY ${CMAKE_BINARY_DIR}/foo DESTINATION cpack-test) install(FILES CMakeLists.txt DESTINATION cpack-test) include(CPack) Then when I run cpack I get something like: $ cpack -G TGZ --verbose ... CPack Verbose: Installing: TGZ/empty-dir/cpack-test/foo CPack Verbose: Installing: TGZ/empty-dir/cpack-test/foo/bar CPack Verbose: Installing: TGZ/empty-dir/cpack-test/foo/bar/baz CPack Verbose: Installing: TGZ/empty-dir/cpack-test/CMakeLists.txt CPack: Compress package CPack Verbose: Compress files to: TGZ/empty-dir.tar.gz CPack: Finalize package CPack Verbose: Copy final package: TGZ/empty-dir.tar.gz to empty-dir.tar.gz CPack: Package empty-dir.tar.gz generated. But then the archive doesn't actually contain the empty folders: $ tar -tf empty-dir.tar.gz empty-dir-0.1.1-Linux/cpack-test/CMakeLists.txt ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake