Re: [CMake] linking question

2015-04-15 Thread Petr Kmoch
Hi Bill. Probably the easiest way to set the interface properties to just what you need is to use the PUBLIC (which is the default), PRIVATE and INTERFACE keywords when specifying dependencies. In your case, you'd apply them like this: add_library(joe STATIC joe.c joe_a.c) add_library(fred SHARED

Re: [CMake] add_custom_commmand TARGET is unknown

2015-04-15 Thread Mark Abraham
Hi, CMakeLists.txt files are processed from start to finish, so if you want to refer to a target created in a subdirectory, then you need to have added that subdirectory before using that target. Mark On 16/04/2015 1:25 am, "Daniel Dilts" wrote: > I have a function that does something like thi

[CMake] add_custom_commmand TARGET is unknown

2015-04-15 Thread Daniel Dilts
I have a function that does something like this: add_dependencies(${LibraryName} SomeTarget) add_custom_command(TARGET SomeTarget PRE_BUILD COMMAND MyExecutable.exe USES_TERMINAL ) It creates the dependency without any issues, but it gives the following error on the custom command: CMake

[CMake] linking question

2015-04-15 Thread Bill Newcomb
The following is all on Linux (with gcc, gnu binutils, etc). I'm trying to build libfred.so that uses code from libjoe.a, but I want libfred.so to be complete, i.e. I don't want any program that I build that links to libfred.so also need libjoe.a. Then I want to build executable mike that is

[CMake] Updating external source where URL is a directory?

2015-04-15 Thread Tom Davis
I am using ExternalProject_Add() to add a dependent project. When I'm developing locally, I want to be able to make changes to the dependency and have them pulled in by the parent build without having to commit said changes to a remote repository. To include the dependency, I am using the `URL` par

[CMake] Cmake force a specific gnu arm toolchain

2015-04-15 Thread Mathias Giacomuzzi
Hello,   Here is some more information to the question before. I use the https://launchpad.net/gcc-arm-embedded toolchain for cortex m4 development.   I am on windows7 machine and I have installed more than one version of a GNU ARM toolchain. c:\Program Files (x86)\GNU Tools ARM Embedded\ 4

[CMake] CMake Cross Compiling GCC

2015-04-15 Thread Mathias Giacomuzzi
Hello I am new to cmake,   I have two question´s concerning cross compiling with gnu compilers   1) First Question: Can anyone explain me, why a toolchain file is called twice when cross compiling? I use the current cmake version 3.2.2.   I use this toolchain file as an example...   # the

[CMake] install target added with add_subdirectory(EXCLUDE_FROM_ALL)

2015-04-15 Thread Nick Tasios
Hello everyone, I recently started using cmake and I'm having some trouble setting-up my project. I've searched quite a lot and couldn't find a clear answer. The project has a top level CMakeLists.txt which builds the executable. In my project, I have included external libraries which I add