Re: [CMake] Install without building unittests

2019-03-27 Thread Scott Bloom
Note, Im running from inside visual studio... I do realize for a makefile based system, I can run make install from inside the executable's build directory From: CMake On Behalf Of Scott Bloom Sent: Wednesday, March 27, 2019 7:23 PM To: cmake@cmake.org Subject: [CMake] Install without building

[CMake] Install without building unittests

2019-03-27 Thread Scott Bloom
I asked this a couple of years ago, and the answer was "no"... If you run tests, it doesn't automatically build tests... So why does an install? I would never release something into the wild with out running the tests... But, for developer builds, were we need to install all the packages in or

Re: [CMake] How can I automatically optionally build a submodule?

2019-03-27 Thread Andreas Naumann
For me, this sounds more like foo is an independent thing and not a subdirectory. In this case, I think about two solutions:     1) Use a macro/function "check_yada", which sets a variable "yada_usable". If you extract this logic in an extra .cmake file, you can reuse it in your yada CMakelists.t

Re: [CMake] How can I automatically optionally build a submodule?

2019-03-27 Thread Steve Keller
"Simon Richter" wrote: > With my Debian Developer hat on: please also add a mechanism to manually > specify whether the optional component should be built. If the > dependency changes and suddenly a component goes missing without > triggering a build failure, that can be rather annoying for users

Re: [CMake] How can I automatically optionally build a submodule?

2019-03-27 Thread Steve Keller
"Albrecht Schlosser" wrote: > If you want yadda to be optional then don't use REQUIRED. > > find_package(yadda) > if (yadda_FOUND) >message(STATUS "found yadda, building bar ...") > ># add your code to build bar here > > endif () > > This should do what you want - unless I misunderstood y

Re: [CMake] Parent component options passed to ExternalProject

2019-03-27 Thread Dustyn Blasig
Thanks for the help, I will give the FetchContent approach a shot and see how things go. I was actually in the process of trying to do a custom command using the built-in "cmake -E tar xvf" approach to roll a custom FetchContent that doesn't need such a new CMake, but I can't get it to work with zi

Re: [CMake] Alternative to `add_compile_options` in Toolchain Files

2019-03-27 Thread Cristian Adam
Hi, If your CMake version is newer than 3.11 you can control what gets into the CMAKE__FLAGS_INIT flags with the technique from https://cristianadam.eu/20190223/modifying-the-default-cmake-build-types/ In your case you want to remove from the linker flags init the cxx compiler options. Cheers Cr