[CMake] What is the difference between STATIC and INTERNAL cache variables?

2020-03-12 Thread Timothy Wrona
According to the documentation: https://cmake.org/cmake/help/v3.17/prop_cache/TYPE.html It looks like STATIC cache variables are supposed to be visible from the CMake GUI, but not modifiable. But when I open a project that has some STATIC variables in the CMake GUI it looks like you can't even

[CMake] Scoping of CMake functions included from modules

2020-03-10 Thread Timothy Wrona
I've been working on a relatively complicated project that uses multiple CMake modules. Some of these modules internally include other modules. The issue is, when one of my modules internally includes another module, all of the functions from the internal module become visible globally throughout

[CMake] Capturing command line arguments passed to CMake

2019-04-13 Thread Timothy Wrona
I am working on a CMake project that uses ExternalProject_Add to add an external dependency. The issue is, I need all of my command line arguments from my project to be propagated to the external project so it will build using the same build configuration and with the correct compiler settings.

[CMake] Using find_package fails to find related subprojects that are exported to the package registry

2019-04-10 Thread Timothy Wrona
Hi fellow CMake programmers! I've got a bit of a tricky situation and I wonder if anyone has ever dealt with this before. I am trying to configure a project that has a structure as follows myproject/ executable1/ <-- depends on common_lib1 my_common_libs/ common_lib1/

Re: [CMake] Specifying code in one subdirectory depends on a library from another subdirectory

2019-03-19 Thread Timothy Wrona
Never mind... I spoke too soon. add_dependencies isn't working. It is correctly making the other project build first, but the header file is for some reason not generated until after it is needed. On Tue, Mar 19, 2019 at 1:41 PM Timothy Wrona wrote: > Seems I might be able to answer my

Re: [CMake] Specifying code in one subdirectory depends on a library from another subdirectory

2019-03-19 Thread Timothy Wrona
n Tue, Mar 19, 2019 at 1:13 PM Timothy Wrona wrote: > I am working on a complex CMake project that is part of a large legacy > system that uses a top level project and "add_subdirectory" to create > subprojects. > > I have run into an issue because now one of the su

[CMake] Specifying code in one subdirectory depends on a library from another subdirectory

2019-03-19 Thread Timothy Wrona
I am working on a complex CMake project that is part of a large legacy system that uses a top level project and "add_subdirectory" to create subprojects. I have run into an issue because now one of the subprojects is dependant on another subproject, but I can't seem to find a clear way to tell

[cmake-developers] [CMake] Ensuring an external project is built and installed before trying to call "find_package" on it

2019-02-25 Thread Timothy Wrona
to take a few days and really try to learn how to use the Conan package manager in depth. If it works out well I will try to summarize and report some of my findings. :) Thanks, Tim On Sat, Feb 23, 2019 at 2:32 AM Craig Scott wrote: > > > On Sat, Feb 23, 2019 at 4:14 PM Timothy Wrona > w

[CMake] Ensuring an external project is built and installed before trying to call "find_package" on it

2019-02-22 Thread Timothy Wrona
I am working on a CMake project that depends on a couple other projects I have previously written. I would like to include those other projects using "ExternalProject_Add", but I am having some issues. The basic layout of the project is this: cmake_minimum_required(VERSION 3.14.0)

Re: [CMake] Automatically updating Doxygen documentation and making it readily available to users with CMake

2019-02-21 Thread Timothy Wrona
where you can access it with a sensible URL. On Thu, Feb 21, 2019 at 1:44 AM Alan W. Irwin wrote: > On 2019-02-20 17:52-0500 Timothy Wrona wrote: > > > I have worked on multiple C++ libraries that are built with CMake and run > > Doxygen to generate HTML documentation. In every one of

[CMake] Automatically updating Doxygen documentation and making it readily available to users with CMake

