Re: [CMake] COMMAND dependencies with add_custom_command()

2017-02-01 Thread Matthew Woehlke
On 2017-01-25 20:25, Craig Scott wrote: > The documentation for add_custom_command() contains this little nugget when > discussing the COMMAND keyword: > > If COMMAND specifies an executable target name .. Additionally a >> target-level dependency will be added so that the executable target

Re: [CMake] Linker flags on all except a couple of programs

2017-01-13 Thread Matthew Woehlke
On 2017-01-12 00:49, Paul Smith wrote: > I have a CMake-based build that creates about 170 binaries (most of them > are individual unit test programs). > > I have set the CMAKE_EXE_LINKER_FLAGS to a set of flags I wanted on all > the binaries. > > Now it turns out that I need to remove, or not

Re: [CMake] To include external libraries using Cmake

2017-01-05 Thread Matthew Woehlke
On 2017-01-05 05:10, aishwarya selvaraj wrote: > Thanks for feedback : > >> IF (${ARMADILLO} STREQUAL “ARMADILLO-NOTFOUND”) >> # do what you want >> ENDIF () > ​ > I tried this way of writing : > > IF (${ARMADILLO} STREQUAL "ARMADILLO-NOTFOUND") > include(ExternalProject) >

Re: [CMake] [EXTERNAL]: To include external libraries using Cmake

