Re: [cmake-developers] [CMake] Windows rpath emulation
On 09/20/2014 11:53 PM, Nils Gladitz wrote: On 20.09.2014 23:31, Roland Schulz wrote: it would be nice if there were a way to emulate rpath under Windows. As far as I can see there are two possible approaches: - Generate a shell script which sets PATH - Generate a manifest for the application and a manifest for the dependencies. http://sourceforge.net/p/mingw-w64/mailman/message/30019971/ has an example of how to do it. So I am thinking opt-in (target property) wrapper binaries that take the place of the actual binaries. e.g. # Initializes ENABLE_EXECUTABLE_WRAPPER target property set(CMAKE_ENABLE_EXECUTABLE_WRAPPER ON) add_executable(foo foo.cpp) Could produce foo.exe.real# Actual target binary foo.exe.wrapper # CMake generated configuration file foo.exe # Wrapper binary that reads foo.exe.wrapper, sets up the environment and runs foo.exe.real COMMANDs (add_custom_command()/add_custom_target()/add_test()) could transparently call foo.exe (like they would have done without the wrapper). install(TARGETS) should ignore the wrapper and transparently install and rename the real binary. $TARGET_FILE should continue to point at the real binary. A new $TARGET_WRAPPER could point at the wrapper binary. The wrapper binary itself could be precompiled and included with cmake itself. It would determine which configuration to read and which binary to run by inspecting its own name. I primarily had windows native builds in mind. Are there additional use cases? Nils -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] Was AUTOMOC designed to run for each build?
Hi (especially Alex), I noticed that the automoc target is run each time, even for a trivial project: cmake_minimum_required(VERSION 2.8) project(automoctest) set(CMAKE_AUTOMOC ON) find_package(Qt5Widgets REQUIRED) add_executable(main main.cpp) target_link_libraries(main Qt5::Widgets) Each time I run make I get [ 33%] Automatic moc for target main /path/to/cmake -E cmake_autogen /path/to/build/CMakeFiles/main_automoc.dir/ I checked CMake 2.8.7 and it executes the target each time too. In the implementation, makefile-AddUtilityCommand is called with 'true' to set the excludeFromAll parameter. I don't see why the target is executed each time, but is it that way by design? Thanks, Steve. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] iOS support
Hi! My company is organizing soon a hack week where each employee is able to work on any project he wants. So, I've decided to work with Cmake and improve support for iOS to help the product team getting rid of manual project files, constant merge conflicts and bad project file documentation, while improving our tooling possibilities (all that with Cmake!). I've had a quick look at the first issue that popped into my mind the other day and fixed try_compile by adding another variable to set the executable type in the generated project (it has to be MACOSX_BUNDLE) and fixing the search path for the resulting binary. So this is now working... Providing we are targeting the simulator. Due to the nature of Xcode projects that can easily target either the simulator or devices, thus using different compilation flags, the resulting projects aren't working in both case. There are conflicts between some options like the minimum iOS version target and the minimum iOS simulator target for example (which you need to build the try_compile binaries without signing them). Also, the Xcode support is very OSX focused and all variables have MACOSX in their name, which is confusing. So, has anyone worked on similar issues and can suggest a way to progress and improve support for iOS? In the end, I'd like to have a working Xcode project with separate settings for both simulator and device, Cmake compiler flag detection working, and possibly later Make/Ninja projects working too. Regards, /Orphis -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] [CMake 0015170]: CMAKE_SYSTEM_PROCESSOR is broken on Windows
The following issue has been SUBMITTED. == http://www.cmake.org/Bug/view.php?id=15170 == Reported By:stopiccot Assigned To: == Project:CMake Issue ID: 15170 Category: CMake Reproducibility:always Severity: feature Priority: normal Status: new == Date Submitted: 2014-09-23 07:45 EDT Last Modified: 2014-09-23 07:45 EDT == Summary:CMAKE_SYSTEM_PROCESSOR is broken on Windows Description: According to it's description CMAKE_SYSTEM_PROCESSOR should have value of The name of the CPU CMake is building for. On Windows x64 hosts it always has value of AMD64 no matter which architecture you are building for: x86/x64 or arm. I have a strong opinion that this behavior should be fixed cause otherwise this var is completely useless on windows. And yes I know there is a CMAKE_CL_64 var for determining what arch we are building for. But it looks like a x64-only dirty hack not a generic solution == Issue History Date ModifiedUsername FieldChange == 2014-09-23 07:45 stopiccot New Issue == -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] iOS support
The lowest hanging fruit would be to transition over to setting the global variable CMAKE_MACOSX_BUNDLE which is used to initialize the MACOSX_BUNDLE property on all the targets. CMake also supports CMAKE_XCODE_ATTRIBUTE global variables to allow easy code signing etc. Lastly have you looked at setting up different toolchains for the simulator and device? On Tue, Sep 23, 2014 at 4:26 AM, Florent Castelli florent.caste...@gmail.com wrote: Hi! My company is organizing soon a hack week where each employee is able to work on any project he wants. So, I've decided to work with Cmake and improve support for iOS to help the product team getting rid of manual project files, constant merge conflicts and bad project file documentation, while improving our tooling possibilities (all that with Cmake!). I've had a quick look at the first issue that popped into my mind the other day and fixed try_compile by adding another variable to set the executable type in the generated project (it has to be MACOSX_BUNDLE) and fixing the search path for the resulting binary. So this is now working... Providing we are targeting the simulator. Due to the nature of Xcode projects that can easily target either the simulator or devices, thus using different compilation flags, the resulting projects aren't working in both case. There are conflicts between some options like the minimum iOS version target and the minimum iOS simulator target for example (which you need to build the try_compile binaries without signing them). Also, the Xcode support is very OSX focused and all variables have MACOSX in their name, which is confusing. So, has anyone worked on similar issues and can suggest a way to progress and improve support for iOS? In the end, I'd like to have a working Xcode project with separate settings for both simulator and device, Cmake compiler flag detection working, and possibly later Make/Ninja projects working too. Regards, /Orphis -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [CMake] Windows rpath emulation
What is the problem that this feature is trying to solve? It seems unnecessary to me as a first-class feature of CMake. I must be missing something... But if you do pursue something like this, it seems to me that install(TARGETS ...) should install all files including the wrapper. Is this only for executable files, or would something like this also be possible/necessary for shared libraries, too? Slicer and ParaView do (or did in the past) have similar wrappers to set up necessary environment variables before invoking the real exe. Thanks, David C. On Tue, Sep 23, 2014 at 3:05 AM, Nils Gladitz nilsglad...@gmail.com wrote: On 09/20/2014 11:53 PM, Nils Gladitz wrote: On 20.09.2014 23:31, Roland Schulz wrote: it would be nice if there were a way to emulate rpath under Windows. As far as I can see there are two possible approaches: - Generate a shell script which sets PATH - Generate a manifest for the application and a manifest for the dependencies. http://sourceforge.net/p/mingw-w64/mailman/message/30019971/ has an example of how to do it. So I am thinking opt-in (target property) wrapper binaries that take the place of the actual binaries. e.g. # Initializes ENABLE_EXECUTABLE_WRAPPER target property set(CMAKE_ENABLE_EXECUTABLE_WRAPPER ON) add_executable(foo foo.cpp) Could produce foo.exe.real# Actual target binary foo.exe.wrapper # CMake generated configuration file foo.exe # Wrapper binary that reads foo.exe.wrapper, sets up the environment and runs foo.exe.real COMMANDs (add_custom_command()/add_custom_target()/add_test()) could transparently call foo.exe (like they would have done without the wrapper). install(TARGETS) should ignore the wrapper and transparently install and rename the real binary. $TARGET_FILE should continue to point at the real binary. A new $TARGET_WRAPPER could point at the wrapper binary. The wrapper binary itself could be precompiled and included with cmake itself. It would determine which configuration to read and which binary to run by inspecting its own name. I primarily had windows native builds in mind. Are there additional use cases? Nils -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [CMake] Windows rpath emulation
On 09/23/2014 03:11 PM, David Cole wrote: What is the problem that this feature is trying to solve? Being able to run binaries with DLL dependencies within the build tree. Basically the same thing that the build time RPATH feature does on e.g. linux. If you are e.g. linking to Qt5 (shared) and don't have the Qt5 bin directory in your PATH the binary will not run since it can not locate the DLL on its own. As workarounds people often copy the DLLs into their build directories, output all runtime files into a single directory and/or set up custom wrappers that set up PATH. But if you do pursue something like this, it seems to me that install(TARGETS ...) should install all files including the wrapper. CMake replaces build time RPATHs with installation RPATHs when deploying. I think the same should apply to these wrappers. They are only useful for a build tree. Is this only for executable files, or would something like this also be possible/necessary for shared libraries, too? I have been pondering DLLs as well but would restrict it to executables for now. For DLLs this probably only makes sense in a context where the DLL is build by CMake and used as-is without deployment in a context outside of CMake's control. Also I am guessing this might not be as simple to set up as it is for executables. Thanks for the feedback! Nils -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] iOS support
On 9/23/2014 8:09 AM, Robert Maynard wrote: The lowest hanging fruit would be to transition over to setting the global variable CMAKE_MACOSX_BUNDLE which is used to initialize the MACOSX_BUNDLE property on all the targets. CMake also supports CMAKE_XCODE_ATTRIBUTE global variables to allow easy code signing etc. Lastly have you looked at setting up different toolchains for the simulator and device? We have recently looked at this problem. Setting CMAKE_MACOSX_BUNDLE in the toolchain file gets you part of the way there. However, some try_compile stuff will still fail because it can not find the app bundles. cmake_minimum_required(VERSION 2.8) project(foo) include(TestBigEndian) test_big_endian(CMAKE_WORDS_BIGENDIAN) https://github.com/Kitware/VTK/blob/master/CMake/ios.toolchain.xcode.cmake This will get you to the problem: cmake -GXcode -DCMAKE_TOOLCHAIN_FILE=../ios.toolchain.xcode.cmake .. -DIOS_PLATFORM=SIMULATOR Trouble is in cmake/Modules/CheckTypeSize.cmake where it does a try_compile with COPY_FILE. The COPY_FILE in cmCoreTryCompile.cxx does not look for the bundle option and therefore can not find the executable. However, now that I look at it, I think I might be able to fix it pretty easy. That said it would be really cool to beef up the xcode support enough to be able to create an actual ios app. I have not dug into that enough. Should be able to do most of it with CMAKE_XCODE_ATTRIBUTE. I will look into this try_compile COPY_FILE issue today and get back to the list. It would be great if you could get an example/Test in place that builds an app for a device and works with Xcode and for a stretch goal also works with makefiles or ninja. -Bill -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] iOS support
That said it would be really cool to beef up the xcode support enough to be able to create an actual ios app. I have not dug into that enough. Should be able to do most of it with CMAKE_XCODE_ATTRIBUTE. I will look into this try_compile COPY_FILE issue today and get back to the list. It would be great if you could get an example/Test in place that builds an app for a device and works with Xcode and for a stretch goal also works with makefiles or ninja. Couple of more things. Much of the stuff found in these toolchains: https://github.com/Kitware/VTK/blob/master/CMake/ios.toolchain.xcode.cmake https://github.com/Kitware/VTK/blob/master/CMake/ios.simulator.toolchain.cmake https://github.com/Kitware/VTK/blob/master/CMake/ios.device.toolchain.cmake Should be in Platform files. If we created ios platform files we could remove most of the stuff from those toolchain files. This would be a great thing to work on. Also, Robert M reminded me that there is a test that could be extended as this stuff is developed: https://github.com/Kitware/CMake/tree/master/Tests/iOSNavApp ) as it already builds targeting the iphone simulator. -Bill -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] iOS support
On 23 Sep 2014, at 16:56, Bill Hoffman bill.hoff...@kitware.com wrote: That said it would be really cool to beef up the xcode support enough to be able to create an actual ios app. I have not dug into that enough. Should be able to do most of it with CMAKE_XCODE_ATTRIBUTE. I will look into this try_compile COPY_FILE issue today and get back to the list. It would be great if you could get an example/Test in place that builds an app for a device and works with Xcode and for a stretch goal also works with makefiles or ninja. Couple of more things. Much of the stuff found in these toolchains: https://github.com/Kitware/VTK/blob/master/CMake/ios.toolchain.xcode.cmake https://github.com/Kitware/VTK/blob/master/CMake/ios.simulator.toolchain.cmake https://github.com/Kitware/VTK/blob/master/CMake/ios.device.toolchain.cmake Should be in Platform files. If we created ios platform files we could remove most of the stuff from those toolchain files. This would be a great thing to work on. The problem is that I want a project that is usable by developers directly and you can't really force them to target just the simulator. It should work for targeting both simulator and real device. So having a generic iOS toolchain that can generate both in one project is a requirement for me. Generating projects for Makefiles or Ninja would probably require a dedicated toolchain though (or proper platform files indeed), but that can be done later. Also, Robert M reminded me that there is a test that could be extended as this stuff is developed: https://github.com/Kitware/CMake/tree/master/Tests/iOSNavApp ) as it already builds targeting the iphone simulator. -Bill Nice, I will have a look! I also have a couple of patches for finding the binary during a try_compile that works with my other change to have an extra variable for the add_executable and I would need to change it. It's mostly changing cmCoreTryCompile::FindOutputFile() and adds / + targetName + .app/Contents/MacOS to the searchDirs. I'll try to pickup those toolchain files though and see how they work for me soon. I'll probably have some options to override a few things and make it find the compiler properly. Right now, it's hardcoding /usr/bin/clang and that's a no go :) (it should be found in the path or through DEVELOPER_DIR eventually). Not forcing the compiler would be sweet too (but that requires the try_compile fixup first) as it means we could use ccache or an alternative compiler (for reasons). /Orphis -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] iOS support
On 9/23/2014 11:42 AM, Florent Castelli wrote: I also have a couple of patches for finding the binary during a try_compile that works with my other change to have an extra variable for the add_executable and I would need to change it. It's mostly changing cmCoreTryCompile::FindOutputFile() and adds / + targetName + .app/Contents/MacOS to the searchDirs. I just pushed something to next that adds targetName.app. That worked for the example I was building. -Bill -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [CMake] Windows rpath emulation
On 23.09.2014 19:12, Roland Schulz wrote: Have you got a solution to the problem you mentioned in your first email: I suppose it might be slightly more complex given that the import library that is being linked to and the DLL that corresponds to the import library might not be in the same location (and cmake might know the location of the one but not always the location of the the other). - For local targets CMake does have the location (these are also interesting but the main selling point would imo be external libraries). - For imported targets CMake may have DLL locations. More likely when set up by package configuration files (e.g. Qt5 sets them) than when set up by find modules (e.g. FindQt4 does not set them). There might be incentive to add those locations when they start to be more useful. - It might be possible to guess the DLL location from a given import library (assuming it was provided with a full path); probably not something you can rely on but it might be able to guess the location often enough to be convenient - Additional locations could be provided manually by target property On windows when you deploy to a system different from your own it is expected and common practice that you deploy your runtime requirements as well. You can not expect a preexisting installation of your library requirements nor can you expect them to be in the same location as in your development system. I think you are referring to making a binary cpack installation package. I was thinking about installing on the build system. Then It would still be different from the build directory. Yes, but I think that is the least common use case (maybe even more so on windows). CPack uses the same install commands for packaging and local install and I don't think CMake makes the distinction between deploying locally and remotely. Nils -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Was AUTOMOC designed to run for each build?
On Tuesday, September 23, 2014 09:58:58 Stephen Kelly wrote: Hi (especially Alex), I noticed that the automoc target is run each time, even for a trivial project: cmake_minimum_required(VERSION 2.8) project(automoctest) set(CMAKE_AUTOMOC ON) find_package(Qt5Widgets REQUIRED) add_executable(main main.cpp) target_link_libraries(main Qt5::Widgets) Each time I run make I get [ 33%] Automatic moc for target main /path/to/cmake -E cmake_autogen /path/to/build/CMakeFiles/main_automoc.dir/ I checked CMake 2.8.7 and it executes the target each time too. In the implementation, makefile-AddUtilityCommand is called with 'true' to set the excludeFromAll parameter. I don't see why the target is executed each time, but is it that way by design? iirc, yes. The moc files have to be generated before any of the source files is compiled, so automoc is in a target the actual target depends on. IIRC it is exclude_from_all so that it is only built when the actual target is built. Do you think it should only rerun if any of the source files has changed ? There was some problem with this. The headers are usually not part of the listed source files. I would have to check to find out the details again. Alex -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [CMake] Ninja generator fail for QNX on Windows
On Mon, Sep 22, 2014 at 6:32 PM, Bill Hoffman bill.hoff...@kitware.com wrote: Maybe if you looked at the very first older than in your output instead of the dirty ones it might tell you what ninja thinks is out of date. Could be some sort of path issue that has something to do with the way the paths are constructed. Again, without seeing the details I can only guess. Do makefiles work for you? What if you try the Unix Makefiles generator on the same machine does it have the same problem? -Bill Unix Makefiles work, but on the make provided by QNX doesn't support the parallel -j flag. Found the problem though. QCC compiler generates for this project dependency files which look like: c:\projects\my_proj\include\/a.h \ c:\projects\my_proj\src\/a.cpp \ c:\projects\my_proj\other\..\/include/b.h \ c:\projects\my_proj\other\..\/src/b.cpp \ The \/ combination does not agree with ninja. I've tried to hack disk_interface.cc:RealDiskInterface::Stat by removing the / prefix. string dir = DirName(path); string base(path.substr(dir.size() ? dir.size() + 1 : 0)); if (base[0] == '/' || base[0] == '\\') { base.erase(0, 1); } But this fixes only the a.h and a.cpp case. The other case with doesn't work though, since the path is no longer present, Stat received only include/b.h and src/b.cpp. A workaround would be to search and replace all \/ occurrences in all dependency files. This looks like a ninja bug, I'll report it there. Thank you for the support. Cheers, Cristian. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] Ninja generator fail for QNX on Windows
On 9/23/2014 9:05 AM, Cristian Adam wrote: On Mon, Sep 22, 2014 at 6:32 PM, Bill Hoffman bill.hoff...@kitware.com mailto:bill.hoff...@kitware.com wrote: Maybe if you looked at the very first older than in your output instead of the dirty ones it might tell you what ninja thinks is out of date. Could be some sort of path issue that has something to do with the way the paths are constructed. Again, without seeing the details I can only guess. Do makefiles work for you? What if you try the Unix Makefiles generator on the same machine does it have the same problem? -Bill Unix Makefiles work, but on the make provided by QNX doesn't support the parallel -j flag. Seems that gmake supports that: http://www.qnx.com/developers/docs/6.4.1/neutrino/prog/make_convent.html#Parallel Found the problem though. QCC compiler generates for this project dependency files which look like: c:\projects\my_proj\include\/a.h \ c:\projects\my_proj\src\/a.cpp \ c:\projects\my_proj\other\..\/include/b.h \ c:\projects\my_proj\other\..\/src/b.cpp \ The \/ combination does not agree with ninja. That would do it. How are the depends being created? Is it ninja or CMake that is creating them on QNX? This looks like a ninja bug, I'll report it there. Might be. -Bill -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] Ninja generator fail for QNX on Windows
On 23 Sep 2014 15:27, Bill Hoffman bill.hoff...@kitware.com wrote: Seems that gmake supports that: http://www.qnx.com/developers/docs/6.4.1/neutrino/prog/make_convent.html#Parallel In theory it should work, but the mingw version they ship doesn't work. I've upgraded to a version of make which does (one needs to pass SHELL=cmd.exe as an additional parameter), but when you haven't changed anything it still takes some time. This is where ninja comes into place. Found the problem though. QCC compiler generates for this project dependency files which look like: c:\projects\my_proj\include\/a.h \ c:\projects\my_proj\src\/a.cpp \ c:\projects\my_proj\other\..\/include/b.h \ c:\projects\my_proj\other\..\/src/b.cpp \ The \/ combination does not agree with ninja. That would do it. How are the depends being created? Is it ninja or CMake that is creating them on QNX? CMake sets the right flags for qcc and qcc creates the dependency files. Cheers, Cristian. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] CPack WIX examples
Hello I am working on creating an msi installer using cpack with the WIX installer (converting from old system). Im having some trouble finding some good resources to do this. My project needs to set a number of registry entries. We have a few components, and licenses that are installed along with our software. I also don't completely understand the example for CPACK_WIX_PATCH_FILE in the documentation for adding components, etc. I thought it would be helpful to see some of this in action and I was hoping someone could point me to an example or two of a project that uses CPack WIX generators to get me going. I searched github and around the CMake website, and couldn't find any projects that use WIX. -Jameson -- View this message in context: http://cmake.3232098.n2.nabble.com/CPack-WIX-examples-tp7588561.html Sent from the CMake mailing list archive at Nabble.com. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] CPack WIX examples
On 09/23/2014 04:34 PM, jmerkow wrote: Hello I am working on creating an msi installer using cpack with the WIX installer (converting from old system). Im having some trouble finding some good resources to do this. My project needs to set a number of registry entries. We have a few components, and licenses that are installed along with our software. I also don't completely understand the example for CPACK_WIX_PATCH_FILE in the documentation for adding components, etc. I thought it would be helpful to see some of this in action and I was hoping someone could point me to an example or two of a project that uses CPack WIX generators to get me going. I searched github and around the CMake website, and couldn't find any projects that use WIX. I've got some tiny example projects (actually manual test cases): https://github.com/ngladitz/cmake-wix-testsuite Each sub directory should contain a self contained project usually exercising one specific feature of the WIX generator. Nils -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] Problems resolving PTHREAD_* symbols.
This is still driving us crazy. Digging a little deeper into this, the symbols we need are defined as enums on Linux, which explains why check_symbol_exists() does not work there. The OSX pthread.h header uses defines, but for some reason, the check_c_source_compiles method is still failing. We've updated our script to use check_c_source_compiles(#include pthread.h int main(int arg, char **argv) { int tryme; tryme = PTHREAD_MUTEX_ERRORCHECK; return 0;} HAVE_PTHREAD_MUTEX_ERRORCHECK) if (NOT DEFINED HAVE_PTHREAD_MUTEX_ERRORCHECK) check_symbol_exists(PTHREAD_MUTEX_ERRORCHECK pthread.h HAVE_PTHREAD_MUTEX_ERRORCHECK) endif () to try both methods, but this is still failing on the Mac and a couple of the Linux versions we build for. This is driving us nuts, since we don't understand why the check_c_source_compiler check is not working. Is there some way we can get debug information about why the compile fails? That might give us some clues. Rick On Mon, Sep 22, 2014 at 12:06 PM, Rick McGuire object.r...@gmail.com wrote: We have some semaphore code that has conditional compilation based on #defines in config.h. We're having problems with resolving the various PTHREAD_* symbols to get the correct values in config.h. Our first attempt at this (done on Linux) used check_symbol_exists(PTHREAD_MUTEX_RECURSIVE pthread.h HAVE_PTHREAD_MUTEX_RECURSIVE) This did not pick the symbol up correctly. Eventually, we got things to work by using check_c_source_compiles(#include pthread.h int main(int arg, char **argv) { int tryme; tryme = PTHREAD_MUTEX_RECURSIVE; return 0;} HAVE_PTHREAD_MUTEX_RECURSIVE) and got everything to build cleanly. Over the weekend, we tried building on OSX for the first time, and once again, we were not resolving that these symbols existed. What are we missing here? Is there some technique we should be using that will work across the various platforms? Rick -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] How to get custom commands to build in parallel ?
I have the following code in one of my CMakeLists.txt files: set(feature_files_h) set(feature_files_cpp) macro(create_feature_files NAME) add_custom_command( OUTPUT ${FEATURES_OUTPUT_DIR}/${NAME}.cpp ${FEATURES_OUTPUT_DIR}/${NAME}.h DEPENDS ${FEATURES_INPUT_DIR}/${NAME}.txt WORKING_DIRECTORY ${SIM_ROOT}/tools/features COMMAND perl ${FEATURES_PERL_PATH} -s${FEATURES_INPUT_DIR} -d${FEATURES_OUTPUT_DIR} -f${NAME} ) list(APPEND feature_files_h ${FEATURES_OUTPUT_DIR}/${NAME}.h) list(APPEND feature_files_cpp ${FEATURES_OUTPUT_DIR}/${NAME}.cpp) endmacro() create_feature_files(example_features) create_feature_files(fme_core_features) create_feature_files(fme_features) create_feature_files(front_end_features) create_feature_files(inloop_filter_features) add_library(${PROJECT_NAME} STATIC ${feature_files_cpp} ${feature_files_h} ${SIM_ROOT}/tools/features/cpp-code/cfeatures.cpp) which creates a library from an existing source file called cfeatures.cpp and from a bunch of auto-generated .cpp and .h files. The whole thing works fine and runs the perl script to create each of the auto-generated files before creating the library. The only problem I have with it is that it is quite slow and I would like to speed it up by having it run the perl commands to create the auto-generated files in parallel. Currently, each of the auto-generated cpp files is generated sequentially, then they are all compiled in parallel and the library created in the final step. I'm using cmake 3.0.0 with Visual Studio 2013 Express Edition. And I've added the /MP option so that Visual Studio will do parallel builds. I've also set the Projects and Solutions=Build and Run=maximum number of parallel project builds option to 4. This works well with all the normal cpp files in other projects and I easily see all 4 cpu cores maxxed out. But when building this project only 1 cpu core is used. Can anybody tell me how to change it so that the auto-geneated files are created in parallel as well ? -- Glenn -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] Ninja generator fail for QNX on Windows
On 23. September 2014 16:22:40 MESZ, Cristian Adam QCC compiler generates for this project dependency files which look like: c:\projects\my_proj\include\/a.h \ c:\projects\my_proj\src\/a.cpp \ c:\projects\my_proj\other\..\/include/b.h \ c:\projects\my_proj\other\..\/src/b.cpp \ To me it looks more like a bug in qcc. Does qcc generates the same broken files when not used in context of CMake or ninja? It should only use one kind of separator for directories. HS -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] How to get custom commands to build in parallel ?
If you are using VS2013 you should look at the /maxcpucount flag which allows msbuild to build multiple projects at the same time. You will have to manually balance /MP and /maxcpucount as they cause a P*C number of processes to execute. On Tue, Sep 23, 2014 at 11:05 AM, Glenn Coombs glenn.coo...@gmail.com wrote: I have the following code in one of my CMakeLists.txt files: set(feature_files_h) set(feature_files_cpp) macro(create_feature_files NAME) add_custom_command( OUTPUT ${FEATURES_OUTPUT_DIR}/${NAME}.cpp ${FEATURES_OUTPUT_DIR}/${NAME}.h DEPENDS ${FEATURES_INPUT_DIR}/${NAME}.txt WORKING_DIRECTORY ${SIM_ROOT}/tools/features COMMAND perl ${FEATURES_PERL_PATH} -s${FEATURES_INPUT_DIR} -d${FEATURES_OUTPUT_DIR} -f${NAME} ) list(APPEND feature_files_h ${FEATURES_OUTPUT_DIR}/${NAME}.h) list(APPEND feature_files_cpp ${FEATURES_OUTPUT_DIR}/${NAME}.cpp) endmacro() create_feature_files(example_features) create_feature_files(fme_core_features) create_feature_files(fme_features) create_feature_files(front_end_features) create_feature_files(inloop_filter_features) add_library(${PROJECT_NAME} STATIC ${feature_files_cpp} ${feature_files_h} ${SIM_ROOT}/tools/features/cpp-code/cfeatures.cpp) which creates a library from an existing source file called cfeatures.cpp and from a bunch of auto-generated .cpp and .h files. The whole thing works fine and runs the perl script to create each of the auto-generated files before creating the library. The only problem I have with it is that it is quite slow and I would like to speed it up by having it run the perl commands to create the auto-generated files in parallel. Currently, each of the auto-generated cpp files is generated sequentially, then they are all compiled in parallel and the library created in the final step. I'm using cmake 3.0.0 with Visual Studio 2013 Express Edition. And I've added the /MP option so that Visual Studio will do parallel builds. I've also set the Projects and Solutions=Build and Run=maximum number of parallel project builds option to 4. This works well with all the normal cpp files in other projects and I easily see all 4 cpu cores maxxed out. But when building this project only 1 cpu core is used. Can anybody tell me how to change it so that the auto-geneated files are created in parallel as well ? -- Glenn -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] Problems resolving PTHREAD_* symbols.
To get information on why a try_compile is failing you can use the --debug-trycompile option which will stop CMake from deleting the try_compile build tree code. Now this flag is only useful on a single try_compile at a time. On Tue, Sep 23, 2014 at 10:50 AM, Rick McGuire object.r...@gmail.com wrote: This is still driving us crazy. Digging a little deeper into this, the symbols we need are defined as enums on Linux, which explains why check_symbol_exists() does not work there. The OSX pthread.h header uses defines, but for some reason, the check_c_source_compiles method is still failing. We've updated our script to use check_c_source_compiles(#include pthread.h int main(int arg, char **argv) { int tryme; tryme = PTHREAD_MUTEX_ERRORCHECK; return 0;} HAVE_PTHREAD_MUTEX_ERRORCHECK) if (NOT DEFINED HAVE_PTHREAD_MUTEX_ERRORCHECK) check_symbol_exists(PTHREAD_MUTEX_ERRORCHECK pthread.h HAVE_PTHREAD_MUTEX_ERRORCHECK) endif () to try both methods, but this is still failing on the Mac and a couple of the Linux versions we build for. This is driving us nuts, since we don't understand why the check_c_source_compiler check is not working. Is there some way we can get debug information about why the compile fails? That might give us some clues. Rick On Mon, Sep 22, 2014 at 12:06 PM, Rick McGuire object.r...@gmail.com wrote: We have some semaphore code that has conditional compilation based on #defines in config.h. We're having problems with resolving the various PTHREAD_* symbols to get the correct values in config.h. Our first attempt at this (done on Linux) used check_symbol_exists(PTHREAD_MUTEX_RECURSIVE pthread.h HAVE_PTHREAD_MUTEX_RECURSIVE) This did not pick the symbol up correctly. Eventually, we got things to work by using check_c_source_compiles(#include pthread.h int main(int arg, char **argv) { int tryme; tryme = PTHREAD_MUTEX_RECURSIVE; return 0;} HAVE_PTHREAD_MUTEX_RECURSIVE) and got everything to build cleanly. Over the weekend, we tried building on OSX for the first time, and once again, we were not resolving that these symbols existed. What are we missing here? Is there some technique we should be using that will work across the various platforms? Rick -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] Abuse try_compile to get DLL dependencies for win32 NSIS packaging?
Ok, this may or may not work but I figured it was worth a try. I'm running out of motivation to get a good method to determine which DLL's I need to package with the install(SCRIPT...) / GetPrerequisites mess. My current approach is to attempt to use try_compile to build a minimal program I can link against and use GetPrerequisites with it. I crated an minimal do nothing c++ program and used the full linker flags for the main program but it appears that the -Wl,--no-whole-archive is helping me by not linking with things I don't need: $ objdump -x getdeps.exe | grep DLL Name: DLL Name: KERNEL32.dll DLL Name: msvcrt.dll Any ideas? Thanks, Richard -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] VTK compiling problem with CMake
Hi, I'm trying use CMake to build VTK, but got error as below. I searched the internet and tried many ways suggested, but they didn't work. The OS is Windows 7 with Visual Studio 2010 Pro (up to date). I don't know how to solve. I'll appreciate your help. Error info from CMake-gui - The C compiler identification is MSVC 16.0.30319.1 The CXX compiler identification is MSVC 16.0.30319.1 Check for working C compiler using: Visual Studio 10 Win64 Check for working C compiler using: Visual Studio 10 Win64 -- broken CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/cl.exe is not able to compile a simple test program. It fails with the following output: Change Dir: C:/Code/VTK-bin/CMakeFiles/CMakeTmp Run Build Command:C:\PROGRA~2\MICROS~2.0\Common7\IDE\devenv.com CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec696148031 Microsoft (R) Visual Studio Version 10.0.30319.1. Copyright (C) Microsoft Corp. All rights reserved. 1-- Build started: Project: cmTryCompileExec696148031, Configuration: Debug x64 -- 1Build started 9/10/2014 1:31:13 PM. 1PrepareForBuild: 1 Creating directory C:\Code\VTK-bin\CMakeFiles\CMakeTmp\Debug\. 1InitializeBuildStatus: 1 Creating cmTryCompileExec696148031.dir\Debug\cmTryCompileExec696148031.unsuccessfulbuild because AlwaysCreate was specified. 1ClCompile: 1 Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64 1 Copyright (C) Microsoft Corporation. All rights reserved. 1 1 cl /c /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D _DEBUG /D CMAKE_INTDIR=\Debug\ /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /FocmTryCompileExec696148031.dir\Debug\\ /FdcmTryCompileExec696148031.dir\Debug\vc100.pdb /Gd /TC /errorReport:prompt testCCompiler.c 1 1 testCCompiler.c 1LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt 1 1Build FAILED. 1 1Time Elapsed 00:00:00.26 == Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped == CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:28 (project) Configuring incomplete, errors occurred! See also C:/Code/VTK-bin/CMakeFiles/CMakeOutput.log. See also C:/Code/VTK-bin/CMakeFiles/CMakeError.log. Best Lan -- View this message in context: http://cmake.3232098.n2.nabble.com/VTK-compiling-problem-with-CMake-tp7588569.html Sent from the CMake mailing list archive at Nabble.com. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] VTK compiling problem with CMake
Did you try runing cmake-gui from a VisualStudio 2010 x64 command prompt? John On Tue, Sep 23, 2014 at 1:08 PM, lanhz h1...@ucsd.edu wrote: Hi, I'm trying use CMake to build VTK, but got error as below. I searched the internet and tried many ways suggested, but they didn't work. The OS is Windows 7 with Visual Studio 2010 Pro (up to date). I don't know how to solve. I'll appreciate your help. Error info from CMake-gui - The C compiler identification is MSVC 16.0.30319.1 The CXX compiler identification is MSVC 16.0.30319.1 Check for working C compiler using: Visual Studio 10 Win64 Check for working C compiler using: Visual Studio 10 Win64 -- broken CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/cl.exe is not able to compile a simple test program. It fails with the following output: Change Dir: C:/Code/VTK-bin/CMakeFiles/CMakeTmp Run Build Command:C:\PROGRA~2\MICROS~2.0\Common7\IDE\devenv.com CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec696148031 Microsoft (R) Visual Studio Version 10.0.30319.1. Copyright (C) Microsoft Corp. All rights reserved. 1-- Build started: Project: cmTryCompileExec696148031, Configuration: Debug x64 -- 1Build started 9/10/2014 1:31:13 PM. 1PrepareForBuild: 1 Creating directory C:\Code\VTK-bin\CMakeFiles\CMakeTmp\Debug\. 1InitializeBuildStatus: 1 Creating cmTryCompileExec696148031.dir\Debug\cmTryCompileExec696148031.unsuccessfulbuild because AlwaysCreate was specified. 1ClCompile: 1 Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64 1 Copyright (C) Microsoft Corporation. All rights reserved. 1 1 cl /c /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D _DEBUG /D CMAKE_INTDIR=\Debug\ /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /FocmTryCompileExec696148031.dir\Debug\\ /FdcmTryCompileExec696148031.dir\Debug\vc100.pdb /Gd /TC /errorReport:prompt testCCompiler.c 1 1 testCCompiler.c 1LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt 1 1Build FAILED. 1 1Time Elapsed 00:00:00.26 == Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped == CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:28 (project) Configuring incomplete, errors occurred! See also C:/Code/VTK-bin/CMakeFiles/CMakeOutput.log. See also C:/Code/VTK-bin/CMakeFiles/CMakeError.log. Best Lan -- View this message in context: http://cmake.3232098.n2.nabble.com/VTK-compiling-problem-with-CMake-tp7588569.html Sent from the CMake mailing list archive at Nabble.com. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake -- John M. Drescher -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] VTK compiling problem with CMake
On 9/23/2014 1:16 PM, John Drescher wrote: Did you try runing cmake-gui from a VisualStudio 2010 x64 command prompt? John This has to do with the version of cvtres.exe that you have installed on the machine: http://stackoverflow.com/questions/10888391/error-link-fatal-error-lnk1123-failure-during-conversion-to-coff-file-inval Thing to google for: 1LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt -Bill -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] VTK compiling problem with CMake
1LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt When we've seen this, it's usually been due to .NET being upgraded to 4.5, which is incompatible with the tools in the original version of Visual Studio 2010. Upgrading Visual Studio 2010 to SP1 usually resolves the issue. -- Daniel Schepler -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] ExternalProject_Add dependency graph (dot/graphviz?) ?
On 09/22/2014 04:59 PM, Nicholas Yue wrote: Hi, CMake has graphviz output capability for dependency within a project. Is there a way to graph dependency at the ExternalProject_Add() level ? Cheers Hello Nicholas, Can you clarify your question a bit more? Do you mean 'show me the external projects a target in my project depends on' or do you mean 'show me the dependencies the external project depens on', or something different altogether? With kind regards, Micha Hergarden signature.asc Description: OpenPGP digital signature -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] ExternalProject_Add dependency graph (dot/graphviz?) ?
Hi Micha, My interest is in show me the dependencies the external project depends on I am considering migrating an in-house build system to build opensource projects to using CMake. As there are many external packages and versions (close to 100), I'd like to be able to visualize their dependency. Once the new system based on CMake is working, I need to build them for different target OS to assist in migration from current OS to future OS version. e.g. ExternalProject_Add ( python264_static ) ExternalProject_Add ( python264 DEPENDS python264_static ) ExternalProject_Add ( boost_1_47_0 DEPENDS python264 ) ExternalProject_Add ( alembic_1_5_5 DEPENDS python264 boost_1_47_0 ) Cheers On 23 September 2014 11:58, Micha Hergarden micha.hergar...@gmail.com wrote: On 09/22/2014 04:59 PM, Nicholas Yue wrote: Hi, CMake has graphviz output capability for dependency within a project. Is there a way to graph dependency at the ExternalProject_Add() level ? Cheers Hello Nicholas, Can you clarify your question a bit more? Do you mean 'show me the external projects a target in my project depends on' or do you mean 'show me the dependencies the external project depens on', or something different altogether? With kind regards, Micha Hergarden -- Nicholas Yue Graphics - Arnold, Alembic, RenderMan, OpenGL, HDF5 Custom Dev - C++ porting, OSX, Linux, Windows http://au.linkedin.com/in/nicholasyue https://vimeo.com/channels/naiadtools -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] Fwd: Re: ExternalProject_Add dependency graph (dot/graphviz?) ?
Hello Nicholas, I see what you mean. I have generated a build.ninja for an external project depeding on an external project, and the dotfile does show the dependency. The problem seems to be that the view is somewhat cluttered by the intermediate dependencies on custom_target etc. I guess it depends on the level of detail you need: you only want to see high level dependencies, but a developer that wants to know exactly what dependencies are generated will want to see the custom_target dependencies as well. I don't see a quick solution to this. I guess not generating the intermediates (if this is possible at all) would mean adapt the ninja generator; not showing the intermediates would mean adapt ninja? I'm not familiar enough with either to help you I'm afraid. Maybe one of the ninja generator maintainers can help you? With kind regards, Micha Hergarden On 09/23/2014 09:09 PM, Nicholas Yue wrote: Hi Micha, My interest is in show me the dependencies the external project depends on I am considering migrating an in-house build system to build opensource projects to using CMake. As there are many external packages and versions (close to 100), I'd like to be able to visualize their dependency. Once the new system based on CMake is working, I need to build them for different target OS to assist in migration from current OS to future OS version. e.g. ExternalProject_Add ( python264_static ) ExternalProject_Add ( python264 DEPENDS python264_static ) ExternalProject_Add ( boost_1_47_0 DEPENDS python264 ) ExternalProject_Add ( alembic_1_5_5 DEPENDS python264 boost_1_47_0 ) Cheers On 23 September 2014 11:58, Micha Hergarden micha.hergar...@gmail.com mailto:micha.hergar...@gmail.com wrote: On 09/22/2014 04:59 PM, Nicholas Yue wrote: Hi, CMake has graphviz output capability for dependency within a project. Is there a way to graph dependency at the ExternalProject_Add() level ? Cheers Hello Nicholas, Can you clarify your question a bit more? Do you mean 'show me the external projects a target in my project depends on' or do you mean 'show me the dependencies the external project depens on', or something different altogether? With kind regards, Micha Hergarden -- Nicholas Yue Graphics - Arnold, Alembic, RenderMan, OpenGL, HDF5 Custom Dev - C++ porting, OSX, Linux, Windows http://au.linkedin.com/in/nicholasyue https://vimeo.com/channels/naiadtools signature.asc Description: OpenPGP digital signature -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] CPack WIX examples
Thanks a lot for your help! Those examples are excellent. I have a follow up questions for creating the installer, though. We have a number of registry entries that need to be created for the software to run in 'release mode'. In our current system we add registry entries into the wxs, but I don't see a way to do that with cmake/cpack easily. We add a few lines, such as: Registry Id='regid7' Root='HKLM' Key='Software\proj\proj 2.0' Name='HomeDir' Action='write' Type='string' Value='[INSTALLDIR]Home' / We use these registry entries as anchors for the locations for software assets. It seems the best way to do this would be to override the template with a number of configurable entries? So I could add something like (there's about 15 of em): Registry Id='regid7' Root='HKLM' Key='Software\@proj_name@\@proj_name@ @proj_FULL_VERSION@' Name='HomeDir' Action='write' Type='string' Value='[INSTALL_ROOT]@home_path@' / I wanted to check to see if there was a way to handle this directly from CMake. -Jameson -- View this message in context: http://cmake.3232098.n2.nabble.com/CPack-WIX-examples-tp7588561p7588576.html Sent from the CMake mailing list archive at Nabble.com. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] VTK compiling problem with CMake
Thank everyone! I installed VS SP1 and it work! ! -- View this message in context: http://cmake.3232098.n2.nabble.com/VTK-compiling-problem-with-CMake-tp7588569p7588577.html Sent from the CMake mailing list archive at Nabble.com. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] Object Library into Shared library
Hello, According to: http://www.cmake.org/Wiki/CMake/Tutorials/Object_Library it is possible to compile OBJECT libraries for use in other targets, as of CMake 2.8.8. Unfortunately it doesn't document how to make the OBJECT position independent. Is the proper cross platform method to set the POSITION_INDEPENDENT_CODE property ON on the OBJECT library? What is the minimum version required to set the POSITION_INDEPENDENT_CODE property on an OBJECT library. Thanks, -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] get windows import lib location
What is the proper way to get the import lib location for a windows dll? I've used GET_TARGET_PROPERTY(FOOPATH foo LOCATION) to get the location of the foo.dll, but I also need the path to foo.lib. Thanks, -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] CMAKE_INSTALL_PREFIX problem
I am using cmake 2.8.9 on debian wheezy. I'm fairly new to using cmake. My CMakelists.txt file starts with cmake_minimum_required(VERSION 2.6) SET(CMAKE_INSTALL_PREFIX /home/jeremy/Projects/local/) project(myproject) Finishing with INSTALL ( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/@APPLICATION_NAME@ DESTINATION @${BUILD_BIN} ) which installs in my target directory, but under a tree prefixed by the '@' character. i.e. /home/jeremy/Projects/local/@/sbin and equivalent. I'm guessing that this is a result of the fragment @${BUILD_BIN} The problem is that if I remove the '@' the INSTALL ignores the CMAKE_INSTALL_PREFIX I've experimented with different variations on the INSTALL lines to no success. Any advice on how to get my INSTALLS ending up in /home/jeremy/Projects/local/sbin and equivalent? Thanks -- Jeremy Ardley -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[Cmake-commits] CMake branch, next, updated. v3.0.2-5419-gafac7f2
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 afac7f22cea21995c6dde1d184e4ab3c0aefc055 (commit) via 034344ac2540d8862b206e288df2ab39a206f368 (commit) via 131ccd99cfff020dc6ca1bf1d2ff74566cc635c7 (commit) via a4842771ba11c48591ad2c6164286f01a8509bf5 (commit) from 2b3ce8341c1d4862f20a798746c128ddac1ad540 (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=afac7f22cea21995c6dde1d184e4ab3c0aefc055 commit afac7f22cea21995c6dde1d184e4ab3c0aefc055 Merge: 2b3ce83 034344a Author: Stephen Kelly steve...@gmail.com AuthorDate: Tue Sep 23 07:36:29 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Tue Sep 23 07:36:29 2014 -0400 Merge topic 'autorcc-depends' into next 034344ac QtAutogen: Regenerate qrc files if their input changes (#15074) 131ccd99 QtAutogen: Expand rccfiles into a vector early in the autogen process. a4842771 QtAutogen: Extract a GetRccExecutable method. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=034344ac2540d8862b206e288df2ab39a206f368 commit 034344ac2540d8862b206e288df2ab39a206f368 Author: Stephen Kelly steve...@gmail.com AuthorDate: Wed Sep 17 02:42:30 2014 +0200 Commit: Stephen Kelly steve...@gmail.com CommitDate: Tue Sep 23 13:31:41 2014 +0200 QtAutogen: Regenerate qrc files if their input changes (#15074) Get dependencies from the output of ``rcc --list`` if using Qt 5. Otherwise process the file in the same way as the qt4_add_resources macro. diff --git a/Modules/AutogenInfo.cmake.in b/Modules/AutogenInfo.cmake.in index 602b065..7d89420 100644 --- a/Modules/AutogenInfo.cmake.in +++ b/Modules/AutogenInfo.cmake.in @@ -1,5 +1,6 @@ set(AM_SOURCES @_cpp_files@ ) set(AM_RCC_SOURCES @_rcc_files@ ) +set(AM_RCC_INPUTS @_qt_rcc_inputs@) set(AM_SKIP_MOC @_skip_moc@ ) set(AM_SKIP_UIC @_skip_uic@ ) set(AM_HEADERS @_moc_headers@ ) diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 4e40fc7..8f1a52f 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -166,6 +166,112 @@ static std::string getAutogenTargetDir(cmTarget const* target) return targetDir; } +std::string cmQtAutoGenerators::ListQt5RccInputs(cmSourceFile* sf, +cmTarget* target, +std::vectorstd::string depends) +{ + std::string rccCommand = this-GetRccExecutable(target); + std::vectorstd::string qrcEntries; + + std::vectorstd::string command; + command.push_back(rccCommand); + command.push_back(--list); + + std::string absFile = cmsys::SystemTools::GetRealPath( + sf-GetFullPath().c_str()); + + command.push_back(absFile); + + std::string output; + int retVal = 0; + bool result = cmSystemTools::RunSingleCommand(command, output, +retVal, 0, +cmSystemTools::OUTPUT_NONE); + if (!result || retVal) +{ +std::cerr AUTOGEN: error: Rcc list process for sf-GetFullPath() +failed:\n output std::endl; +return std::string(); +} + + std::istringstream ostr(output); + std::string oline; + while(std::getline(ostr, oline)) +{ +if (oline.empty()) + { + // The output of rcc --list contains many empty lines. + continue; + } +if (cmHasLiteralPrefix(oline, RCC: Error in)) + { + static std::string searchString = Cannot find file '; + + std::string::size_type pos = oline.find(searchString); + if (pos == std::string::npos) +{ +std::cerr AUTOGEN: error: Rcc lists unparsable output + oline std::endl; +return std::string(); +} + pos += searchString.length(); + std::string::size_type sz = oline.size() - pos - 1; + qrcEntries.push_back(oline.substr(pos, sz)); + } +else + { + qrcEntries.push_back(oline); + } +} + depends.insert(depends.end(), qrcEntries.begin(), qrcEntries.end()); + std::string entriesList; + const char* sep = ; + for(std::vectorstd::string::const_iterator it = qrcEntries.begin(); + it != qrcEntries.end(); ++it) +{ +entriesList += sep; +entriesList += *it; +sep = @list_sep@; +} + return entriesList; +} + +std::string cmQtAutoGenerators::ListQt4RccInputs(cmSourceFile* sf, +std::vectorstd::string depends) +{ + const std::string qrcContents = ReadAll(sf-GetFullPath()); + + cmsys::RegularExpression
[Cmake-commits] CMake branch, next, updated. v3.0.2-5421-gcb0ecc9
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 cb0ecc95d7da20b651f9e14e24235499a161a4b0 (commit) via 96aa6060d3db0e5d076b81627d4b4c18e3c6247d (commit) from afac7f22cea21995c6dde1d184e4ab3c0aefc055 (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=cb0ecc95d7da20b651f9e14e24235499a161a4b0 commit cb0ecc95d7da20b651f9e14e24235499a161a4b0 Merge: afac7f2 96aa606 Author: Stephen Kelly steve...@gmail.com AuthorDate: Tue Sep 23 10:30:57 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Tue Sep 23 10:30:57 2014 -0400 Merge topic 'autorcc-depends' into next 96aa6060 Add file paths to debug output. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=96aa6060d3db0e5d076b81627d4b4c18e3c6247d commit 96aa6060d3db0e5d076b81627d4b4c18e3c6247d Author: Stephen Kelly steve...@gmail.com AuthorDate: Tue Sep 23 16:30:44 2014 +0200 Commit: Stephen Kelly steve...@gmail.com CommitDate: Tue Sep 23 16:30:44 2014 +0200 Add file paths to debug output. diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 5b3a137..6e13fae 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -142,10 +142,10 @@ file(TIMESTAMP ${qrc_file1} file1_step1 ${timeformat}) file(TIMESTAMP ${qrc_file2} file2_step1 ${timeformat}) if (NOT file2_step1 STREQUAL file2_before) - message(SEND_ERROR file2 should not have changed in the first step!) + message(SEND_ERROR file2 (${qrc_file2}) should not have changed in the first step!) endif() if (NOT file1_step1 GREATER file1_before) - message(SEND_ERROR file1 should have changed in the first step!) + message(SEND_ERROR file1 (${qrc_file1}) should have changed in the first step!) endif() execute_process(COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_SOURCE_DIR}/autorcc_depends/res2_input.txt) @@ -159,8 +159,8 @@ file(TIMESTAMP ${qrc_file1} file1_step2 ${timeformat}) file(TIMESTAMP ${qrc_file2} file2_step2 ${timeformat}) if (NOT file1_step2 STREQUAL file1_step1) - message(SEND_ERROR file1 should not have changed in the second step!) + message(SEND_ERROR file1 (${qrc_file1}) should not have changed in the second step!) endif() if (NOT file2_step2 GREATER file2_before) - message(SEND_ERROR file2 should have changed in the second step!) + message(SEND_ERROR file2 (${qrc_file2}) should have changed in the second step!) endif() --- Summary of changes: Tests/QtAutogen/CMakeLists.txt |8 1 file changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.0.2-5426-g752fcae
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 752fcaede3b811298a07b3326d22bd9bf1f77631 (commit) via 55a885da00985823253827e2e44f9e02f2999b71 (commit) via 069090e347078d1e3998e13e49d2d50dae013ef0 (commit) from 2e5042a2523a1747cbc86f5febef6b76c8a40b1b (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=752fcaede3b811298a07b3326d22bd9bf1f77631 commit 752fcaede3b811298a07b3326d22bd9bf1f77631 Merge: 2e5042a 55a885d Author: Bill Hoffman bill.hoff...@kitware.com AuthorDate: Tue Sep 23 11:02:07 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Tue Sep 23 11:02:07 2014 -0400 Merge topic 'fix_search_path_ios_trycompile' into next 55a885da Teach try_compile COPY_FILE to look for IOS app bundles. 069090e3 CMake Nightly Date Stamp http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=55a885da00985823253827e2e44f9e02f2999b71 commit 55a885da00985823253827e2e44f9e02f2999b71 Author: Bill Hoffman bill.hoff...@kitware.com AuthorDate: Tue Sep 23 10:59:08 2014 -0400 Commit: Bill Hoffman bill.hoff...@kitware.com CommitDate: Tue Sep 23 10:59:08 2014 -0400 Teach try_compile COPY_FILE to look for IOS app bundles. The COPY_FILE option on try_compile never looked for IOS application bundles. This caused it to fail if the CMAKE_MACOSX_BUNDLE was set. diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index ed19851..bc5708d 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -634,6 +634,10 @@ void cmCoreTryCompile::FindOutputFile(const std::string targetName) searchDirs.push_back(tmp); } searchDirs.push_back(/Debug); +#if defined(__APPLE__) + std::string app = /Debug/ + targetName + .app; + searchDirs.push_back(app); +#endif searchDirs.push_back(/Development); for(std::vectorstd::string::const_iterator it = searchDirs.begin(); --- Summary of changes: Source/CMakeVersion.cmake |2 +- Source/cmCoreTryCompile.cxx |4 2 files changed, 5 insertions(+), 1 deletion(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.0.2-5428-g3989553
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 3989553aae0bf67901dd141d7ebc86fa97dfe027 (commit) via 4608bdd26bff0cb359691d7acf7af11e5f1fb335 (commit) from 752fcaede3b811298a07b3326d22bd9bf1f77631 (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=3989553aae0bf67901dd141d7ebc86fa97dfe027 commit 3989553aae0bf67901dd141d7ebc86fa97dfe027 Merge: 752fcae 4608bdd Author: Stephen Kelly steve...@gmail.com AuthorDate: Tue Sep 23 12:36:19 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Tue Sep 23 12:36:19 2014 -0400 Merge topic 'autorcc-depends' into next 4608bdd2 Use BOOL genex. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4608bdd26bff0cb359691d7acf7af11e5f1fb335 commit 4608bdd26bff0cb359691d7acf7af11e5f1fb335 Author: Stephen Kelly steve...@gmail.com AuthorDate: Tue Sep 23 18:36:10 2014 +0200 Commit: Stephen Kelly steve...@gmail.com CommitDate: Tue Sep 23 18:36:10 2014 +0200 Use BOOL genex. diff --git a/Tests/QtAutogen/autorcc_depends/CMakeLists.txt b/Tests/QtAutogen/autorcc_depends/CMakeLists.txt index d84f2a0..5013739 100644 --- a/Tests/QtAutogen/autorcc_depends/CMakeLists.txt +++ b/Tests/QtAutogen/autorcc_depends/CMakeLists.txt @@ -35,6 +35,6 @@ add_executable(test_res2 target_link_libraries(test_res2 ${QT_CORE_TARGET}) file(GENERATE - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/info_file$$CONFIG:_$CONFIG.txt + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/info_file$$BOOL:$CONFIG:_$CONFIG.txt CONTENT $TARGET_FILE:test_res1\n$TARGET_FILE:test_res2\n ) --- Summary of changes: Tests/QtAutogen/autorcc_depends/CMakeLists.txt |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.0.2-5430-g140be4f
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 140be4fd07c907c814ea0161db3c593463b53d74 (commit) via 9076e98ee35f88862e122aab970cbb5eb51b6653 (commit) from 3989553aae0bf67901dd141d7ebc86fa97dfe027 (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=140be4fd07c907c814ea0161db3c593463b53d74 commit 140be4fd07c907c814ea0161db3c593463b53d74 Merge: 3989553 9076e98 Author: Stephen Kelly steve...@gmail.com AuthorDate: Tue Sep 23 16:33:48 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Tue Sep 23 16:33:48 2014 -0400 Merge topic 'autorcc-depends' into next 9076e98e QtAutogen: Regenerate qrc files if their input changes (#15074) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9076e98ee35f88862e122aab970cbb5eb51b6653 commit 9076e98ee35f88862e122aab970cbb5eb51b6653 Author: Stephen Kelly steve...@gmail.com AuthorDate: Wed Sep 17 02:42:30 2014 +0200 Commit: Stephen Kelly steve...@gmail.com CommitDate: Tue Sep 23 22:32:26 2014 +0200 QtAutogen: Regenerate qrc files if their input changes (#15074) Get dependencies from the output of ``rcc --list`` if using Qt 5. Otherwise process the file in the same way as the qt4_add_resources macro. diff --git a/Modules/AutogenInfo.cmake.in b/Modules/AutogenInfo.cmake.in index 602b065..7d89420 100644 --- a/Modules/AutogenInfo.cmake.in +++ b/Modules/AutogenInfo.cmake.in @@ -1,5 +1,6 @@ set(AM_SOURCES @_cpp_files@ ) set(AM_RCC_SOURCES @_rcc_files@ ) +set(AM_RCC_INPUTS @_qt_rcc_inputs@) set(AM_SKIP_MOC @_skip_moc@ ) set(AM_SKIP_UIC @_skip_uic@ ) set(AM_HEADERS @_moc_headers@ ) diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 4e40fc7..8f1a52f 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -166,6 +166,112 @@ static std::string getAutogenTargetDir(cmTarget const* target) return targetDir; } +std::string cmQtAutoGenerators::ListQt5RccInputs(cmSourceFile* sf, +cmTarget* target, +std::vectorstd::string depends) +{ + std::string rccCommand = this-GetRccExecutable(target); + std::vectorstd::string qrcEntries; + + std::vectorstd::string command; + command.push_back(rccCommand); + command.push_back(--list); + + std::string absFile = cmsys::SystemTools::GetRealPath( + sf-GetFullPath().c_str()); + + command.push_back(absFile); + + std::string output; + int retVal = 0; + bool result = cmSystemTools::RunSingleCommand(command, output, +retVal, 0, +cmSystemTools::OUTPUT_NONE); + if (!result || retVal) +{ +std::cerr AUTOGEN: error: Rcc list process for sf-GetFullPath() +failed:\n output std::endl; +return std::string(); +} + + std::istringstream ostr(output); + std::string oline; + while(std::getline(ostr, oline)) +{ +if (oline.empty()) + { + // The output of rcc --list contains many empty lines. + continue; + } +if (cmHasLiteralPrefix(oline, RCC: Error in)) + { + static std::string searchString = Cannot find file '; + + std::string::size_type pos = oline.find(searchString); + if (pos == std::string::npos) +{ +std::cerr AUTOGEN: error: Rcc lists unparsable output + oline std::endl; +return std::string(); +} + pos += searchString.length(); + std::string::size_type sz = oline.size() - pos - 1; + qrcEntries.push_back(oline.substr(pos, sz)); + } +else + { + qrcEntries.push_back(oline); + } +} + depends.insert(depends.end(), qrcEntries.begin(), qrcEntries.end()); + std::string entriesList; + const char* sep = ; + for(std::vectorstd::string::const_iterator it = qrcEntries.begin(); + it != qrcEntries.end(); ++it) +{ +entriesList += sep; +entriesList += *it; +sep = @list_sep@; +} + return entriesList; +} + +std::string cmQtAutoGenerators::ListQt4RccInputs(cmSourceFile* sf, +std::vectorstd::string depends) +{ + const std::string qrcContents = ReadAll(sf-GetFullPath()); + + cmsys::RegularExpression fileMatchRegex((file[^]+)); + + std::string entriesList; + const char* sep = ; + + size_t offset = 0; + while (fileMatchRegex.find(qrcContents.c_str() + offset)) +{ +std::string qrcEntry = fileMatchRegex.match(1); + +offset += qrcEntry.size(); + +
[Cmake-commits] CMake branch, master, updated. v3.0.2-1911-g6bd776e
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, master has been updated via 6bd776eba6221d9ef68b63d1c17a988145f31fc1 (commit) from 069090e347078d1e3998e13e49d2d50dae013ef0 (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=6bd776eba6221d9ef68b63d1c17a988145f31fc1 commit 6bd776eba6221d9ef68b63d1c17a988145f31fc1 Author: Kitware Robot kwro...@kitware.com AuthorDate: Wed Sep 24 00:01:08 2014 -0400 Commit: Kitware Robot kwro...@kitware.com CommitDate: Wed Sep 24 00:01:08 2014 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 558481d..bf53ef4 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 0) -set(CMake_VERSION_PATCH 20140923) +set(CMake_VERSION_PATCH 20140924) #set(CMake_VERSION_RC 1) --- Summary of changes: Source/CMakeVersion.cmake |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits