Re: [CMake] Can't Remove CXX_FLAGS entry

2013-10-30 Thread Stephen Kelly
Yngve Inntjore Levinsen wrote: Hi, Have a look at the very silly hello world example attached. As I think you mentioned, the cmake way to do this is to have targets with specific flags in separate folders. The CMake 2.8.12 way to do this is to use target_compile_options(). Then you can

Re: [CMake] Proper way to export a library

2013-10-31 Thread Stephen Kelly
Cyrille Faucheux wrote: Ok, great. Can you tell me a bit more about implicit compile flags [...] for imported tagets? On the library I'm currently working on, with Visual Studio, I have to declare some compile definition in order to get the proper __declspec(dllimport) or

Re: [CMake] CTest - Speed Optimization

2013-10-31 Thread Stephen Kelly
Alexander Neundorf wrote: On Thursday 31 October 2013, Olaf Ryder wrote: Greetings, I'm looking for ways to speed up CTest runs (the Experimental target). It would appear the majority of the time is spent during the build step. 1) What exactly is happening during the Experimental build

[CMake] Modern CMake with Qt and Boost

2013-11-13 Thread Stephen Kelly
Hello, Last week I gave a talk at a C++ conference in Germany about 'modern CMake', which is approximately 'CMake with usage requirements'. I wrote a blog post with the slides and explanation here: http://www.kdab.com/modern-cmake-with-qt-and-boost/ Thanks, Steve. -- Powered by

Re: [CMake] cross compiling - CMAKE_FIND_ROOT_PATH_MODE_LIBRARY and link.txt

2013-11-15 Thread Stephen Kelly
Jack Smith wrote: Hello, I'm confused by an issue that I am having with a project I have recently joined. You might consider trying my cross-compiling-toolchain-variables branch in the git repo. Thanks, Steve. -- Powered by www.kitware.com Please keep messages on-topic and check the

Re: [CMake] Inserting a dependency before Qt moc is run

2013-11-17 Thread Stephen Kelly
Aurélien Gâteau wrote: I defined a custom command to generate the .json Why a custom target? Wouldn't it make sense to generate the json file at CMake-configure time using execute_process? The desktop file is not generated. If that is possible, it 'makes the problem go away'. However, I

Re: [CMake] Inserting a dependency before Qt moc is run

2013-11-18 Thread Stephen Kelly
Aurélien Gâteau wrote: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ae016fa8a Thanks, how would one make use of this change if it gets in? I've reverted it for now as it breaks the KF5 build. Usage would be add_custom_target(cust ...) set_property(TARGET gwenviewPlugin1

Re: [CMake] Make CMAKE_EXPORT_COMPILE_COMMANDS not default?

2013-12-08 Thread Stephen Kelly
Alexander Neundorf wrote: It sounds to me a bit more like it should be an additional extra generator, i.e. generate makefiles/ninja files and additionally this json file. Hmm, the first thing I thought when I saw your kate project feature was that it should be implemented more like

Re: [CMake] Cannot set CMP0022 to OLD

2013-12-13 Thread Stephen Kelly
Andreas Pakulat wrote: I'm using CMake 2.8.12.1 here and was wondering wether anybody else run into this already? I've tried to come up with a small example, but can't seem to get it to trigger the CMP warning at all. An example shows that it works for me too. What prevents you from reducing

Re: [CMake] Cannot set CMP0022 to OLD

2013-12-14 Thread Stephen Kelly
Andreas Pakulat wrote: Anyway, I've now stripped it down as much as I can (without diving into the wilderness of FindKDE4Internal) and also added the observations I've made while stripping it. So its definetly somewhat related to the magics that the KDE4 module does. It's related to the

Re: [CMake] Cannot set CMP0022 to OLD