2017-01-04 Thread Matthew Woehlke
(Arf, re-send with an account that's allowed to post to the list...) On 2017-01-04 14:52, Parag Chandra wrote: > If I’m not mistaken, when a library cannot be found, the value of > the variable “ARMADILLO” will be set to “ARMADILLO-NOTFOUND”. Correct. But... > So I think you need to adjust your

Re: [CMake] Executing python though CMake and linking libraries

2016-11-28 Thread Matthew Woehlke
On 2016-11-25 04:04, Kit Chambers wrote: > I have a Cmake custom target which runs a python script: > > add_custom_target(run > COMMAND python myscript.py > ) > > ... > > To me it looks like my LD_LIBRARY_PATH and DYLD_LIBRARY_PATH are not being > passed

Re: [CMake] Is there a default value for CMAKE_MODULE_PATH?

2016-11-16 Thread Matthew Woehlke
On 2016-11-09 10:05, Jayesh Badwaik wrote: > Over past few days, Boost has updated from version 1.61 to version 1.62. The > latest version of CMake that I have (3.6.3) does not yet have the appropriate > FindBoost.cmake and hence, issues warnings as shown in the postscript. > > As I see this

Re: [CMake] exporting targets from build tree

2016-11-16 Thread Matthew Woehlke
On 2016-07-27 18:49, Michael Legleux wrote: > I have 2 projects (one built with cmake, one in the process of being > converted to using it) > > Project A (built with cmake) builds lib_a that Project B requires. > I'm thinking I'm doing something wrong around here: > project(lib_a) > >

Re: [cmake-developers] Improving the version selection behavior of EXACT

2015-01-12 Thread Matthew Woehlke
On 2015-01-09 14:18, Rolf Eike Beer wrote: Matthew Woehlke wrote: On 2014-10-03 03:35, Rolf Eike Beer wrote: find_package(foo 2.0 EXACT) means EXACT, i.e. only 2.0 is allowed.. In most cases this behavior is not the one that one would expect or need. Most people would instead allow any 2.0.x

Re: [cmake-developers] Improving the version selection behavior of EXACT

2015-01-09 Thread Matthew Woehlke
On 2014-10-03 03:35, Rolf Eike Beer wrote: find_package(foo 2.0 EXACT) means EXACT, i.e. only 2.0 is allowed. In most cases this behavior is not the one that one would expect or need. Most people would instead allow any 2.0.x version to match. This sort of selection is currently impossible

Re: [cmake-developers] Extracting target metadata, IDE integration

2014-12-29 Thread Matthew Woehlke
On 2014-12-22 19:30, Aleix Pol wrote: On Thu, Sep 25, 2014 at 9:14 AM, Anton Makeev wrote: * No progress indication. Since the generation may take several minutes, providing feedback is crucial. I never found such case, ParaView. (To a lesser extent, VTK.) I would argue that a project

Re: [cmake-developers] New command 'file(LOCK_DIRECTORY ...)'

2014-12-17 Thread Matthew Woehlke
On 2014-10-13 10:39, Brad King wrote: On 10/10/2014 07:45 AM, Ruslan Baratov wrote: Locking directory is equivalent to locking file `cmake.lock` in directory /path/to/shared/directory/: I think this can be activated buy a DIRECTORY option. Why do we need even that? Can't CMake just test if

Re: [cmake-developers] CMake, Ninja generator, and ExternalProjects

2014-10-03 Thread Matthew Woehlke
On 2014-07-25 17:05, Williams, Norman K wrote: There’s also the ‘console pool’ facility that would allow ExternalProject builds to display output, though that would get back to the Gmake issue of different processes interleaving output. It wouldn't; the 'console' pool only permits one job at a

Re: [cmake-developers] [PATCH] Ninja: Use 'console' pool for CMake re-run if possible

2014-10-03 Thread Matthew Woehlke
On 2014-10-03 08:56, Brad King wrote: On 10/02/2014 06:08 PM, Matthew Woehlke wrote: Please see also http://public.kitware.com/Bug/view.php?id=14915 which it sounds like this (partly) fixes; you may want to reference that in your patch or vice versa. I've applied the patch here and added

Re: [cmake-developers] [PATCH] Ninja: Use 'console' pool for CMake re-run if possible

2014-10-03 Thread Matthew Woehlke
On 2014-10-03 14:00, Sylvain Joubert wrote: Le 03/10/2014 17:41, Matthew Woehlke a écrit : On 2014-10-03 08:56, Brad King wrote: I'll leave that to a follow-up patch if anyone wants to do it. I was sort-of hoping / encouraging that Sylvain might be interested :-). I quickly checked

Re: [cmake-developers] [PATCH] Ninja: Use 'console' pool for CMake re-run if possible

2014-10-02 Thread Matthew Woehlke
On 2014-10-02 17:34, Sylvain Joubert wrote: Since Ninja 1.5, a pre-defined pool 'console' can be used for non buffered output. See http://martine.github.io/ninja/manual.html#_the_literal_console_literal_pool This patch specifies that special pool for the build.ninja build block if the

Re: [CMake] Question regarding External Project add and VTK

2014-06-02 Thread Matthew Woehlke
On 2014-06-02 17:48, jmerkow wrote: I want to add VTK as an external project, but I have a few questions. Looking online at examples of other projects using vtk as an external project, many of them use a 'superbuild' style technique [...] they have some option to enable SuperBuild (or a

Re: [cmake-developers] Using reflinks during install phase

2014-05-30 Thread Matthew Woehlke
On 2014-05-29 08:56, Brad King wrote: I did not realize in my previous response that you intend to execute a cp process, but rather thought you would be implementing the underlying calls to the filesystem directly. That was my assumption also. I would've thought that would be better, as

Re: [cmake-developers] What about #line like feature in cmake language?

2014-05-21 Thread Matthew Woehlke
On 2014-05-15 08:36, Ben Boeckel wrote: On Thu, May 15, 2014 at 12:45:27 +0200, Nicolas Desprès wrote: Nope. These variables are the cmake equivalent to the __LINE__ and __FILE__ C-pre-processor macro. What I need is the #line directive equivalent which force the value of these variables so

Re: [cmake-developers] What about #line like feature in cmake language?

2014-05-21 Thread Matthew Woehlke
On 2014-05-21 15:24, Nicolas Desprès wrote: On Wed, May 21, 2014 at 8:06 PM, Matthew Woehlke wrote: On 2014-05-15 08:36, Ben Boeckel wrote: This will also likely need a policy since there's no guarantee that #line directives don't exist in already existing code as comments. Maybe we should

Re: [CMake] Are the [Project name]_SOURCE_DIR variables stored in the cache ?

2014-05-01 Thread Matthew Woehlke
On 2014-05-01 13:35, John Drescher wrote: I thought they probably were. My question was really if the behaviour that results from that was desirable. I can't see any reason why they should be cached as they aren't user configurable variables. Would it break anything badly if they were not

Re: [CMake] Are the [Project name]_SOURCE_DIR variables stored in the cache ?

2014-05-01 Thread Matthew Woehlke
On 2014-05-01 14:26, Nils Gladitz wrote: On 01.05.2014 20:16, Matthew Woehlke wrote: If CMAKE_BINARY_DIR were not cached, yes. But I don't think not caching that is being suggested. It's not clear to me why the *per-project* flavors need to be cached? If they were regular instead of cache

Re: [CMake] Explanation....

2014-04-28 Thread Matthew Woehlke
On 2014-04-28 04:58, Johannes Zarl wrote: I'm always happy to learn something new. How would you manage to make the following if statement trigger? set( arg value) if ( ${arg} STREQUAL TOTO ) message ( arg equals 'TOTO', and arg equals 'value' ) endif() Exactly how you would expect: set(

Re: [CMake] Are the [Project name]_SOURCE_DIR variables stored in the cache ?

2014-04-28 Thread Matthew Woehlke
On 2014-04-23 14:18, Glenn Coombs wrote: Are the [Project name]_SOURCE_DIR variables being automatically stored in the cmake cache? Running 'grep _SOURCE_DIR CMakeCache.txt' would answer this question. (And yes, they are.) -- Matthew -- Powered by www.kitware.com Please keep messages

Re: [cmake-developers] Please restore --help-full cmake option for version 3

2014-04-24 Thread Matthew Woehlke
On 2014-04-24 08:35, Nils Gladitz wrote: On 04/24/2014 02:17 PM, Alan W. Irwin wrote: I also just discovered that --help-man and --help-html were gone as well for those who preferred man or html formatting of the full documentation as opposed to the ascii form delivered by --help-full. The

Re: [cmake-developers] Please restore --help-full cmake option for version 3

2014-04-24 Thread Matthew Woehlke
On 2014-04-24 14:42, Alan W. Irwin wrote: So my remaining question (without all the html and man distractions) boils down to a request to implement --help-full as the concatanation (following the same order as the present CMake 2 results) of those individual manual results. Come to think of

Re: [CMake] Explanation....

2014-04-24 Thread Matthew Woehlke
On 2014-04-24 04:53, Johannes Zarl wrote: On Wednesday, 23. April 2014, 18:54:39, Matthew Woehlke wrote: if ( ${arg} STREQUAL TOTO) set( TOTO evil) You sure? When I checked, this did not work. Are *you* sure? :-) Also, the following gives me a syntax error: message( ${ foo}) Right

Re: [cmake-developers] [PATCH] remove x placeholder from STREQUAL operands

2014-04-23 Thread Matthew Woehlke
On 2014-04-18 09:07, Brad King wrote: On 04/18/2014 08:58 AM, Rolf Eike Beer wrote: To forbid whitespace and control characters in variable names can IMHO only be good. Some people use arbitrary variable names as a way to do key/value tables. In such cases it is intentional to use arbitrary

Re: [cmake-developers] cmake --find-package

2014-04-23 Thread Matthew Woehlke
On 2014-04-23 16:21, Alan W. Irwin wrote: [...] I keep making a plea for a proper fix to bug 9220 because propagating compiler information (held potentially in a large number of different environment variables and CMake variables for many different computer languages) from the principal CMake

Re: [CMake] Explanation....

2014-04-23 Thread Matthew Woehlke
On 2014-04-16 06:03, Rolf Eike Beer wrote: Am 16.04.2014 11:39, schrieb Johannes Zarl: Instead of ``${var} STREQUAL VALUE'', write: IF ( var MATCHES ^VALUE$ ) NO, please don't! I try hard to kill all those as it requires compiling a regular expression for a simple string match. Just

Re: [CMake] Custom Commands and Environmnt Settings for PATH and LD_LIBRARY_PATH

2014-04-21 Thread Matthew Woehlke
On 2014-04-11 05:32, Jörg Kreuzberger wrote: [stuff about environment and custom commands] So it would help to have a possiblity to have a custom command like this: add_custom_command( OUTPUT out COMMAND .. COMMAND .. ENVIRONMENT

Re: [cmake-developers] Default generator

2014-04-18 Thread Matthew Woehlke
On 2014-04-17 07:56, Peter Kümmel wrote: Is there a way to configure the default generator for command-line cmake calls? If you're using bash: 'alias cmake=cmake -GNinja' (for example)... I'm not sure how folks would feel about having a different default built into the cmake binary itself

Re: [CMake] Dependency resolution for add_custom_command calls?

2014-04-10 Thread Matthew Woehlke
On 2014-04-09 12:08, SF Markus Elfring wrote: I try to generate some files mainly by calls of the command add_custom_command. One of them should start with the action to copy a source file into the build directory. But I wonder why this step is not written into a generated make file. I would

Re: [CMake] multi-line strings... is this expected?

2014-04-08 Thread Matthew Woehlke
On 2014-03-27 13:54, Matthew Woehlke wrote: I have¹ a CTest like: execute_process(...) set(expected ...text... ...text... ) string(REGEX MATCH ${expected} match ${out}) This works great... *IF* the script file has UNIX line endings. I'm wondering if that is expected? It seems that CTest must

[CMake] multi-line strings... is this expected?

2014-03-27 Thread Matthew Woehlke
I have¹ a CTest like: execute_process(...) set(expected ...text... ...text... ) string(REGEX MATCH ${expected} match ${out}) So, basically, I'm checking that the process outputs a certain set of lines, and taking advantage of multi-line strings in CTest script for convenience and

Re: [CMake] Variable Containing MSVC and MATCHES

2014-03-12 Thread Matthew Woehlke
On 2014-03-12 16:25, Marek Vojtko (Firaxis) wrote: I know that MSVC is a CMake keyword and it is therefore not a good idea to use the string MSVC as the value for any variable, e.g. set( compiler MSVC ), because if you aren't careful and interpret such a variable without surrounding it with

Re: [CMake] Quick Question: add_custom_target( xxx ) add_custom_command( TARGET xxx ... )

2014-03-11 Thread Matthew Woehlke
On 2014-03-10 18:48, J Decker wrote: *shrug* there's no build targets... it's just a update/package/uninstall/install script for android apk targets... Turned out to work pretty good other than... configure_file() I had to emit a 1 line script and call 'cmake -P StupidConfigure.cmake' Yes,

Re: [CMake] How to merge dependencies of a static lib with itself?

2014-02-28 Thread Matthew Woehlke
On 2014-02-28 05:47, Shobhit Shrivastava wrote: I am working on creating an SDK from an existing product's code base and use it as an independent static library. The issue I am facing is that the older product, let's say MM, used to link with all the dependencies in the executable but I have to

Re: [cmake-developers] New EVIS parser moving forward (3.1)

2014-02-21 Thread Matthew Woehlke
On 2014-02-21 16:34, Ben Boeckel wrote: Other than varname, I don't really see a huge burden to not allowing implicit dereferencing and it is more consistent at that point. In fact, I'd be willing to say in varname that we *only* support implicit dereference, but it may be too hard to detect:

Re: [CMake] Latest UseJava.cmake

2014-02-21 Thread Matthew Woehlke
On 2014-02-21 13:48, Allen Byrne wrote: One is the issue with, http://public.kitware.com/Bug/view.php?id=14655, the CMAKE_JAVA_TARGET_OUTPUT_DIR doesn't override OUTPUT_DIR. Pedantic: if OUTPUT_DIR is given, it should override CMAKE_JAVA_TARGET_OUTPUT_DIR. I think maybe you didn't mean to

Re: [cmake-developers] Branches on next

2014-02-12 Thread Matthew Woehlke
On 2014-02-11 23:03, Ben Boeckel wrote: On Tue, Feb 11, 2014 at 19:16:49 -0500, Matthew Woehlke wrote: On 2014-02-11 17:54, Ben Boeckel wrote: Parsing in CMake is split into separate sections: the part which parses the lines into CMake's command calls and the part which expands variables

Re: [cmake-developers] Branches on next

2014-02-12 Thread Matthew Woehlke
On 2014-02-11 23:03, Ben Boeckel wrote: On Tue, Feb 11, 2014 at 19:16:49 -0500, Matthew Woehlke wrote: On 2014-02-11 17:54, Ben Boeckel wrote: ExpandVariablesInString is the part which takes a string which may have variables in it and dereferences them. Yes, that's why your changes

Re: [CMake] Run clean before automatically re-running cmake?

2014-02-12 Thread Matthew Woehlke
On 2014-02-12 11:35, Abe Bachrach wrote: The Makefile that cmake generates includes a rule to automatically re-run cmake if any of the input CMakelists.txt files change. Currently, if you change the name of an executable target (or library), it will leave the old file in the output location,

Re: [cmake-developers] push of LinkOptionsCommand topic branch

2014-02-10 Thread Matthew Woehlke
On 2014-02-08 06:10, Stephen Kelly wrote: 3) Assuming you still have no local changes, git reset --hard origin/LinkOptionsCommand Worth adding: If you *do* have local changes, you can (before running the above) set them aside with git stash and (after running the above) restore them with

Re: [cmake-developers] Preparing for CMake 3.0-rc1

2014-02-07 Thread Matthew Woehlke
On 2014-02-07 13:57, Brad King wrote: There is one more change I'd like to make as part of the change to the 3.0 version number. I propose that we drop the fourth version component and use only two components for the feature level. I guess this will mean that minor release are much more

Re: [CMake] Using a toplevel CMakeList.txt to build all sub projects at once.

2014-02-07 Thread Matthew Woehlke
On 2014-02-06 01:14, PCMan wrote: We're migrating from gtk+ to Qt and autotools to CMake and encountered some issues. There are many small modules or components in our project. Each of them has their own CMakeLists.txt and can be built separately. However, it's hard to build so many projects

Re: [CMake] How to read and compile dynamically-generated list of cpp files

2014-02-05 Thread Matthew Woehlke
On 2014-02-03 11:44, gimmeamilk gimmeamilk wrote: I have a custom tool that processes a given list of IDL files and produces a number of .cpp and .h files as output. I want to add those files to the list of things to compile in my CMakeLists, and also model the dependencies those files have on

Re: [cmake-developers] Documenting command signatures

2014-02-03 Thread Matthew Woehlke
On 2014-02-03 14:44, Stephen Kelly wrote: Additionally, sphinx is not the only tool processing the rst. The kate editor also does syntax highlighting of the blocks. It should (but currently does not) highlight the 'invalid' cmake code as invalid. I guess you mean that in a '..code-block::

Re: [CMake] AStyle or similar code beautifier

2014-01-31 Thread Matthew Woehlke
On 2014-01-31 02:01, Rob McDonald wrote: I'm interested in adding a code beautifier to my project. I'm looking at AStyle, but am open to others. Implementing a FindAStyle.cmake is pretty trivial. Likewise, implementing custom targets is pretty straightforward in the simple case. However, I

Re: [CMake] Reverse logic

2014-01-30 Thread Matthew Woehlke
On 2014-01-29 19:09, Rob McDonald wrote: I feel like this is a really dumb question, but I've got myself wrapped around the axel I'd like to use a negative conditional on a variable that may or may not be defined... say USE_SYSTEM_FOO So, I'd like to do something like this... IF( NOT

Re: [cmake-developers] RFC: add version to project() call

2014-01-29 Thread Matthew Woehlke
On 2014-01-29 09:58, Brad King wrote: I reverted the 'AddVersionToProjectCommand' topic from 'next' and replaced it with a 'project-version-variables' topic that adds a policy: Help: Format project command and variable documentation

Re: [cmake-developers] RFC: add version to project() call

2014-01-28 Thread Matthew Woehlke
On 2014-01-28 11:16, Jean-Christophe Fillion-Robin wrote: On Tue, Jan 28, 2014 at 9:10 AM, Brad King wrote: So our options are (1) Design new behavior in a way that requires a change to the project to activate. (2) Add a policy. The policy should only trigger when the project()

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

2014-01-28 Thread Matthew Woehlke
On 2014-01-28 01:11, Andrew Hundt wrote: On Mon, Jan 27, 2014 at 3:30 PM, Matthew Woehlke wrote: I didn't look at it yet, but to be optimally useful I would hope that an implementation of generating doxygen documentation would: What we have won't be optimally useful, but it is very useful. I

Re: [cmake-developers] Preparing for CMake 3.0.0-rc1

2014-01-27 Thread Matthew Woehlke
On 2014-01-27 16:58, Stephen Kelly wrote: Though I still don't like the behavior in the topic with project() commands without a specified VERSION and the CMAKE_PROJECT_VERSION_SET_BY_PROJECT_COMMAND variable etc. I don't see why all the complexity is needed. From what I understand, the reason

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

2014-01-27 Thread Matthew Woehlke
On 2014-01-27 14:48, Andrew Hundt wrote: On Thu, Jan 23, 2014 at 4:14 AM, Stephen Kelly wrote: Andrew Hundt wrote: I'm not well versed with the guts of git but are there any good ways to do some cleanup? If you have to ask, the details probably not something worth discussing here. Adding a

Re: [CMake] Does a ctested build work with make -j

2014-01-27 Thread Matthew Woehlke
On 2014-01-27 17:12, Bill Hoffman wrote: On 1/27/2014 1:42 PM, John Cary wrote: It seems that after configuring with ctest enabled, make -j4 does 4 builds at once make ExperimentalStart ExperimentalBUild -j4 does only one build at a time. Is this behavior expected? Is there a

Re: [cmake-developers] RFC: add version to project() call

2014-01-15 Thread Matthew Woehlke
On 2014-01-15 16:25, Alexander Neundorf wrote: On Wednesday 15 January 2014, Alexander Neundorf wrote: And, to actually produce the breakage, at some place the VERSION argument must have been added. With the current state of my branch, this could be worked around by unsetting the guard

Re: [CMake] Searching once

2014-01-15 Thread Matthew Woehlke
On 2014-01-15 11:11, Williams, Norman K wrote: You want the load_cache command: [snip] An *installed* project (what Al mentioned in his original e-mail) probably doesn't have a cache... this would only work if using the build-directory version of the dependency project. The solution I

Re: [cmake-developers] RFC: add version to project() call

2014-01-14 Thread Matthew Woehlke
On 2014-01-14 10:37, Brad King wrote: On 01/13/2014 01:38 PM, Alexander Neundorf wrote: does this require a policy now ? Somebody could set Foo_VERSION_MAJOR in the toplevel subdir, and have a project(Foo) call in a subdir, which would now unset Foo_VERSION_MAJOR. The same for

Re: [cmake-developers] RFC: add version to project() call

2014-01-14 Thread Matthew Woehlke
On 2014-01-14 14:11, Daniel Pfeifer wrote: 2014/1/14 Matthew Woehlke mw_tr...@users.sourceforge.net: @Daniel, there is a CMAKE_PROJECT_NAME? http://cmake.org/cmake/help/v2.8.12/cmake.html#variable:CMAKE_PROJECT_NAME http://cmake.org/cmake/help/v2.8.12/cmake.html#variable:PROJECT_NAME

Re: [cmake-developers] RFC: add version to project() call

2014-01-14 Thread Matthew Woehlke
On 2014-01-14 18:00, Alexander Neundorf wrote: On Tuesday 14 January 2014, Matthew Woehlke wrote: While that sounds good for 99.9% of cases, what about the case of project A that includes project B, where B is not updated, but A decides to start using project(...VERSION...). Now if B was using

Re: [CMake] Searching once

2014-01-14 Thread Matthew Woehlke
On 2014-01-14 18:47, Al Niessner wrote: [snip] Is it possible to have a dependent project use configuration from a previously installed project? - IF the dependent project creates a ProjectConfig.cmake, and - IF said ProjectConfig.cmake sets the necessary variables referencing where its

Re: [cmake-developers] RFC: add version to project() call

2014-01-10 Thread Matthew Woehlke
On 2014-01-10 11:01, Jean-Christophe Fillion-Robin wrote: Would it make sense to have project(Foo VERSION 1.2.3) set the variables: ${PROJECT_NAME}_PROJECT_VERSION_(MAJOR|MINOR|PATCH|TWEAK) That way, the variable would remain even if project is called with VERSION in sub directory. How is

Re: [cmake-developers] RFC: add version to project() call

2014-01-10 Thread Matthew Woehlke
On 2014-01-10 15:15, Alexander Neundorf wrote: On Friday 10 January 2014, Matthew Woehlke wrote: Related: Do these affect the version properties of libraries? (Because OTOH if it does, I can imagine wanting to say VERSION once at the root and have it inherit downwards unless overridden. Maybe

Re: [cmake-developers] cmake --help-custom-modules compatibility

2014-01-08 Thread Matthew Woehlke
On 2014-01-08 11:26, Brad King wrote: On 11/20/2013 07:22 PM, Stephen Kelly wrote: The solution is still to re-implement the --help-custom-modules myman.1 command-line behavior as a special case with warnings. Alex and Steve will have to work out who takes responsibility for that. In order

Re: [cmake-developers] cmake --help-custom-modules compatibility

2014-01-08 Thread Matthew Woehlke
On 2014-01-08 12:57, Brad King wrote: On 01/08/2014 12:00 PM, Matthew Woehlke wrote: Since you mentioned it, I was wondering if this is related to a feature I was asking about, but I don't understand how it works; it seems to only ever generate a short boilerplate text. Is this meant to take

Re: [cmake-developers] documenting a CMake 'use' file

2014-01-08 Thread Matthew Woehlke
On 2013-12-19 11:21, Brad King wrote: On 12/18/2013 12:13 PM, Matthew Woehlke wrote: Does this mean one cannot e.g. use the CMake extensions and/or link to topics in CMake's documentation (provided a known location of the same)? Correct. Sphinx does not support magic cross-referencing

Re: [cmake-developers] documenting a CMake 'use' file

2014-01-08 Thread Matthew Woehlke
On 2014-01-08 15:35, Brad King wrote: On 01/08/2014 01:52 PM, Matthew Woehlke wrote: On 2013-12-19 11:21, Brad King wrote: Sphinx does not support magic cross-referencing to external documents. If that's really true, that's a pretty big drawback of docutils vs. e.g. doxygen, which has very

Re: [cmake-developers] define_property deprecated?

2013-12-19 Thread Matthew Woehlke
On 2013-12-18 11:52, Brad King wrote: On 12/12/2013 01:19 PM, Matthew Woehlke wrote: Loosely related: is there a way to make export() and install(EXPORT) set these properties for exported targets? Not of which I'm aware. You can have your package configuration file add them after loading

Re: [cmake-developers] documenting a CMake 'use' file

2013-12-18 Thread Matthew Woehlke
On 2013-12-18 11:52, Brad King wrote: On 12/10/2013 04:46 PM, Matthew Woehlke wrote: Why is the copyright notice *after* the documentation? In the old documentation system the extractor only supported docs in the leading comment so the notice *had* to be later. Now it is just a convention

Re: [cmake-developers] documenting a CMake 'use' file

2013-12-18 Thread Matthew Woehlke
On 2013-12-18 11:52, Brad King wrote: On 12/10/2013 04:57 PM, Matthew Woehlke wrote: Thanks. Are there any guidelines on documenting the parameters of CMake functions/macros? I didn't see that in the mentioned document. No convention has been established so there is none to document yet. We

Re: [CMake] Set alias in cmake script

2013-12-18 Thread Matthew Woehlke
On 2013-12-18 04:19, Stefan wrote: I'm not sure if this is possible or not, but I'm trying to set an (environment) alias in my cmake script: alias makefast=make -j $(cat /proc/cpuinfo | grep -c processor) You can't do that as such; the [alias] command would need to run in the context of the

[cmake-developers] cmake build does too much work

2013-12-11 Thread Matthew Woehlke
I've been working on a project lately that isn't *that* massively large, but has an unusually high number of library and executable targets. One thing that's been bugging me is that any trivial change in a lower level library causes more than a hundred targets to be relinked, for no good

Re: [cmake-developers] cmake build does too much work

2013-12-11 Thread Matthew Woehlke
On 2013-12-11 17:40, Bill Hoffman wrote: On 12/11/2013 5:13 PM, Matthew Woehlke wrote: I've been working on a project lately that isn't *that* massively large, but has an unusually high number of library and executable targets. One thing that's been bugging me is that any trivial change

Re: [cmake-developers] cmake build does too much work

2013-12-11 Thread Matthew Woehlke
On 2013-12-11 17:13, Matthew Woehlke wrote: I've been working on a project lately that isn't *that* massively large, but has an unusually high number of library and executable targets. One thing that's been bugging me is that any trivial change in a lower level library causes more than a hundred

Re: [cmake-developers] cmake build does too much work

2013-12-11 Thread Matthew Woehlke
On 2013-12-11 19:21, Ben Boeckel wrote: On Wed, Dec 11, 2013 at 17:13:00 -0500, Matthew Woehlke wrote: Now, I *do* get that relinking is good if the library ABI changes. However, that's not the case here, and I am wondering if it would be possible for CMake to generate an additional

Re: [cmake-developers] documenting a CMake 'use' file

2013-12-10 Thread Matthew Woehlke
On 2013-11-22 15:49, Brad King wrote: On 11/22/2013 03:24 PM, Matthew Woehlke wrote: In particular, I am wondering if it is possible, and if so, what recommendations there are if any, to document functions 'doxygen style', i.e. the documentation immediately preceding the function definitions

Re: [cmake-developers] documenting a CMake 'use' file

2013-12-10 Thread Matthew Woehlke
On 2013-11-22 15:49, Brad King wrote: On 11/22/2013 03:24 PM, Matthew Woehlke wrote: In particular, I am wondering if it is possible, and if so, what recommendations there are if any, to document functions 'doxygen style', i.e. the documentation immediately preceding the function definitions

Re: [cmake-developers] Converting cmake_parse_arguments to a builtin command

2013-12-06 Thread Matthew Woehlke
On 2013-12-06 14:51, Daniele E. Domenichelli wrote: Are you sure you don't want the command to be renamed to parse_arguments? The only commands containing cmake looks strictly related to cmake, and the arguments parsing does not look that much related... FWIW, I was sort-of hoping it would be.

Re: [cmake-developers] Minor regression in --version results for CMake 2.8.12.1 (A FALSE ALARM)

2013-12-05 Thread Matthew Woehlke
On 2013-12-05 02:36, Alan W. Irwin wrote: Sorry, this turned out to be a false alarm. Despite which cmake telling me I was using cmake-2.8.12.1 [snip] ...which is, of course, why you should always use type in bash rather than which :-). type, being a shell built-in, will tell you what bash

Re: [CMake] [CMAKE] Getting compilation date through CMake

2013-12-05 Thread Matthew Woehlke
On 2013-12-05 15:46, Fraser Hutchison wrote: If you can specify CMake version 2.8.11 as a minimum, you could use the string(TIMESTAMP ...) command instead: string(TIMESTAMP _output %d/%m/%Y) Bear in mind that these only execute when CMake runs (i.e. at configure time) rather than at build

Re: [CMake] Get all targets a target depends on

2013-12-02 Thread Matthew Woehlke
On 2013-11-29 11:34, Dominik Bernhardt wrote: On 2013-11-29 17:26, Matthew Woehlke wrote: On 2013-11-29 03:07, Dominik Bernhardt wrote: is it possible to get a list of all targets on which a particular target depends on. The only idea I have so far is to query the LINK_LIBRARIES target

Re: [CMake] Making cmake automatically pick up changes to directory contents.

2013-12-02 Thread Matthew Woehlke
On 2013-12-02 12:58, bi...@billw.mail1.co.uk wrote: I just finished converting a large project from VC project files to Cmake generated ones and am using file GLOBing to generate the file lists for builds. This is working fine and I don't see the benefit to explicitly specifying every file. I

Re: [CMake] Get all targets a target depends on

2013-11-29 Thread Matthew Woehlke
On 2013-11-29 03:07, Dominik Bernhardt wrote: is it possible to get a list of all targets on which a particular target depends on. The only idea I have so far is to query the LINK_LIBRARIES target property. However that would only allow to get the libraries I'm linking with and for example no

[cmake-developers] documenting a CMake 'use' file

2013-11-22 Thread Matthew Woehlke
Now that CMake is using RST for documentations, is there a good guide for how to document modules that mainly provide new functions? In particular, I am wondering if it is possible, and if so, what recommendations there are if any, to document functions 'doxygen style', i.e. the documentation

Re: [CMake] building a library named 'general'

2013-11-19 Thread Matthew Woehlke
On 2013-11-19 19:07, Michael DiCuccio wrote: Suppose you have a library named general: - add_library(general foo bar) - and then try to link it into an application: - add_executable(myapp baz) target_link_libraries(myapp general) - cmake complains about the fact that

Re: [cmake-developers] Invalid/Reserved target names

2013-11-15 Thread Matthew Woehlke
On 2013-11-15 04:05, Nils Gladitz wrote: I would like to hijack/extend Stephen's changes in 05f5fde0eb83c0e49aab3214f28a098861aa3313 to also disallow target names that have been implicitly reserved by some of the generators. This list might not be complete but I assume it would be at least:

Re: [cmake-developers] Ninja jumping progress indicator

2013-11-11 Thread Matthew Woehlke
On 2013-11-11 03:15, Nils Gladitz wrote: Could output of the ninja progress indicator be omitted for when it reruns cmake somehow? It outputs 1/1 and then goes on to report the actual progress e.g. 1/916 ... What else can you do? Until you re-run CMake, there is no way to know how many edges

Re: [CMake] PROJECT_SOURCE_DIR ...

2013-11-10 Thread Matthew Woehlke
On 2013-11-10 14:12, Witold E Wolski wrote: And [project_{SOURCE,BINARY}_DIR] are the same as CMAKE_BINARY_DIR, or CMAKE_SOURCE_DIR. So why one would use the ${PROJECT}_BINARY_DIR variables? Not necessarily. Consider: src/CMakeLists.txt project(A) src/b/CMakeLists.txt project(B)

Re: [cmake-developers] CMakeParseArguments: Do not skip empty arguments

2013-11-06 Thread Matthew Woehlke
On 2013-11-06 13:57, Brad King wrote: On 11/06/2013 01:32 PM, Alexander Neundorf wrote: Adding proper named argument handling to cmake_parse_arguments() itself is somewhat complicated since it can't make use of cmake_parse_arguments() ;-) Since the need for this is so common, perhaps we

Re: [cmake-developers] [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-05 Thread Matthew Woehlke
On 2013-11-05 14:36, Alexander Neundorf wrote: I tried the following a few times in the past and noticed everytime that it does not work: $ cd src src/ $ mkdir build src/ $ cd build src/build/ $ cmake-gui -DSOME_VARIABLE=some_value .. I'd like that to work. Would it work with your proposal ?

Re: [cmake-developers] [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-05 Thread Matthew Woehlke
On 2013-11-05 14:36, Alexander Neundorf wrote: On Tuesday 05 November 2013, Jean-Christophe Fillion-Robin wrote: Would it makes sense to have cmake-gui behaving like ccmake ? After all there are both UI. It would accept the same set of options: [...] -G generator-name = Specify a

Re: [cmake-developers] [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-05 Thread Matthew Woehlke
On 2013-11-05 15:14, physhh . wrote: On Tue, Nov 5, 2013 at 8:56 PM, Matthew Woehlke wrote: On 2013-11-05 14:36, Alexander Neundorf wrote: Once the cache is deleted in cmake-gui, I would expect that the values from the command line are also forgotten, also the -U values. Otherwise this cmake

Re: [CMake] [cmake-developers] Forwarding parameters to cmake through cmake-gui

2013-11-05 Thread Matthew Woehlke
On 2013-11-05 09:25, David Cole wrote: Matthew Woehlke wrote: - What should happen with a -D option if there is not initially a build directory selected? It should add UI entries even though there is no build directory selected, and set them according to the -D values. Then, the -D values

Re: [CMake] [cmake-developers] Forwarding parameters to cmake through cmake-gui

2013-11-05 Thread Matthew Woehlke
On 2013-11-05 17:40, David Cole wrote: I would simply like to point out, with all due respect, that in the non-CLI use case, it is IMPOSSIBLE to pass command line parameters. 1. I can modify my shortcut / .desktop file (which I previously stated as a use case for the feature). 2. I can

Re: [cmake-developers] [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-04 Thread Matthew Woehlke
On 2013-11-04 15:47, David Cole wrote: My question is still not answered completely: When should the new variable be added? On startup is not really possible because it might be the case that your src/binary directory is not set properly. So you would agree that it makes sense to do it on

Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-04 Thread Matthew Woehlke
On 2013-11-02 07:58, David Cole wrote: physhh wrote: The question is: What is the expected behavior? ccmake and cmake-gui are interactive programs meant to prompt the user to fill in the cache values properly before typing 'c' or clicking 'Configure'. -D is a convenient way to give cache

Re: [CMake] Proper way to export a library

2013-11-04 Thread Matthew Woehlke
On 2013-11-02 13:38, Cyrille Faucheux wrote: [...] from what I understood from Matthew first answer (implicit compile flags [...] for imported tagets), I was under the impression that I could get MYPROJECT_STATIC automatically defined when linking another program against a static version of my

Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread Matthew Woehlke
On 2013-11-01 10:47, physhh . wrote: What I'm looking for: If cmake is used directly from the command line, it's possible to pass a bunch of options. This is nice because with this it's possible to use default settings - even if the cache get deleted. ccmake accepts e.g. -D options to set

Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread Matthew Woehlke
On 2013-11-01 11:39, physhh . wrote: that's interesting. I'm currently at a windows only machine so i can't check out ccmake but can only lookup the source. It appears that ALL parameters get forwarded to cmake - at least that's what cmCursesMainForm.cxx:52

Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread Matthew Woehlke
On 2013-11-01 17:35, physhh . wrote: I've tried to implement it in the same way as CCMake seem to do it. Because I can't compare it = Could somone with access to ccmake test this: - Start CCMake with -D foo=123 - Configure - Question: Is foo displayed in the variable list? Yes. - Add/Edit

  1   2   3   4   >