Re: [CMake] Fwd: Linking GSL to cmake using command line

2019-09-24 Thread Avraham Shukron
No, setting a variable in cmake is done with the 'set(GSL_ROOT /path/to/gsl)' command. You can alternatively set a similarly named environment variable when invoking cmake: GSL_ROOT="/path/to/gsl" cmake On Wed, Sep 25, 2019, 05:15 Sachithra Weerasooriya wrote: > I did install it in a non

[Cmake-commits] CMake branch, master, updated. v3.15.3-1186-ga6b3791

2019-09-24 Thread Kitware Robot via Cmake-commits
t a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index f85707d..d24c2c0 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,7 +1,7 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 15) -set(CMake_VERSION_PATCH 20190924) +set(CMake_VER

Re: [CMake] Fwd: Linking GSL to cmake using command line

2019-09-24 Thread Sachithra Weerasooriya
I did install it in a non standard path. Which is why was trying to figure out how to link gsl. I couldn’t use homebrew since I don’t have root permissions on the machine. Do you just edit the text file just before calling find_package statement like this ? GSL_ROOT_DIR=\path\to\gsl Thanks!

[cmake-developers] Possible feature request concerning conditional linking support by generator expressions

2019-09-24 Thread Alan W. Irwin
Sorry for the long post, but my use case is complex, and there are several possible solutions to the problem presented by that use case which add to the length of this. So to help keep your reading organized, this post is separated into three sections which are (I.) a possible feature request

[CMake] Single library with both shared and static binaries

2019-09-24 Thread Avraham Shukron
Hi! I have a library which I want to distribute in both shared object and static library forms. Is there a modern way to do it without creating two completely separate library targets? Since I want to be a good CMake citizen I use `target_*` and `set_target_properties` as much as possible, and

Re: [CMake] Fwd: Linking GSL to cmake using command line

2019-09-24 Thread Avraham Shukron
The macro looks fine (assuming you actually call it somewhere). And I also assume that the line that fails is the find_package(GSL REQUIRED) I suspect that it fails because you installed GSL in a local directory that is not in a location known to cmake (E.g not in /usr/local/lib or something

Re: [CMake] Fwd: Linking GSL to cmake using command line

2019-09-24 Thread Avraham Shukron
Hi Sachi! Could you paste a minimal CMakeLists.txt file that demonstrate the problem, along with details about your OS version and how did you install GSL? Thanks! On Tue, Sep 24, 2019 at 7:55 PM Raymond Wan wrote: > Hi Sachi and everyone, > > Sorry, I didn't realise her original message

[CMake] Fwd: Linking GSL to cmake using command line

2019-09-24 Thread Raymond Wan
Hi Sachi and everyone, Sorry, I didn't realise her original message wasn't CC'ed to the list. Please keep replies to the list, Sachi, unless there's a good reason you shouldn't. It will also allow someone to jump in if I've said something incorrectly about your problem. Ray --

[CMake] Linking GSL to cmake using command line

2019-09-24 Thread Sachithra Weerasooriya
Hi CMake community! I am having trouble linking GSL to cmake using command line. I am using a Mac. Can someone please help me? Thank you! Best regards, Sachi -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware

[CMake] MacOS and shared libraries from imported targets

2019-09-24 Thread Michael Welsh Duggan
I have a project that links against an external dynamic library for which I have written a Find module that creates an import target. I do this, in part, by setting the IMPORTED_LOCATION property of the target to the location of the dynamic library. Unfortunately, on OSX the library shows up in

Re: [CMake] FindBoost Warnings

2019-09-24 Thread Brad Bell
CMake version 3.10.2 seems to have the problem and it seems to be fixed in 3.13.4. Thanks On 9/23/19 6:14 AM, Roger Leigh wrote: On 23/09/2019 14:05, Brad Bell wrote: When the target system does not have boost, the user gets the warning: CMake Warning at

Re: [CMake] Undocumented change of behavior when using EXCLUDE_FROM_ALL

2019-09-24 Thread Jakub Imriska
Thanks for letting me know. -- Jakub Imriška *Programmer and research developer*, Photoneo s. r. o. - Focused on 3D -- Meet us: CIIF , IAS , booth #C010, Hall 8.1 H, 17-21 September 2019, Shanghai (CN) MOTEK

[Cmake-commits] CMake branch, master, updated. v3.15.3-1185-gdcc117b

2019-09-24 Thread Kitware Robot via Cmake-commits
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via dcc117b9446cfc3d6c8bf191545aac8d1519abca (commit) via

Re: [cmake-developers] EXCLUDE_FROM_ALL behavior change

2019-09-24 Thread Charles Huet
Great, thanks ! On Tue, Sep 24, 2019 at 3:38 PM Brad King wrote: > On 9/24/19 8:12 AM, Charles Huet wrote: > > in CMake 3.14 the EXCLUDE_FROM_ALL option of add_subdirectory had a > behavior change. > > We are negatively impacted by this change, as we are in the same exact > scenario as > > this

Re: [CMake] file dependency not working in external projects

2019-09-24 Thread hex
hello Eric Doenges, You are correct. This has been given me headaches. Setting BUILD_ALWAYS to TRUE gives the desired behaviour. Thank you On 24/09/2019 14:59, Eric Doenges wrote: You're probably missing the BUILD_ALWAYS option to ExternalProject_Add: |BUILD_ALWAYS | Enabling this

Re: [CMake] file dependency not working in external projects

2019-09-24 Thread Eric Doenges
You're probably missing the BUILD_ALWAYS option to ExternalProject_Add: |BUILD_ALWAYS | Enabling this option forces the build step to always be run. This can be the easiest way to robustly ensure that the external project’s own build dependencies are evaluated rather than relying on

Re: [CMake] Undocumented change of behavior when using EXCLUDE_FROM_ALL

2019-09-24 Thread Brad King via CMake
On 9/23/19 10:24 AM, Jakub Imriska wrote: > Is there a way to retain the old behavior? We thought the change was backward compatible with existing projects but perhaps not. I've opened an issue: https://gitlab.kitware.com/cmake/cmake/issues/19753 Thanks, -Brad -- Powered by www.kitware.com

Re: [cmake-developers] EXCLUDE_FROM_ALL behavior change

2019-09-24 Thread Brad King via cmake-developers
On 9/24/19 8:12 AM, Charles Huet wrote: > in CMake 3.14 the EXCLUDE_FROM_ALL option of add_subdirectory had a behavior > change. > We are negatively impacted by this change, as we are in the same exact > scenario as > this user: https://cmake.org/pipermail/cmake/2019-September/069978.html

[CMake] file dependency not working in external projects

2019-09-24 Thread hex
hello, I have a problem with a build step. The following command is run every time somefile changes: add_custom_command( OUTPUT out.put     COMMAND touch out.put     DEPENDS somefile.txt ) add_custom_target( sometarget DEPENDS out.put ) I move this snippet inside an external project (with

Re: [CMake] Return an Error Code (or something) from a CMake Script.

2019-09-24 Thread FRamold
Hi Michael, you probably figured this out by now, but for future reference: You have to log to stderr to make the script fail. This example works (as in /does not build/ ;) ): file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/skript.cmake" CONTENT "message(FATAL_ERROR \"Script

[cmake-developers] EXCLUDE_FROM_ALL behavior change

2019-09-24 Thread Charles Huet
Hi, in CMake 3.14 the EXCLUDE_FROM_ALL option of add_subdirectory had a behavior change. Here is the MR: https://gitlab.kitware.com/cmake/cmake/merge_requests/2816, implementing the requirement from this ticket: https://gitlab.kitware.com/cmake/cmake/issues/17149. We are negatively impacted by