[CMake] Visual Studio Intellisense Integration

2019-10-09 Thread Dustyn Blasig
Hi All, We are trying to clean up our Visual Studio flow with CMake. However, we are running into an issue with Intellisense not finding header files properly if we use target_include_directories(). For instance, given the simple example below, if we add the "global" include_directories() call Int

[CMake] Calling external build system

2019-10-09 Thread Niklas Claesson
Hello, I'm creating a static library (*.a) with a separate build system (cargo). That build system also produces a dependency file in the Makefile format (also produced by `gcc -M`). Is it possible to include this file into the generated makefiles either through a makefile inclusion or through cma

Re: [CMake] cmake end user vs. developer rpath handling

2019-10-09 Thread Hendrik Sattler
Am 9. Oktober 2019 08:09:19 MESZ schrieb "Zakrzewski, Jakub" >That "something" seems to be line 257: >set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}") IMHO setting this to something based on CMAKE_INSTALL_PREFIX is rarely a good idea if it can be relative to the runtime p

Re: [CMake] cmake end user vs. developer rpath handling

2019-10-09 Thread Aaron Cohen
Is it not feasible to just let the build system do whatever it is going to and use "chrpath" or "patchelf" to change the rpath after-the-fact? On Wed, Oct 9, 2019 at 11:48 AM DIXON, MARK C. wrote: > On Wed, 9 Oct 2019, Craig Scott wrote: > ... > >>> Is there a way to reliably add to, or at least

Re: [CMake] [EXTERNAL] Re: CMake and Ninja, RERUN_CMAKE useless?

2019-10-09 Thread Nagurne, James via CMake
That's the piece of the puzzle I was missing. Thank you! Yes, I had deleted the cache because I thought that would force a complete regeneration. I'm using a rather complicated system of ExternalProjects (LLVM), so I figured it was the quickest way to essentially force cmake to start from the

Re: [CMake] [EXTERNAL] Re: CMake and Ninja, RERUN_CMAKE useless?

2019-10-09 Thread Robert Maynard via CMake
If you want to do a clean rebuild you can do the following: ninja clean or cmake --build --target clean ninja or cmake --build -j N On Wed, Oct 9, 2019 at 12:00 PM Nagurne, James wrote: > > That's the piece of the puzzle I was missing. Thank you! > > Yes, I had deleted the cache because I thoug

Re: [CMake] cmake end user vs. developer rpath handling

2019-10-09 Thread DIXON, MARK C.
On Wed, 9 Oct 2019, Craig Scott wrote: ... >>> Is there a way to reliably add to, or at least override, the developer's >>> rpath in any cmake-built software? >> >> Short of editing the build system scripts? I doubt... > > The CMAKE_INSTALL_RPATH variable is used to initialise the INSTALL_RPATH > p

Re: [CMake] cmake end user vs. developer rpath handling

2019-10-09 Thread DIXON, MARK C.
On Wed, 9 Oct 2019, Zakrzewski, Jakub wrote: ... > That "something" seems to be line 257: set(CMAKE_INSTALL_RPATH > "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}") There's a second something that's adding boost's library directory. I'm guessing this is maybe coming from my copy of cmake's boost de

Re: [CMake] Recover help text from option() ?

2019-10-09 Thread Ellon Paiva
On 10/9/19 1:59 PM, Petr Kmoch wrote: You should be able to get this by reading the directory property CACHE_VARIABLES ( https://cmake.org/cmake/help/latest/prop_dir/CACHE_VARIABLES.html ) and going from there (querying variable types etc.), but note that it's "intended for debugging purposes.

Re: [CMake] CMake and Ninja, RERUN_CMAKE useless?

2019-10-09 Thread Robert Maynard via CMake
The default generator and all other associated information ( '-D' ) is kept in the CMakeCache.txt file in the root of the build directory. The execution of `cmake -S -B ` will reload this cache before doing anything else. Have you verified that your build directory hasn't deleted this file? On Tu

Re: [CMake] Recover help text from option() ?

2019-10-09 Thread Petr Kmoch
On Wed, 9 Oct 2019 at 11:11, Ellon Paiva wrote: > Another somehow related question: is there a way to recover the name of > all options defined in a project? > > > You should be able to get this by reading the directory property CACHE_VARIABLES ( https://cmake.org/cmake/help/latest/prop_dir/CACHE

Re: [CMake] cmake end user vs. developer rpath handling

2019-10-09 Thread Craig Scott
On Wed, Oct 9, 2019 at 5:24 PM Zakrzewski, Jakub < jakub.zakrzew...@scheer-group.com> wrote: > > > From: CMake on behalf of DIXON, MARK C. < > mark.c.di...@durham.ac.uk> > Sent: 08 October 2019 17:25 > To: cmake@cmake.org > Subject: [CMake] cmake end user

Re: [CMake] Recover help text from option() ?

2019-10-09 Thread Ellon Paiva
Hi Petr, On Wed, Oct 9, 2019, 09:57 Petr Kmoch wrote: > Hi Ellon. > > On Wed, 9 Oct 2019 at 09:51, Ellon Paiva wrote: > >> Hi there, >> >> I was wondering if there was a way to recover the help text passed to an >> option to be used later below in the same CMake script. >> >> I saw that the hel

Re: [CMake] Recover help text from option() ?

2019-10-09 Thread Petr Kmoch
Hi Ellon. On Wed, 9 Oct 2019 at 09:51, Ellon Paiva wrote: > Hi there, > > I was wondering if there was a way to recover the help text passed to an > option to be used later below in the same CMake script. > > I saw that the help text goes into a comment before the option on the > CMakeCache.txt,

[CMake] Recover help text from option() ?

2019-10-09 Thread Ellon Paiva
Hi there, I was wondering if there was a way to recover the help text passed to an option to be used later below in the same CMake script. I saw that the help text goes into a comment before the option on the CMakeCache.txt, but is it stored in any recoverable variable during the script proc