2019-02-20 Thread Timothy Wrona
I have worked on multiple C++ libraries that are built with CMake and run Doxygen to generate HTML documentation. In every one of these libraries, the documentation get's built into an "html" folder in the CMake "build" directory and never gets looked at by anyone. *Because let's be honest, most

Re: [CMake] [cmake-developers] Using FetchContent fails when two subprojects have a target with the same name

2019-02-20 Thread Timothy Wrona
of FetchContent :) Thanks, Tim On Wed, Feb 20, 2019 at 8:22 AM Craig Scott wrote: > > > On Wed, Feb 20, 2019 at 3:36 PM Timothy Wrona > wrote: > >> (Included cmake-developers list as well in case this may have just been >> something that should work that was overlooked w

Re: [cmake-developers] Using FetchContent fails when two subprojects have a target with the same name

2019-02-20 Thread Timothy Wrona
of FetchContent :) Thanks, Tim On Wed, Feb 20, 2019 at 8:22 AM Craig Scott wrote: > > > On Wed, Feb 20, 2019 at 3:36 PM Timothy Wrona > wrote: > >> (Included cmake-developers list as well in case this may have just been >> something that should work that was overlooked w

Re: [CMake] Using FetchContent fails when two subprojects have a target with the same name

2019-02-19 Thread Timothy Wrona
(Included cmake-developers list as well in case this may have just been something that should work that was overlooked with the FetchContent module) On Tue, Feb 19, 2019 at 11:32 PM Timothy Wrona wrote: > I am having an issue with using FetchContent to grab two subprojects that > both c

[cmake-developers] Using FetchContent fails when two subprojects have a target with the same name

2019-02-19 Thread Timothy Wrona
I am having an issue with using FetchContent to grab two subprojects that both contain a "doxygen" target to build the documentation. Both of these subprojects need to be able to be built independently and when built on their own they compile fine (along with their documentation), but when I pull

[CMake] Using FetchContent fails when two subprojects have a target with the same name

2019-02-19 Thread Timothy Wrona
I am having an issue with using FetchContent to grab two subprojects that both contain a "doxygen" target to build the documentation. Both of these subprojects need to be able to be built independently and when built on their own they compile fine (along with their documentation), but when I pull

Re: [CMake] [cmake-developers] Using CMake as a package manager vs using a dedicated package management tool (like Conan)

2019-02-19 Thread Timothy Wrona
e sub-projects and I will have all of the source code available. I am hoping if I do this any changes I make to the sub-projects can easily be committed and pushed back to their own independent repositories. On Tue, Feb 19, 2019 at 10:33 AM Timothy Wrona wrote: > Hi Craig, > > Thank you

Re: [cmake-developers] Using CMake as a package manager vs using a dedicated package management tool (like Conan)

2019-02-19 Thread Timothy Wrona
e sub-projects and I will have all of the source code available. I am hoping if I do this any changes I make to the sub-projects can easily be committed and pushed back to their own independent repositories. On Tue, Feb 19, 2019 at 10:33 AM Timothy Wrona wrote: > Hi Craig, > > Thank you

Re: [CMake] [cmake-developers] Using CMake as a package manager vs using a dedicated package management tool (like Conan)

2019-02-19 Thread Timothy Wrona
better fit for this scenario. - Maybe when the sub-project libraries reach a mature and stable release they should be packaged into Conan and fetched in the main project from Conan at that point? Let me know what you think! :) On Tue, Feb 19, 2019 at 5:56 AM Craig Scott wrote: > &

Re: [cmake-developers] Using CMake as a package manager vs using a dedicated package management tool (like Conan)

2019-02-19 Thread Timothy Wrona
better fit for this scenario. - Maybe when the sub-project libraries reach a mature and stable release they should be packaged into Conan and fetched in the main project from Conan at that point? Let me know what you think! :) On Tue, Feb 19, 2019 at 5:56 AM Craig Scott wrote: > &

[cmake-developers] Using CMake as a package manager vs using a dedicated package management tool (like Conan)

