[CMake] CPack`ing a bunch of command line tools on OS/X

2019-06-28 Thread Torsten Robitzki
Hello, I try to pack a bunch of command line tools (and some additional data files) into an OS/X installer. When the installer is running, it should install / copy the command line tools and adjust the PATH variable (or what ever mean that comes close, to make the tools available). I use a super

Re: [CMake] Embedded build using ExternalProject

2019-06-26 Thread Torsten Robitzki
Hi Albrecht, > Am 26.06.2019 um 19:10 schrieb Albrecht Schlosser : > > On 6/26/19 3:53 PM Torsten Robitzki wrote: > >> I don’t want to build any EOL test firmware, test-tools etc. just the stuff >> that will be shipped, thus the explicit target. I can build the >&g

[CMake] Embedded build using ExternalProject

2019-06-26 Thread Torsten Robitzki
Hello, I have a project, where binaries are build for an embedded platform and for a PC platform. To build software update packages for the embedded platforms (files that can be used to make in the field firmware updates), tools that have to run during the build have to be build from source fir

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

[CMake] Checking Variables in a tool-chain file

2019-01-30 Thread Torsten Robitzki
Hi, I have a tool-chain file, which requires a variable to be set to the path to the compiler on the local machine: set(CMAKE_C_COMPILER ${ARM_GCC_TOOL_PATH}/bin/arm-none-eabi-gcc) set(CMAKE_CXX_COMPILER ${ARM_GCC_TOOL_PATH}/bin/arm-none-eabi-g++) Now I want to give the user an error message

[CMake] add_executable() with BYPRODUCT

2019-01-19 Thread Torsten Robitzki
Hello, we have some applications for something similar to BYPRODUCTS in add_custom_command() when it comes to add_exectuable(). For example, we want to do some resource calculation based on map files. And in a perfect world, the map file would be a BYPRODUCT of the executable and we could make t

[CMake] Integrating Build Date/Time into Binary

2019-01-16 Thread Torsten Robitzki
Hello, we are porting a larger set of projects (~70) to CMake. The current build has a feature to integrate the current timestamp of the build into the final binary / target. If a target is relinked, a header (id.h) is created with the current timestamp, a user provided C file (id.c), including

[CMake] Escaping end of line anker in regex

2019-01-10 Thread Torsten Robitzki
Hi, I’ve stumbled over following issue: if (NOT ^ MATCHES ^\^ ) message(FATAL_ERROR "Anker not found!") endif() if (NOT $ signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.or

[CMake] extending clean for Ninja

2018-12-06 Thread Torsten Robitzki
Hi, we have some source file generators, that take a known list of input files and generate an „relatively“ unknown list of output files. The exact list of output files depend on the content of the input files. The „usual“ way to solve this seams to have an add_custom_target() call, and listing

[CMake] What is --build-two-config good for

2018-12-05 Thread Torsten Robitzki
Hello, can someone of you tell me, what the purpose of the CTest —build-two-config command line option is? The documentation says, that it is part of the CTest Build and Test Mode and that it will cause CTest to run CMake twice. I’ve checked the code and yes, it does exactly this. But why? What

Re: [CMake] dependencies of cross compiliations

2018-12-03 Thread Torsten Robitzki
> Am 27.11.2018 um 19:55 schrieb Eric Noulard : > > However from my point of view and my cross-compiling experience when you > cross-compile you have: > > 1) the host compiler which is used to compile "host tools" > 2) the target compiler (may be several of them) to "cross-compile" > > My assum

Re: [CMake] How is ARGN passed to a macro

2018-11-21 Thread Torsten Robitzki
Hi Andreas, > Am 21.11.2018 um 20:18 schrieb Andreas Naumann : > > I think the behavior is explained in [1] and [2]. In particular the second > section of [2] states that the parameter " [...] such as ARGN are not > variables in the usual CMake sense. They are string replacements [...]". And

[CMake] How is ARGN passed to a macro

2018-11-21 Thread Torsten Robitzki
Hi, I’ve stumbled over following behavior and now I’m searching for the rules, that explains that behavior: test.cmake: macro(check_argn) message("in macro check_argn ARGN: ${ARGN}") if(ARGN) foreach(item IN LISTS ARGN) message("ARG: ${item}") endforeach(item)

Re: [CMake] dependencies of cross compiliations

2018-11-10 Thread Torsten Robitzki
> Am 09.11.2018 um 15:55 schrieb Miller Henry : > > There are two options. Each with pros and cons. > > The first what you are doing now, except you use external project > https://cmake.org/cmake/help/v3.12/module/ExternalProject.html to build the > host tools instead of add_custom_command. I

[CMake] dependencies of cross compiliations

2018-11-09 Thread Torsten Robitzki
Hi, I hope this question was not asked before. I work in the embedded field and there it is usually to have at least two different build platforms. The Host platform, where unit tests are build (and where CMake is running) and an embedded Target platform, where targets are build with a cross com