Re: [CMake] Syntax to document cmake files, functions and macros

2019-01-31 Thread Torsten Robitzki
> Am 31.01.2019 um 19:55 schrieb Marc Herbert : > > So is there a relatively simple way to run the same tooling on any regular, > non-module .cmake files > too and produce project-specific documentation? We are working on a larger CMake project and we use Sphinx. We use sphinxcontrib.moderncm

Re: [CMake] Checking Variables in a tool-chain file

2019-01-31 Thread Torsten
> Am 31.01.2019 um 21:10 schrieb Craig Scott : > > This is precisely the scenario that the CMAKE_TRY_COMPILE_PLATFORM_VARIABLES > variable is meant for. It allows a toolchain file to specify additional > variables that should be passed along to try_compile(). Works like a charm. Thanks a lot!

Re: [CMake] Checking Variables in a tool-chain file

2019-01-31 Thread Shoaib Meenai
That’s perfect! It looks like it was introduced in CMake 3.6, whereas LLVM targets a minimum of 3.4.3 right now, but I’ll make a note of it for the next CMake upgrade. Thanks! From: CMake on behalf of Craig Scott Date: Thursday, January 31, 2019 at 12:10 PM To: "tors...@robitzki.de" Cc: CMak

Re: [CMake] Checking Variables in a tool-chain file

2019-01-31 Thread Craig Scott
This is precisely the scenario that the CMAKE_TRY_COMPILE_PLATFORM_VARIABLES variable is meant for. It allows a toolchain file to specify additional variables that should be passed along to try_compile(). On

Re: [CMake] Checking Variables in a tool-chain file

2019-01-31 Thread Shoaib Meenai
We have a somewhat similar problem with LLVM's toolchain file for cross-compiling to Windows, and we solve it there by saving and restoring cache variables from the environment inside the toolchain file itself. See https://reviews.llvm.org/diffusion/L/browse/llvm/trunk/cmake/platforms/WinMsvc.cm

Re: [CMake] Syntax to document cmake files, functions and macros

2019-01-31 Thread Marc Herbert
> > On 24 Dec 2018, at 03:32, Oleksii Vilchanskyi gmail.com> wrote: > > On 12/24/18 12:01 PM, Olivier Croquette wrote: >> I have quite a few .cmake files that I want to document. They define >> functions, macros, and variables, and I was wondering if there is any >> standard or tooling to help.

Re: [CMake] Checking Variables in a tool-chain file

2019-01-31 Thread Torsten
Hi Sergei, > Am 31.01.2019 um 08:42 schrieb Sergei Nikulov : > > Just guessing maybe better use $ENV{ARM_GCC_TOOL_PATH} ? > https://cmake.org/cmake/help/latest/variable/ENV.html?highlight=env Well, but this would mean, I had to configure CMake not only with Cache variables: cmake -DARM_GCC_TOO