2019-02-18 Thread Timothy Wrona
I have been working on a new C++ project and I am trying to decide whether I should use CMake as my package management system or if I should use a dedicated package management tool such as Conan. For more information on Conan see: https://conan.io/ I am trying to understand the main difference

[CMake] Using CMake as a package manager vs using a dedicated package management tool (like Conan)

2019-02-18 Thread Timothy Wrona
I have been working on a new C++ project and I am trying to decide whether I should use CMake as my package management system or if I should use a dedicated package management tool such as Conan. For more information on Conan see: https://conan.io/ I am trying to understand the main difference

Re: [CMake] Is there a way to delay "find_package" until link-time when the package is actually needed?

2019-02-14 Thread Timothy Wrona
t to be found during generation, but it doesn't seem like it works that way. Maybe some sort of "superbuild" pattern would be a better option. On Thu, Feb 14, 2019 at 1:32 PM Eric Noulard wrote: > > > Le jeu. 14 févr. 2019 à 18:57, Timothy Wrona a > écrit : > >> T

Re: [CMake] Is there a way to delay "find_package" until link-time when the package is actually needed?

2019-02-14 Thread Timothy Wrona
generation twice, but the first run will get a bunch of errors for missing packages. On Thu, Feb 14, 2019 at 12:38 PM Eric Noulard wrote: > > > Le jeu. 14 févr. 2019 à 18:22, Timothy Wrona a > écrit : > >> I have a collection of interdependent CMake projects (lots of legacy

[CMake] Is there a way to delay "find_package" until link-time when the package is actually needed?

2019-02-14 Thread Timothy Wrona
I have a collection of interdependent CMake projects (lots of legacy code) that I want to convert to using CMake targets for linking. The code is built in such a way that all projects run cmake generation, then all projects build, then all projects link. I would like to export a CMake target from

Re: [cmake-developers] Properly Documenting a CMake Module

2019-02-14 Thread Timothy Wrona
That's what I was looking for! Thanks!!! On Thu, Feb 14, 2019 at 9:04 AM wrote: > > > > Am 14.02.2019 um 14:53 schrieb Timothy Wrona : > > > > How does Sphinx know to go parse that ".cmake" file? Does Sphinx > recognize the „cmake-module" ke

Re: [cmake-developers] Properly Documenting a CMake Module

2019-02-14 Thread Timothy Wrona
Hi Gregor, It looks like there's still a little bit of magic here. All those "Help/.rst" files just have a single line in them that says: .. cmake-module:: ../../Modules/.cmake How does Sphinx know to go parse that ".cmake" file? Does Sphinx recognize the "cmake-module" keyword in a special way

Re: [cmake-developers] Properly Documenting a CMake Module

2019-02-13 Thread Timothy Wrona
ese comments without writing my own tool to do it? I mean it wouldn't be hard to script, but if there is a standard way I would prefer to use what everyone else uses rather than reinvent the wheel. Thanks, Tim On Wed, Feb 13, 2019, 8:59 AM Timothy Wrona I am going to quote your response in an answer

Re: [cmake-developers] Properly Documenting a CMake Module

2019-02-13 Thread Timothy Wrona
I am going to quote your response in an answer on my stack overflow question so others may find this information too. On Wed, Feb 13, 2019 at 8:57 AM Timothy Wrona wrote: > Thanks for the info and the links! I will start looking into it. :) > > On Wed, Feb 13, 2019 at 7:50 AM Torsten

Re: [cmake-developers] Properly Documenting a CMake Module

2019-02-13 Thread Timothy Wrona
Thanks for the info and the links! I will start looking into it. :) On Wed, Feb 13, 2019 at 7:50 AM Torsten Robitzki wrote: > > > > Am 13.02.2019 um 13:42 schrieb Brad King via cmake-developers < > cmake-developers@cmake.org>: > > > > The online docs, like those at