2013-12-14 Thread Stephen Kelly
Stephen Kelly wrote: Your options are: Option 3 is to depend on CMake 2.8.9+ and port away from the use of target_link_libraries with LINK_INTEFACE_LIBRARIES and use LINK_PUBLIC and LINK_PRIVATE instead: @@ -17,10 +18,9 @@ cmake_policy(SET CMP0022 OLD) kde4_add_library(sublime SHARED

Re: [CMake] missing -rpath-link flag

2014-01-02 Thread Stephen Kelly
Clinton Stimpson wrote: I have an example (attached) The example becomes more readable and easier to reason about by applying this patch: diff --git a/CMakeLists.txt b/CMakeLists.txt index 89a415d..15bfb46 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,5 @@

Re: [CMake] qt4_wrap_cpp: questions about TARGET option

2014-01-14 Thread Stephen Kelly
David Demelier wrote: Hello folks, I had a question a long time ago about the qt4_wrap_cpp and the target_include_directories commands. To explain the problem, I wanted to use target_include_directories to add include directories to dependent target easier. However I really wanted to

Re: [CMake] Announcing CMake BASIS, a set of CMake based project interoperability and automation tools

2014-01-22 Thread Stephen Kelly
Andrew Hundt wrote: CMake BASIS is a set of utilities and standards created with the goal of making CMake projects and libraries very easy to create, share, and reuse. Hello, There seems to be several years of development behind this already. Is it newly public, or newly publicized? I've

Re: [CMake] Announcing CMake BASIS, a set of CMake based project interoperability and automation tools

2014-01-23 Thread Stephen Kelly
Andrew Hundt wrote: Website: http://opensource.andreasschuh.com/cmake-basis/index.html GitHub: https://github.com/schuhschuh/cmake-basis/ The repo is surprisingly large (67 mb) for something like this. I consider such large files in a git repo to be bad practice. This is just the first

Re: [CMake] Announcing CMake BASIS, a set of CMake based project interoperability and automation tools

2014-01-23 Thread Stephen Kelly
Andreas Schuh wrote: How often have you seen CMake code as the following add_executable(foo foo.cpp) ? I see executables with a single source file only in dummy test code, and even then add_executable(foo main.cpp) is more common. The basis_add_executable supports this use case as

Re: [CMake] Announcing CMake BASIS, a set of CMake based project interoperability and automation tools

2014-01-23 Thread Stephen Kelly
Andreas Schuh wrote: Yes, that's what I was referring to. I see why you have it. I'm not convinced it should be upstreamed. I guess most people can live with defining a CMake macro for it if they want to. I thought it might make sense for unit tests, but something else generally introduces

Re: [CMake] Announcing CMake BASIS, a set of CMake based project interoperability and automation tools

2014-01-23 Thread Stephen Kelly
Andreas Schuh wrote: On Jan 23, 2014, at 1:11 PM, Andreas Schuh andreas.schuh...@gmail.com wrote: On Jan 23, 2014, at 9:40 AM, Stephen Kelly steve...@gmail.com wrote: Another example: You have code for adding scripts as executables. What are the generic (non-BASIS related) use cases

Re: [CMake] Announcing CMake BASIS, a set of CMake based project interoperability and automation tools

2014-01-24 Thread Stephen Kelly
There seems to be some mailing list problems going on (maybe Andrew didn't subscribe before posting... :/ Always subscribe to a mailing list before posting...), and my reply was rejected. Breaking threading to respond. On 01/23/2014 07:32 PM, Andrew Hundt wrote: Allow me to rephrase, could

Re: [CMake] Announcing CMake BASIS, a set of CMake based project interoperability and automation tools

2014-01-24 Thread Stephen Kelly
Roger Leigh wrote: On Thu, Jan 23, 2014 at 10:40:54AM +0100, Stephen Kelly wrote: Andreas Schuh wrote: On a side note, just today a co-worker asked me why the compiler cannot find the header files when they were provided as additional arguments to the add_executable command. Indeed

Re: [CMake] Using Qt5 with CMake

2014-01-26 Thread Stephen Kelly
Michael Jackson wrote: Any help would be much appreciated. I assume you have read http://doc-snapshot.qt-project.org/qt5-stable/cmake-manual.html and you need more help. What help do you need specifically? Thanks, Steve. -- Powered by www.kitware.com Please keep messages on-topic

Re: [CMake] Custom Commands Generator Expressions

2014-01-29 Thread Stephen Kelly
Steven Wilson wrote: \$1:strip -u -r customcommandtest Note the \$1:strip -u -r customcommandtest output from the generator expression. What do I need to change in the POST_BUILD custom command to make the generator expression work correctly? The generator expression stops parsing at

Re: [CMake] retrieving and manipulating (Fortran) dependency information

2014-02-03 Thread Stephen Kelly
Zaak Beekman wrote: (I am trying to setup flymake targets for emacs which don't (re)compile anything, but rather run the compilers with the compile time warning flags and -syntax-only flags. Modules and dependency resolution in Fortran is the main impediment here and if I can come up with a

Re: [CMake] include_directories(...) versus set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ...)

2014-02-04 Thread Stephen Kelly
David Cole wrote: That's just the quick brain dump version. If necessary, I can actually look at old commits, or the current code to try to refresh my memory. I think that's needed. Can you do that research into the commits and discussion? Thanks, Steve. -- Powered by www.kitware.com

Re: [CMake] Determining appropriate CMAKE_MINIMUM_REQUIRED

2014-02-06 Thread Stephen Kelly
Alan W. Irwin wrote: I assume you could do that by including a common file in each of your subprojects, but I have never had to do that (my project only has two calls to cmake_minimum_required which are easy to keep in synch manually) so I will let others comment on details of the

Re: [CMake] Method to get effective include_directories and compile_definitions

2014-02-10 Thread Stephen Kelly
Lars Christensen wrote: Hello, Is there a way to get the effective include directories and compile definitions for a target, including those specified at the directory level and any INTERFACE_INCLUDE_DIRECTORIES and INTERFACE_COMPILE_DEFINITION on targets that are required via

Re: [CMake] install TARGETS given unknown argument EXPORT. with cmake 2.8.9

2014-02-18 Thread Stephen Kelly
david.hag...@gmail.com wrote: Does anybody have any suggestions on how to resolve this? Create an http://www.sscce.org/ and post it so that others can try what fails for you. Thanks, Steve. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at:

Re: [CMake] install TARGETS given unknown argument EXPORT. with cmake 2.8.9

2014-02-20 Thread Stephen Kelly
david.hag...@gmail.com wrote: install(TARGETS foo RUNTIME DESTINATION bin LIBRARY DESTINATION lib EXPORT foo-targets ) The order of arguments is wrong. Move the 'EXPORT foo-targets' to just after 'TARGETS foo'. I don't know if this is a behavior change since the wiki was written, but

Re: [CMake] [PATCH] Fix for CMakeFindDependencyMacro.cmake

2014-02-24 Thread Stephen Kelly
Aurélien Gâteau wrote: Hi, The find_dependency() macro defined in CMakeFindDependencyMacro.cmake has a bug which makes it reuse the version number used in a previous call in certain situation. Already fixed in master by Alex Merry. Thanks, Steve. -- Powered by www.kitware.com Please

Re: [CMake] QT4_CREATE_TRANSLATION delete source ts files during clean

2014-02-26 Thread Stephen Kelly
Anatoly Shirokov wrote: Guys! I have fixed bug related to delete translation (ts) file during clean (someone meet the same problem here http://cmake.3232098.n2.nabble.com/How-to-not-delete-generated-files-on-make-clean-td4425991.html) I agree with the point that Hendrik Sattler makes that

Re: [CMake] QT4_CREATE_TRANSLATION delete source ts files during clean

2014-02-26 Thread Stephen Kelly
Anatoly Shirokov wrote: The translation file is usual source file, it is not binary artifact. I didn't say it was a binary artifact. It's a buildsystem artifact created by your buildsystem. The only difference is that I have to support them in up to date state with the lupdate utility.

Re: [CMake] CMake 3.0-rc1 now ready for testing!

2014-03-03 Thread Stephen Kelly
Hendrk Sattler wrote: 2. The CMP0043 descriptions only mentions target specific solutions. I extended the sample code with a directory property too. In the description of add_definitions(), it is mentioned: Arguments to add_definitions may use “generator expressions” with the

Re: [CMake] OBJECT libraries and dependencies

2014-03-04 Thread Stephen Kelly
Leif Walsh wrote: What would be wonderful is if CMake could track dependencies for OBJECT libraries the same way it tracks them for STATIC libraries. Is this planned somewhere? Does it already exist in a property I haven't seen yet? Much of this is tracked here:

Re: [CMake] OBJECT libraries and dependencies

2014-03-04 Thread Stephen Kelly
Leif Walsh wrote: This looks like probably what I want, though I need to sit down and read the whole thread carefully. What's the timeline for this? Anything in particular blocking it? Any way I can help? One of the reasons it is not already possible to link to object libraries is to

Re: [CMake] CMake + Qt5LinguistToolsMacros.cmake: QT5_CREATE_TRANSLATION delete source ts files during clean

2014-03-04 Thread Stephen Kelly
Anatoly Shirokov wrote: Guys! What is the next step? What should I do to merge my patch to QTx_CREATE_TRANSLATION? It seems that creating translation files from the buildsystem does not suit your workflow. Maybe you shouldn't use the buildsystem for that, for the same reason it is a bad

Re: [CMake] Using Qt5 with CMake

2014-03-12 Thread Stephen Kelly
Alan W. Irwin wrote: (1) How should you replace find_package(Qt4 4.8.2 COMPONENTS QtCore QtGui QtSvg) find_package(Qt5 5.2.1 COMPONENTS Svg) or find_package(Qt5Svg 5.2.1) Packages and targets know their dependencies so you don't have to. and qt4_wrap_cpp( QT_MOC_OUTFILES

Re: [CMake] Using Qt5 with CMake

2014-03-12 Thread Stephen Kelly
Alan W. Irwin wrote: Packages and targets know their dependencies so you don't have to. Your statement appears to imply that QtSvg has a QtGui (and QtCore) dependency so I don't have to worry about those other components. Correct. I suggest you create a project for experimentation such as

Re: [CMake] Trouble exporting a library that is linked to Qt5

2014-04-18 Thread Stephen Kelly
Alan W. Irwin wrote: Can anyone explain what is going wrong here? For example, do I have to do something extra (i.e., something not required for Qt4) to get libplplot exported properly when it links to Qt5? Even when using Qt 4 you will find the same behavior if you use the imported targets

Re: [CMake] --find-package option fails with some of the Qt5 components

2014-04-23 Thread Stephen Kelly
Alan W. Irwin wrote: Hi Steve: PLplot not only CMake exports its libraries but also provides library information in pkg-config form for our users that prefer that form. Therefore, for this component of our install I need to collect explicit compile and link flags for Qt5, and it appears to

Re: [CMake] target_include_directories and relative paths inside generator expressions.

2014-04-24 Thread Stephen Kelly
Andrew Fuller wrote: It seems absolute paths are necessary. eg: target_include_directories( MyTarget PRIVATE $$PLATFORM_ID:Linux:${CMAKE_CURRENT_SOURCE_DIR}/some/dir ) will perform as expected. Is this behaviour expected (and should be documented) or should I file a bug? CMake

Re: [CMake] install(QUIET ...)

2014-06-13 Thread Stephen Kelly
Stefan Eilemann wrote: On 13. Jun 2014, at 5:09, J Decker d3c...@gmail.com wrote: Did this make it to 3.0 release? Could it have been implemented as more of a global flag so I don't have to modify every single install() I have? A global flag was not implemented, but would be a nice

Re: [CMake] Source List Compilation Depending on Configuration

2014-07-21 Thread Stephen Kelly
Jörg Kreuzberger wrote: Is there an easy way to handle this? Try a nightly build: http://www.cmake.org/files/dev/?C=M;O=D And a generator expression: http://www.cmake.org/cmake/help/v3.0/manual/cmake-generator-expressions.7.html add_library(mylib bar.cpp $$CONFIG:Debug:foo.cpp )

Re: [CMake] Considering contributing a FindPyQt.cmake module

2014-07-21 Thread Stephen Kelly
Scott Kitterman wrote: Given the above, I thought it would make sense to provide a new FindPyQt.cmake that would replace (and be backward compatible with) FindPyQt4.cmake that would work for both the new and old PyQt4 configure and with PyQt5 and have it be actually in CMake so that there

Re: [CMake] Dependency paths in CMake package config files

2014-10-05 Thread Stephen Kelly
Ruslan Baratov via CMake wrote: So my question is, in general, how can I make installabled static libraries with a package config file? Or is the trying to redistribute static libraries a bad idea in the first place? It's not related to static/shared, this is about absolute path. If you

Re: [CMake] Qt5 + cmake 3.0

2014-10-25 Thread Stephen Kelly
Scott Aron Bloom wrote: I have minimized the project to a simple testcase that will represent the problem, and it still exists. You didn't attach it, right? In this file, I previously called include( ${QT_USE_FILE} ) to make sure the necessary include paths were setup correctly However, for

Re: [CMake] Is this the proper way to define a package config?

2014-10-25 Thread Stephen Kelly
Robert Dailey wrote: What is the Filters target here? How is it created? Would I just create a target called Boost and configure it as needed? You've read http://www.cmake.org/cmake/help/v3.0/manual/cmake-packages.7.html#creating-packages right? Thanks, Steve. -- Powered by

Re: [CMake] Is this the proper way to define a package config?

2014-10-26 Thread Stephen Kelly
Robert Dailey wrote: I've skimmed over it, but I haven't seen anything useful in that section. Maybe you can point out what exactly I'm supposed to use from that? Someone has already stated that I should use a find module and not define a package config since I'm not the maintainer of

Re: [CMake] CMP0020 warning

2014-10-28 Thread Stephen Kelly
Scott Aron Bloom wrote: The warning message for CMP0020 seems to be completely random as to where you actually have to set the policy. Im not getting the warning on my main executables, but cant seem to get rid of it on any of my Qt based unittests (using gmock/gtest ) I have the

Re: [CMake] Is there really no way in CMake to retrieve the objects file for a target?

2014-10-28 Thread Stephen Kelly
Emmanuel Blot wrote: This seems so convoluted that I guess I'm missing the proper way to properly add an intermediate step between the compilation and link stages, but I keep failing to find any useful advice from Google and the mailing list. It's probably not possible cleanly. Generator

Re: [CMake] can I make an AUTOMOC generated file depend on something ?

2014-11-17 Thread Stephen Kelly
Martin Koller wrote: What rules can I add so that the tar extraction is done BEFORE the moc generation ? You can add depends in the AUTOGEN_TARGET_DEPENDS target property of particular targets. http://www.cmake.org/cmake/help/v3.0/prop_tgt/AUTOGEN_TARGET_DEPENDS.html Please try that out.

Re: [CMake] library dependcies and add_library(OBJECT)

2014-11-17 Thread Stephen Kelly
avo...@mail.ru wrote: What should I add to B/CMakeLists.txt to successfully build my executable? You might be able to add an INTERFACE library and populate its INTERFACE_SOURCES using the target_sources command: http://www.cmake.org/cmake/help/v3.1/command/target_sources.html

Re: [CMake] Generic XML output file of project heirarchy

2014-11-18 Thread Stephen Kelly
Michael Jackson wrote: Has there ever been any interest in CMake producing a generic XML (or some other file format) file that lays out the project structure? See http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10711 Thanks, Steve. -- Powered by www.kitware.com Please

Re: [CMake] Generic XML output file of project heirarchy

2014-11-18 Thread Stephen Kelly
Michael Jackson wrote: Yep, that is pretty much the discussion that I was wanting. Now, has there been any movement on any of the implementations? Nothing is reported beyond that thread. If you want to pick up the implementation or a creator patch, I'd say go ahead. Thanks, Steve. --

Re: [CMake] CMake can't find Boost versions 1.55

2014-11-19 Thread Stephen Kelly
Robert Ramey wrote: The module FindBoost is quite elaborate. Unfortunately it seems to depend upon searching for specific version numbers found in a list. This list only goes up to 1.55 so it can't find later versions of Boost. Better would be to eliminate the list so module doesn't

Re: [CMake] empty CMAKE_CXX_KNOWN_FEATURES in cmake 3.1.0-rc2

2014-11-20 Thread Stephen Kelly
Erik Sjölund wrote: CMAKE_CXX_KNOWN_FEATURES seems to be empty in cmake 3.1.0-rc2 Should it be? Yes, it's not a variable, but a global property: get_property(cxx_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES) message(known: ${cxx_features}) Thanks, Steve. -- Powered by

Re: [CMake] BUILD_INTERFACE genex used even in install(EXPORT...

2014-11-25 Thread Stephen Kelly
Mueller-Roemer, Johannes Sebastian wrote: produces a file containing: IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE ${Boost_COROUTINE_LIBRARY_RELEASE} You need to make sure policy CMP0022 is NEW for the BUILD_INTERFACE to be handled correctly. Unfortunately there is no warning in this case.

Re: [CMake] Using CMAKE_CXX_KNOWN_FEATURES

2014-11-25 Thread Stephen Kelly
Andrew Maclean wrote: Is this a reasonable approach to using cx_11 features on multiple platforms? The issue is that I think you need to manually select the MSVC compiler version that supports these features target_compile_features only works for gcc. Correct, I'm no confident I can maintain

Re: [CMake] BUILD_INTERFACE genex used even in install(EXPORT...

2014-11-25 Thread Stephen Kelly
Mueller-Roemer, Johannes Sebastian wrote: It appears that wasn't really the issue, but rather that I had my CMake minimum version set to 2.8.11 and not 2.8.12. See the reply from Nils and the documentation link I posted previously. Is there a cleaner solution for the debug and optimized

Re: [CMake] BUILD_INTERFACE genex used even in install(EXPORT...

2014-11-25 Thread Stephen Kelly
Mueller-Roemer, Johannes Sebastian wrote: For clarification: As an imported target can't have debug and optimized keywords, I can't simply use $BUILD_INTERFACE:${Boost_LIBRARIES} $INSTALL_INTERFACE:\${Boost_LIBRARIES} But have to do $BUILD_INTERFACE: $$CONFIG:Debug: ... Yes, but for the

Re: [CMake] Creating a library from subdirectories

2014-11-26 Thread Stephen Kelly
Chris Johnson wrote: * I do not want to use the add_library(component1 OBJECT ${component1_sources}) and add_library(toplevel $TARGET_OBJECTS:component1 ... ) syntax if it can be avoided. Is the constraint that you want a top-level something like # All components: set(components

Re: [CMake] How to set path to library header files?

2014-12-03 Thread Stephen Kelly
Chris Johnson wrote: That seems to imply the top-level source is not part of the default include path, correct? Correct. CMake doesn't add anything by default. The only defaults are those provided by the compiler. -- Powered by www.kitware.com Please keep messages on-topic and check the

Re: [CMake] How to set path to library header files?

2014-12-03 Thread Stephen Kelly
Chris Johnson wrote: Yes, by adding another directory between my top-level ./src/ directory and ./mylib, I can cause the example to fail. I understand now that the include_directory() directive really has no hidden intelligence to it at all, as I had mistakenly believed. It's just a path.

Re: [CMake] How to set path to library header files?

2014-12-03 Thread Stephen Kelly
Angeliki Chrysochou wrote: Hi Bill, He wrote Note also that prog.cpp includes this header via #include myfunc.h. in his first email, so I thought he wants to include it directly. See his second email. Thanks, Steve. -- Powered by www.kitware.com Please keep messages on-topic

Re: [CMake] How to set path to library header files?

2014-12-03 Thread Stephen Kelly
Domen Vrankar wrote: I've started solving this a while ago with treating every library as an external dependency even if it is part of the same repository as the code for the executable. For every new library that I write I also write a FindSomeLib.cmake Much of what you describe should not

Re: [CMake] unexpected behavior with TARGET_FILE_DIR and Visual Studio 2010

2014-12-06 Thread Stephen Kelly
Michael Ellery wrote: Can anyone offer advice? Is this how the visual studio generator works or is this possibly a bug in CMake? I'm not very familiar with that generator. It looks like a bug to me too though. Thanks, Steve. -- Powered by www.kitware.com Please keep messages on-topic

Re: [CMake] CMake Tools for Visual Studio 1.3 RC1 Available

2014-12-30 Thread Stephen Kelly
David Golub wrote: I've made available the first release candidate of CMake Tools for Visual Studio 1.3, which adds support for CMake 3.1 and IntelliSense for generator expressions. As usual, it's available from the project web site at http://cmaketools.codeplex.com. Enjoy! Are you aware

Re: [CMake] Help with Policy CMP0026 (disallow LOCATION target property)

2014-12-30 Thread Stephen Kelly
Fraser Hutchison wrote: Alternatively, you can tell CMake to allow the use of the LOCATION target property by setting the relevant policy to use the old behaviour temporarily Please don't do that. Please don't encourage others to do it either. Policies are not feature toggles.

Re: [CMake] Invoke-Build support

2014-12-30 Thread Stephen Kelly
Nagy-Egri Máté Ferenc via CMake wrote: I wasn’t hoping for much enthusiasm, but at least some feedback would be welcome. Am I making any sense here? Would such work be completely useless? On the issue of parallelism, jom builds in parallel using NMake makefiles. Apart from that, discussion

Re: [CMake] Help with Policy CMP0026 (disallow LOCATION target property)

2014-12-30 Thread Stephen Kelly
Paul Smith wrote: I've thought about many ways to do this, but I can't seem to get around the fact that generator expressions like $TARGET_FILE... are only available within the commands of the target. It would probably help to have an sscce to experiment with. Thanks, Steve. -- Powered

Re: [CMake] Workaround for CMP0026

2015-02-04 Thread Stephen Kelly
NoRulez wrote: Hello, currently I'm updating my CMake scripts to use newer features and/or to solve some old workarounds. I think you're looking for file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dirInstallScript.cmake CONTENT if (CMAKE_INSTALL_CONFIG_NAME STREQUAL

Re: [CMake] Workaround for CMP0026

2015-02-05 Thread Stephen Kelly
NoRulez wrote: Thank you for your help. I think that for the replacement there is some missing documentation outstanding, because i didn't find the TYPE attribute in the file function for example. I copied and modifier the content from a generated cmake_install.cmake script. The

Re: [CMake] CMP0026 - Disallow use of the LOCATION target property

2015-02-06 Thread Stephen Kelly
Jifeng ZHANG wrote: Hi, I have a question of policy CMP0026. Our project currently is on CMake 2 and we are planning to move to CMake 3. Lot's of questions on that lately. Someone opened the floodgates it seems :). When we run CMake3.1.1, we get get a few warnings due to the policy

Re: [CMake] Mixed linking

2015-02-06 Thread Stephen Kelly
Norbert Pfeiler wrote: But I just don't know how to include the plugins. Actually, I always get the error about the platform plugin (cocoa in my case). Any tips ? For Windows it’s like this: #if defined(Q_OS_WIN) defined(QT_STATIC) #include QtPlugin

Re: [CMake] Not hardcoding install dir in Config.cmake.

2015-02-08 Thread Stephen Kelly
Chris Dembia wrote: Hey all: I work on a project that is used heavily on Windows. Our project also creates a Config.cmake file. During build time, we do not know where the project will actually be installed on the user's system. However, the Config.file needs to know the installation

Re: [CMake] target_link_libraries replacing fully-qualified library with -lx

2015-01-29 Thread Stephen Kelly
Chris Green wrote: this library is found with find_library as part of a config.cmake file invoked as part of find_package() Consider reading http://www.cmake.org/cmake/help/v3.1/manual/cmake-packages.7.html at some point. find_library and config files don't go together. Thanks, Steve.

Re: [CMake] automoc autorcc

2015-01-30 Thread Stephen Kelly
Norbert Pfeiler wrote: When i use qt5_add_resources and some of my resources change they get recompiled during the next invocation of my build tool. Whereas when i use cmakes autorcc this is not the case. This was fixed in CMake 3.1. Well, I’m using CMake 3.1.1, so apparently it’s

Re: [CMake] automoc autorcc

2015-01-31 Thread Stephen Kelly
Norbert Pfeiler wrote: Ok. In that case you must be doing something different to the testcase: http://www.cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e1c359fe9 If you have a http://sscce.org/ please add it to http://public.kitware.com/Bug/view.php?id=15074 The issue report you linked

Re: [CMake] whole archive linkage

2015-01-24 Thread Stephen Kelly
Adam wrote: I was hoping there might have been a better way to do this with target properties of legacyLib. There is with cmake 3.1: set(isExe $STREQUAL:$TARGET_PROPERTY:TYPE,EXECUTABLE) target_sources(legacyLib INTERFACE $${isExe}:${CMAKE_CURRENT_SOURCE_DIR}/use_symbol.cpp) LegacyLib

Re: [CMake] Resolving CMP0026 warnings

2015-02-05 Thread Stephen Kelly
Knox, Kent wrote: The problem is that get_prerequisites( ) needs a path to the target. How do I now get this path without calling the LOCATION property? I don't know where I can use a generator expression. Replace your configure_file with something like file(GENERATE OUTPUT

Re: [CMake] Mixed linking

2015-02-05 Thread Stephen Kelly
Ghyslain Leclerc wrote: Here are a few questions for the list (hoping someone more knowledgable than me will read this and help): 1) Am I right when I say CMake, Qt and static linking don’t mix ? They should mix fine. I have tried on OS X. I have compiled a static version of Qt,

Re: [CMake] Full paths for transitive dependencies

2015-03-18 Thread Stephen Kelly
Adam wrote: I happened to stumble acrosss this today. I fixed it by adding another find_package to the last project but this seems to defeat the purpose of transitive dependencies. What am I doing wrong? The docs I linked to describe Config files which include() the result of

Re: [CMake] List all binaries associated with a target.

2015-03-16 Thread Stephen Kelly
Klaim - Joël Lamotte wrote: Actually 2 and 3 are the same, I just put the files in a specific place in the build directory so that it looks like installed, but I do this when the binary is built so that it's always up to date while debugging. Now, I use post-build command

Re: [CMake] List all binaries associated with a target.

2015-03-16 Thread Stephen Kelly
Klaim - Joël Lamotte wrote: I am looking for a (hopefully simple) way to do the following: 1. gather a list of paths of all the binaries associated with a target, that is all the linked dll/so and executable the target link or depend on. Apparently I starting thinking about a genex to do

Re: [CMake] Full paths for transitive dependencies

2015-03-16 Thread Stephen Kelly
Richard Taylor wrote: http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file Prefer the official documentation instead of the wiki wherever official documentation exists (especially if it is well-formatted; that means it's probably recent and maintained).

Re: [CMake] Globally disable AUTO MOC

2015-03-16 Thread Stephen Kelly
Scott Aron Bloom wrote: I have found I can disable it project by project, but I cant seem to disable it, globally for every project Is there a way (or point in the cmake flow) to disable it globally? It is disabled by default. It is defaulted to on for targets following the setting of

Re: [CMake] can I make an AUTOMOC generated file depend on something ?

2015-03-05 Thread Stephen Kelly
Kim Rydhof Thor Hansen wrote: On Wed, Feb 25, 2015 at 10:45 PM, Stephen Kelly steve...@gmail.com wrote: Kim Rydhof Thor Hansen wrote: http://www.cmake.org/cmake/help/v3.0/prop_tgt/AUTOGEN_TARGET_DEPENDS.html I have a similar problem because automoc doesn't pick up that my metadata.json

Re: [CMake] can I make an AUTOMOC generated file depend on something ?

2015-02-25 Thread Stephen Kelly
Kim Rydhof Thor Hansen wrote: http://www.cmake.org/cmake/help/v3.0/prop_tgt/AUTOGEN_TARGET_DEPENDS.html I have a similar problem because automoc doesn't pick up that my metadata.json file is a dependency to the generated moc_plugin.cpp when building a Qt plugin Thanks for the testcase. I

Re: [CMake] Problems with combo CMake/MSVC2013/Qt5

2015-02-24 Thread Stephen Kelly
Jakob van Bethlehem wrote: Dear users, set(CMAKE_PREFIX_PATH C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake) Don't do this. Pass CMAKE_PREFIX_PATH as an argument to cmake. The CMakeLists.txt file in the subfolder looks like this: CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0) This has

Re: [CMake] CMP0026 - Disallow use of the LOCATION target property

2015-02-24 Thread Stephen Kelly
Jifeng ZHANG wrote: Any idea when CMake 4.0 is planned to release? So we can get a general idea when the old behavior will stop working. What will you do when it is released and the LOCATION property does stop working for build targets? Whatever it is, any reason not to do it now? Thanks,

Re: [CMake] Mixed linking

2015-02-21 Thread Stephen Kelly
Ray Donnelly wrote: 1) Am I right when I say CMake, Qt and static linking don’t mix ? They should mix fine. What I meant when I wrote this was 'they should mix fine, but some convenience is not available - you need to specify the correct link flags yourself'. That is, it's 'fine' in

Re: [CMake] Problem with CMAKE_AUTOMOC files not being regenerated or cleaned

2015-02-21 Thread Stephen Kelly
René Tschirley wrote: Simplified the problem and verified if the set_directory_properties trick works. It does not work for me. Used software: Windows7 SP1, CMake 3.1.2, Ninja 1.5.3. Am I forgetting something obvious? Is this an unfixed CMake bug? Yes, it is:

Re: [CMake] add_dependencies: Disallow use with INTERFACE_LIBRARY. WHY?!?

2015-02-21 Thread Stephen Kelly
Andrey Pokrovskiy wrote: Hi, Current CMake disallows Interface Libraries to have dependencies. I filed http://public.kitware.com/Bug/view.php?id=15414 Thanks, Steve. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at:

Re: [CMake] Minor documentation mistake

2015-02-21 Thread Stephen Kelly
Cutberto Escamilla wrote: Hello, I tried searching the different archives, but there is no mention about this. Was wondering if I should submit a bug. Thanks for the note. I've pushed a fix here: http://www.cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f93438cd Fix typo, graphiz -

Re: [CMake] Lower the barrier of entry to the wiki

2015-02-21 Thread Stephen Kelly
Gonzalo BG wrote: This is what happened: - For making an account I had to fill up a 50 words bio . Years ago this prevented me from creating a wiki account. I put 'this page intentionally left blank' in this field because I thought I shouldn't have to fill a bio to edit a wiki (like you

Re: [CMake] Mixed linking

2015-02-21 Thread Stephen Kelly
Ghyslain Leclerc wrote: Thanks for all the insight. I have been looking at this and quite a few posts (mostly from you !) to try and understand. I think I get most of it. That being said, I finally got a static executable for my application on my mac. What I did is build my application

Re: [CMake] automoc autorcc

2015-01-29 Thread Stephen Kelly
Norbert Pfeiler wrote: Hello, i’m curious about 2 things and therefore wanted to ask: When i use qt5_add_resources and some of my resources change they get recompiled during the next invocation of my build tool. Whereas when i use cmakes autorcc this is not the case. This was fixed in

Re: [CMake] Find Module, add_library shared and static : standard ?

2015-04-13 Thread Stephen Kelly
r2d2leb...@voila.fr wrote: Hi, I need to write a FindModule which search static and shared version of my lib. If it is your library, then you provide a Config.cmake file, not a FindModule: http://www.cmake.org/cmake/help/v3.2/manual/cmake-packages.7.html I would like to know what is

Re: [CMake] How to work around permission deficiencies of file(GENERATE...)?

2015-04-30 Thread Stephen Kelly
Alan W. Irwin wrote: However, until that is implemented (or configure_file(GENERATE ...) is implemented with the usual configure_file permission semantics which just copies the permissions of the source file) I need a method of setting file permissions at generate time. Is there currently

Re: [CMake] How to work around permission deficiencies of file(GENERATE...)?

2015-04-30 Thread Stephen Kelly
Alan W. Irwin wrote: But please keep in mind that the configure_file_generate function approach is itself a temporary workaround, and for CMake users who need to configure files that include generator expressions, a much cleaner approach will be possible if CMake developers implement a

Re: [CMake] C++Now / BoostCon / Boost 2.0

2015-05-01 Thread Stephen Kelly
Robert Ramey wrote: all things boost - which will touch upon CMake/CTest/CDash. I have recommended CMake... for boost - like projects and would like to see it more widely accepted. http://rrsd.com/blincubator.com/tools_cmak/ There are many typos on the page (and even in the url). You might

<    1   2   3   4   5   6   7   8   9   10   >