Re: [CMake] Adding a target to 'all' that was previously excluded

2018-07-03 Thread Marc CHEVRIER
You can use a new target, built by all, depending on your initial target: add_custom_target(build_blah_X ALL) add_dependencies(build_blah_X blah_X) Le mer. 4 juil. 2018 à 03:33, Andrew White a écrit : > How do I add an excluded (executable) target to the build. I know that if > I add a librar

Re: [CMake] Changing link flags for one target

2018-07-03 Thread Marc CHEVRIER
LINK_FLAGS property do not support generator expressions. In CMake 3.13, directory and target properties LINK_OPTIONS, supporting generator expressions, managed by commands add_link_options and target_link_options are introduced, . For earlier versions you can use global variables to set flags fo

Re: [CMake] Changing link flags for one target

2018-07-03 Thread Hendrik Sattler
You could try a generator expression with a custom target property. Am 4. Juli 2018 04:27:58 MESZ schrieb Andrew White : >In my cross-compile environment for an embedded platform, I need to set >the stack size for each executable. The linker flag to set the stack >size is (for example) "-Wl,-elf2

[CMake] Changing link flags for one target

2018-07-03 Thread Andrew White
In my cross-compile environment for an embedded platform, I need to set the stack size for each executable. The linker flag to set the stack size is (for example) "-Wl,-elf2flt='-s 2'". Is there an easy way to set this flag for every executable except one, for which I set "-Wl,-elf2flt='-s

[CMake] Adding a target to 'all' that was previously excluded

2018-07-03 Thread Andrew White
How do I add an excluded (executable) target to the build. I know that if I add a library EXCLUDE_FROM_ALL and then create a dependency on that library then that the library will be built anyway. How do I trigger similar behaviour from an executable target? Example: Directory A contains a CM

[CMake] Set flags for compiler check

2018-07-03 Thread Richard Shaw
I'm working on a cross-compiling project for the STM32F4 arm processor and on my Fedora 28 system everything is working fine (cmake 3.11.2) but others trying to configure are running into problems with the compiler check failing. Since I'm cross-compiling as far as I know I need "--specs=nosys.spe

Re: [CMake] CMake triggers Windows Defender

2018-07-03 Thread Petak, Jim
I'm wondering if anyone has followed up on the issue regarding cmake triggering Windows Defender using the MinGW compiler. It's a problem that I'm running into as well. Please be advised that this email may contain confidential information. If you are not the i

Re: [CMake] CMAKE_SYSROOT

2018-07-03 Thread dbegun via CMake
Nils, Craig - thanks, yes, that helps. Sent with [ProtonMail](https://protonmail.com) Secure Email. ‐‐‐ Original Message ‐‐‐ On July 3, 2018 4:15 PM, Craig Scott wrote: > Perhaps you are looking for > [CMAKE_FIND_ROOT_PATH](https://cmake.org/cmake/help/latest/variable/CMAKE_FIND_ROOT_P

Re: [CMake] CMAKE_SYSROOT

2018-07-03 Thread Craig Scott
Perhaps you are looking for CMAKE_FIND_ROOT_PATH , CMAKE_FIND_ROOT_PATH_MODE_LIBRARY and friends? On Tue, Jul 3, 2018 at 10:58 PM, dbegun vi

Re: [CMake] CMAKE_SYSROOT

2018-07-03 Thread Nils Gladitz
On Tue, Jul 3, 2018 at 3:06 PM dbegun via CMake wrote: > I am cross-compiling some code for ARM on an x86 host with cmake 3.5.1. > The code has multiple dependencies, and I placed relevant cross-compiled > libraries in /home/dev/arm_build. I was hoping that > specifying CMAKE_SYSROOT=/home/dev/ar

[CMake] CMAKE_SYSROOT

2018-07-03 Thread dbegun via CMake
I am cross-compiling some code for ARM on an x86 host with cmake 3.5.1. The code has multiple dependencies, and I placed relevant cross-compiled libraries in /home/dev/arm_build. I was hoping that specifying CMAKE_SYSROOT=/home/dev/arm_build in my CMAKE_TOOLCHAIN_FILE would prefix it to the sea

Re: [CMake] CMake, Visual Studio, do not generate absolute paths

2018-07-03 Thread Petr Kmoch
I was going to suggest SUBST as well. However, note that CMake doesn't need to be installed using a system-recognised installer, you can just unzip a distribution anywhere you do have write access. In all seriousness, Visual Studio is a much more dangerous program than CMake will ever be, as it (=

Re: [CMake] CMake, Visual Studio, do not generate absolute paths

2018-07-03 Thread Jano Svitok
Can you create the tree on the machine 1 so it looks the same as on machine 2 and thus the absolute paths would be the same? For example - by using SUBST to create virtual drive at the source root, - by creating whole virtual machine on machine 1 https://docs.microsoft.com/en-us/windows-server/adm