Re: [cmake-developers] Properly Documenting a CMake Module

2019-02-12 Thread Timothy Wrona
Note: I have additionally posted this question to stack overflow so if you would like to answer there rather than email it may help a larger audience: https://stackoverflow.com/questions/54660549/what-is-the-proper-way-to-document-a-cmake-module On Tue, Feb 12, 2019 at 6:37 PM Timothy Wrona

[cmake-developers] Properly Documenting a CMake Module

2019-02-12 Thread Timothy Wrona
A quick Google search (...actually many rather extensive Google searches) have not been able to explain how to properly document a CMake module. What I'm looking for is a way to document custom CMake modules so that they work with the "cmake --help-module " command. Is there any standard way of

[cmake-developers] Fwd: [CMake] link only with targets feature

2019-02-12 Thread Timothy Wrona
I saw this email come through the cmake users mailing list but feel it is more fitting for it to go to cmake-developers so I'm forwarding it here. It is a pretty long rant, but I think his idea to add a keyword to the "target_link_libraries()" command that would only look for cmake targets is a

[CMake] What is the best practice for installing custom CMake modules?

2019-02-11 Thread Timothy Wrona
I've written a custom CMake module (MyModule.cmake) and would like to install it in a sensible location on my system so my other CMake projects can find it easily. First of all, is there an accepted standard way of doing this? If not, is my approach below acceptable and considered good practice?

Re: [cmake-developers] Possible Bug With "add_custom_command()" and the Visual Studio Generator for CMake

2019-02-08 Thread Timothy Wrona
message like "all outputs > up to date" and skips over it. So any associated custom commands with the > target are never run. > Adding a "command" that is even an echo, like add_custom_target(testcmake1 > COMMAND ${CMAKE_COMMAND} -E echo "Running testcmake1 step 1&quo

[cmake-developers] Possible Bug With "add_custom_command()" and the Visual Studio Generator for CMake

2019-02-08 Thread Timothy Wrona
I have been following the examples in the "CMake Cookbook" by Radovan Bast and Roberto Di Remigio and came across one example that doesn't appear to work right on Windows. The source code for these example can be found here: https://github.com/dev-cafe/cmake-cookbook Chapter-06/Recipe-07 is

Re: [cmake-developers] CMake "find_package" command on a package that is not installed is unexpectedly successful

2019-02-05 Thread Timothy Wrona
, 2019 at 3:15 PM Timothy Wrona wrote: > Thank you! I didn't know it would make a registry entry, that was the > missing link! > > On Tue, Feb 5, 2019 at 2:46 PM Brad King wrote: > >> On 2/5/19 2:37 PM, Timothy Wrona wrote: >> > Can anyone explain to me how "find

Re: [cmake-developers] CMake "find_package" command on a package that is not installed is unexpectedly successful

2019-02-05 Thread Timothy Wrona
Thank you! I didn't know it would make a registry entry, that was the missing link! On Tue, Feb 5, 2019 at 2:46 PM Brad King wrote: > On 2/5/19 2:37 PM, Timothy Wrona wrote: > > Can anyone explain to me how "find_package" is able to find the Eigen > libraries > &g

[cmake-developers] CMake "find_package" command on a package that is not installed is unexpectedly successful

2019-02-05 Thread Timothy Wrona
I am working my way through the "CMake Cookbook" by Radovan Bast and Roberto Di Remigio and got to an example that required the Eigen C++ libraries. (chapter-02/recipe-06) I downloaded the ".zip" for the Eigen libraries and unzipped it to an arbitrary location. Then I ran CMake on it (but I did

[cmake-developers] Conan Integration for CMake

2018-11-16 Thread Timothy Wrona
I recently started using a new package manager for C++ called "Conan" and I'm finding it is solves many of the dependency issues that plague all of my previous C++/CMake projects. Conan is an up-and-coming tool, but it seems to be gaining quite a bit of traction. It is designed with CMake in mind