[CMake] How to handle RelWithDebInfo and MinSizeRel when not built?
Hi, In Qt 5, we create CMake Config files and ship them with the Qt installation to make it possible to use Qt 5 with CMake. Qt on Windows and Mac is packaged with both a debug configuration and a release configuration, so an IMPORTED library is created with both a DEBUG location and a RELEASE location. We don't currently create a location for RelWithDebInfo or MinSizeRel, leading to this bug report: https://bugreports.qt-project.org/browse/QTBUG-29186 I checked the FindQt4 module, and it also does not create IMPORTED locations for RelWithDebInfo or MinSizeRel either, so I wonder if this issue has come up before? As I don't use Windows or Mac, I'm not really familiar with those systems or configurations, so I'm looking for some guidance on what should be done here. The suggestion in the bug report looks somewhat reasonable to me, but then again, we don't actually create separate debug info, and the 'Release' configuration would be no different to the 'RelWithDebInfo' configuration, so it's sort of a 'lie'. The real need for it though is probably that it allows the downstream of Qt to use RelWithDebInfo themselves? The alternative way to do that would be to set the MAP_IMPORTED_CONFIG* properties. I'm not sure whether I should advise that and close the bug report, or should I implement the suggested change. Any ideas? Thanks, Steve. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Using Qt5 with cmake
Hi Qt5 provides configuration files for cmake, but I haven't yet found a way to detect Qt5 as recommended in this post (I am using qt5 on Windows with Visual Studio 2010): http://www.kdab.com/using-cmake-with-qt-5/ As far as I understand cmake does not yet provide support for qt5 (at least not in 2.8.10.2). How can I add support for qt 5 in cmake ? Are there some examples of CMakeFiles for using Qt5 ? thanks Bogdan -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Using Qt5 with cmake
What is wrong about Stephen's post? It has been working for me in several projects. On Fri, Jan 18, 2013 at 3:19 PM, Bogdan Cristea crist...@gmail.com wrote: Hi Qt5 provides configuration files for cmake, but I haven't yet found a way to detect Qt5 as recommended in this post (I am using qt5 on Windows with Visual Studio 2010): http://www.kdab.com/using-cmake-with-qt-5/ As far as I understand cmake does not yet provide support for qt5 (at least not in 2.8.10.2). How can I add support for qt 5 in cmake ? Are there some examples of CMakeFiles for using Qt5 ? thanks Bogdan -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Using Qt5 with cmake
Le vendredi 18 janvier 2013 à 15:22 +, Laszlo Papp a écrit : What is wrong about Stephen's post? It has been working for me in several projects. A line like this find_package(Qt5Declarative) generates a warning about missing FindQt5Declarative.cmake which is not provided by Qt5 nor cmake. Maybe I am missing something, but I am not able to use Qt5 with cmake following that post. Bogdan -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Using Qt5 with cmake
There is also this: http://qt-project.org/doc/qt-5.0/qtdoc/cmake-manual.html Either way, check if your Qt installation ships the cmake files. Qt5 has builtin support for third-party projects from cmake point of view. On Fri, Jan 18, 2013 at 3:29 PM, Bogdan Cristea crist...@gmail.com wrote: Le vendredi 18 janvier 2013 à 15:22 +, Laszlo Papp a écrit : What is wrong about Stephen's post? It has been working for me in several projects. A line like this find_package(Qt5Declarative) generates a warning about missing FindQt5Declarative.cmake which is not provided by Qt5 nor cmake. Maybe I am missing something, but I am not able to use Qt5 with cmake following that post. Bogdan -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Using Qt5 with cmake
Bogdan Cristea wrote: Le vendredi 18 janvier 2013 à 15:22 +, Laszlo Papp a écrit : What is wrong about Stephen's post? It has been working for me in several projects. A line like this find_package(Qt5Declarative) generates a warning about missing FindQt5Declarative.cmake which is not provided by Qt5 nor cmake. Maybe I am missing something, but I am not able to use Qt5 with cmake following that post. Hi, I'm afraid the post is a little but outdated. Qt5Declarative was renamed to QtQuick1 before the Qt 5 release, so try to find that instead. I'll see about updating the blog post. Thanks, Steve. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Using Qt5 with cmake
Le vendredi 18 janvier 2013 à 15:31 +, Laszlo Papp a écrit : There is also this: http://qt-project.org/doc/qt-5.0/qtdoc/cmake-manual.html Either way, check if your Qt installation ships the cmake files. Qt5 has builtin support for third-party projects from cmake point of view. Yes, now it works. The link above is much more useful. Bogdan -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Implicit toolchain file usage
On Thu, Jan 17, 2013 at 8:43 PM, Alexander Neundorf a.neundorf-w...@gmx.net wrote: On Thursday 17 January 2013, Laszlo Papp wrote: On Thu, Jan 17, 2013 at 8:31 PM, Alexander Neundorf a.neundorf-w...@gmx.net wrote: do you mean using -DCMAKE_SYSTEM_NAME=qnx should trigger something ? Don't know, my experience is that cross compiling environments usually vary a lot in their setup. *Current* cmake -DCMAKE_TOOLCHAIN_FILE=../frontends/blackberry/cmake/Toolchain-QNX-8.0.0.c make -DBUILD_WIKIREADER_BLACKBERRY=ON .. == *Proposed* cmake -DBUILD_WIKIREADER_BLACKBERRY=ON .. and ../CMakeListst.txt: set_toolchain_file(../frontends/blackberry/cmake/Toolchain-QNX-8.0.0.cmake ) This is pseudo code, but you get my point, don't you? It would be shorter for the developer, packager or user to use cmake. Can you attach your toolchain file here so we can have a look ? http://quickgit.kde.org/?p=scratch%2Flpapp%2Fwikireader.gita=blobh=2e3e19 7590bfdce77ae282be840d7b167afafb94hb=7bf46fccfa4c087500a12116588e071b1183b 4e7f=frontends%2Fblackberry%2Fcmake%2FToolchain-QNX-8.0.0.cmake oh, this is definitely more than what should be necessary. Why do you have to set all the suffixes and prefixes ? I will clean it up later once the project works for an initial release. This should go into Platforms/QNX.cmake. Manually setting CMAKE_AR etc. should also not be necessary, this should also go into QNX.cmake or QNX-qcc.cmake or somewhere like this. Feel free to get anything upstreamed from my file. The specific build flags are your choice. I see. It means I can avoid the -DCMAKE_TOOLCHAIN_FILE in the end of the day. Thank you for your reply. Laszlo -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Using Qt5 with cmake
Le vendredi 18 janvier 2013 à 16:36 +0100, Stephen Kelly a écrit : I'm afraid the post is a little but outdated. Qt5Declarative was renamed to QtQuick1 before the Qt 5 release, so try to find that instead. I'll see about updating the blog post. Hi I think that what is missing is this (taken from cmake manual of Qt5) The easiest way to use CMake is to set the CMAKE_PREFIX_PATH environment variable to the install prefix of Qt 5. regards Bogdan -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to handle RelWithDebInfo and MinSizeRel when not built?
The suggestion in the bug report looks somewhat reasonable to me, but then again, we don't actually create separate debug info, and the 'Release' configuration would be no different to the 'RelWithDebInfo' configuration, so it's sort of a 'lie'. The real need for it though is probably that it allows the downstream of Qt to use RelWithDebInfo themselves? The alternative way to do that would be to set the MAP_IMPORTED_CONFIG* properties. I'm not sure whether I should advise that and close the bug report, or should I implement the suggested change. Any ideas? As a windows programmer who regularly uses CMake generated RelWithDebInfo targets with Qt4 since 2008 I believe the behavior of using the Release versions for RelWithDebugInfo is fine (and actually preferred for me). If I need to debug deeply into a Qt problem I will switch to use the Debug build however most of the time for itk or vtk I want to use RelWithDebInfo to debug since these tend to be slow to Debug in Debug mode that is when I use dicom images that are similar resolution to what my programs typically use. John -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Using Qt5 with cmake
On Friday 18 January 2013, Bogdan Cristea wrote: Le vendredi 18 janvier 2013 à 15:22 +, Laszlo Papp a écrit : What is wrong about Stephen's post? It has been working for me in several projects. A line like this find_package(Qt5Declarative) generates a warning about missing FindQt5Declarative.cmake which is not provided by Qt5 nor cmake. Maybe I am missing something, but I am not able to use Qt5 with cmake following that post. It should also warn you that you used neither the MODULE nor the NO_MODULE option (if your cmake is recent enough). When using find_package() like you do, it first searches for a FindQt5Decl.cmake, and if it doesn't find one, it continues to search for a Qt5DeclConfig.cmake in a bunch of directories. Qt5 installs Config.cmake files, so you should use find_package(Qt5Decl CONFIG) or find_package(Qt5Decl NO_MODULE) to make obvious what you are searching for. So, it seems cmake did not find a Qt5DeclarativeConfig.cmake nor a Qt5Declarative-config.cmake file on your system. Does such a file exist ? If yes, you need to adjust the environment variable CMAKE_PREFIX_PATH to point to the install prefix of Qt5. Alex -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] CPACK and cmake install(targets
Hi, I try to package a built shared library on windows. In the CMAKE file for where the dll and import lib is created I have install(TARGETS ${target} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT rr_core ) When executing the install target in my projet, the dll goes to the bin folder and the lib goes to the lib folder. That is all good. But when running CPACK only the .lib file is packaged, and not the DLL. Why?? Thanks, Totte -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CPACK and cmake install(targets
2013/1/18 Totte Karlsson to...@dunescientific.com: Hi, I try to package a built shared library on windows. In the CMAKE file for where the dll and import lib is created I have install(TARGETS ${target} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT rr_core ) When executing the install target in my projet, the dll goes to the bin folder and the lib goes to the lib folder. That is all good. But when running CPACK only the .lib file is packaged, and not the DLL. Why?? May be because you are doing component packaging and that the COMPONENT part of install(TARGETS should be repeated for each DESTINATION. i.e. install(TARGETS ${target} RUNTIME DESTINATION bin COMPONENT rr_core LIBRARY DESTINATION lib COMPONENT rr_core ARCHIVE DESTINATION lib COMPONENT rr_core ) -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1646-g153a6aa
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 153a6aa18909b68b3beb507b438934e298764616 (commit) via 3d4e64fb38334ff328baabe81a8c314620120ac7 (commit) from a5862cbf6c95318fdeca5b6a3e71911a9eca891d (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=153a6aa18909b68b3beb507b438934e298764616 commit 153a6aa18909b68b3beb507b438934e298764616 Merge: a5862cb 3d4e64f Author: Stephen Kelly steve...@gmail.com AuthorDate: Fri Jan 18 04:03:07 2013 -0500 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Fri Jan 18 04:03:07 2013 -0500 Merge topic 'qt4-autolink-qtmain' into next 3d4e64f Only include qtmain on WIN32. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3d4e64fb38334ff328baabe81a8c314620120ac7 commit 3d4e64fb38334ff328baabe81a8c314620120ac7 Author: Stephen Kelly steve...@gmail.com AuthorDate: Fri Jan 18 07:35:26 2013 +0100 Commit: Stephen Kelly steve...@gmail.com CommitDate: Fri Jan 18 07:35:26 2013 +0100 Only include qtmain on WIN32. diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index a40ceb0..35420b4 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -1062,7 +1062,7 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION) _qt4_add_target_private_depends(phonon DBus) endif() - if (NOT QT4_NO_LINK_QTMAIN) + if (WIN32 AND NOT QT4_NO_LINK_QTMAIN) set(_isExe $STREQUAL:$TARGET_PROPERTY:TYPE,EXECUTABLE) set(_isWin32 $BOOL:$TARGET_PROPERTY:WIN32_EXECUTABLE) set(_isNotExcluded $NOT:$BOOL:$TARGET_PROPERTY:QT4_NO_LINK_QTMAIN) --- Summary of changes: Modules/FindQt4.cmake |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1650-gea7b519
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 ea7b519b76b90199f3ba918dc86ef83d3d292c5f (commit) via f447db7f102519e09258f0bd06668a9ae572ec68 (commit) via c482dd8c976847ac89ed5e8752924a2c0ed386fa (commit) via 2b5459cd1a4f39ceeecd895583423ce737beb919 (commit) from 153a6aa18909b68b3beb507b438934e298764616 (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=ea7b519b76b90199f3ba918dc86ef83d3d292c5f commit ea7b519b76b90199f3ba918dc86ef83d3d292c5f Merge: 153a6aa f447db7 Author: Robert Maynard robert.mayn...@kitware.com AuthorDate: Fri Jan 18 11:57:28 2013 -0500 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Fri Jan 18 11:57:28 2013 -0500 Merge topic 'xcode-duplicate-flags-13354' into next f447db7 XCode generator won't infinitely parse compiler flags (bug #13354). c482dd8 CMake Nightly Date Stamp 2b5459c CMake Nightly Date Stamp http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f447db7f102519e09258f0bd06668a9ae572ec68 commit f447db7f102519e09258f0bd06668a9ae572ec68 Author: Robert Maynard robert.mayn...@kitware.com AuthorDate: Fri Jan 18 11:29:22 2013 -0500 Commit: Robert Maynard robert.mayn...@kitware.com CommitDate: Fri Jan 18 11:55:50 2013 -0500 XCode generator won't infinitely parse compiler flags (bug #13354). When parsing the compiler flag list we reduce the search space on each iteration to be the subset of the string we hadn't searched before. diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 2cfe4da..0681ce5 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1367,16 +1367,18 @@ void cmGlobalXCodeGenerator::CreateCustomCommands(cmXCodeObject* buildPhases, } // -// This function removes each occurence of the flag and returns the last one +// This function removes each occurrence of the flag and returns the last one // (i.e., the dominant flag in GCC) std::string cmGlobalXCodeGenerator::ExtractFlag(const char* flag, std::string flags) { std::string retFlag; - std::string::size_type pos = flags.rfind(flag); + std::string::size_type lastOccurancePos = flags.rfind(flag); bool saved = false; - while(pos != flags.npos) + while(lastOccurancePos != flags.npos) { +//increment pos, we use lastOccurancePos to reduce search space on next inc +std::string::size_type pos = lastOccurancePos; if(pos == 0 || flags[pos-1]==' ') { while(pos flags.size() flags[pos] != ' ') @@ -1388,9 +1390,12 @@ std::string cmGlobalXCodeGenerator::ExtractFlag(const char* flag, flags[pos] = ' '; pos++; } - } saved = true; - pos = flags.rfind(flag); + } +//decrement lastOccurancePos while making sure we don't loop around +//and become a very large positive number since size_type is unsigned +lastOccurancePos = lastOccurancePos == 0 ? 0 : lastOccurancePos-1; +lastOccurancePos = flags.rfind(flag,lastOccurancePos); } return retFlag; } --- Summary of changes: Source/CMakeVersion.cmake |2 +- Source/cmGlobalXCodeGenerator.cxx | 15 ++- 2 files changed, 11 insertions(+), 6 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, master, updated. v2.8.10.2-477-g5e57261
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 5e572619c67c5ba38a68179111f7dea9648690ab (commit) from c482dd8c976847ac89ed5e8752924a2c0ed386fa (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=5e572619c67c5ba38a68179111f7dea9648690ab commit 5e572619c67c5ba38a68179111f7dea9648690ab Author: Kitware Robot kwro...@kitware.com AuthorDate: Sat Jan 19 00:01:19 2013 -0500 Commit: Kitware Robot kwro...@kitware.com CommitDate: Sat Jan 19 00:01:19 2013 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 73e99df..487d456 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,5 +2,5 @@ set(CMake_VERSION_MAJOR 2) set(CMake_VERSION_MINOR 8) set(CMake_VERSION_PATCH 10) -set(CMake_VERSION_TWEAK 20130118) +set(CMake_VERSION_TWEAK 20130119) #set(CMake_VERSION_RC 1) --- Summary of changes: Source/CMakeVersion.cmake |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits