[CMake] A simple website to get started on new CMake projects

2017-06-01 Thread Julio Gutierrez
Hello all, I've used CMake for a few years now in almost all of my projects. It's a great tool and it makes my life easy. However, every time I start a new project, I just can't remember CMake's syntax and all of the commands. I usually spend a lot of time rereading the CMake docs or referencin

[CMake] Emacs cmake-mode indentation flaw

2017-06-01 Thread Frank Roland
There is probably a faulty indentation implemented in cmake-mode for emacs regarding closing parens. If you have the following source code: foo( bar ) I indents the closing parenwould expect it to be indented like this: foo( bar ) I would expect the single closing paren to be not

Re: [CMake] Using target_link_libraries INTERFACE with static libraries

2017-06-01 Thread Luis Caro Campos
Hi Mario, Eureka! I had glanced through that explanation in the past, however, I missed this key piece of information: "For this reason, when A links in B as PRIVATE and another target C links in A, CMake will still add B to the list of libraries to be linked for C because parts of B are needed b

Re: [CMake] Using target_link_libraries INTERFACE with static libraries

2017-06-01 Thread Mario Werner
Hi Luis, as you correctly concluded, if 'Foo' is not part of the public interface of 'Bar', then the PRIVATE is the correct specifier. However, you don't have to add 'Foo' to the consumers of 'Bar' (e.g., 'MyApp'). If everything works as expected, CMake automatically tracks the link dependency fr

[CMake] Using target_link_libraries INTERFACE with static libraries

2017-06-01 Thread Luis Caro Campos
I have the following scenario where I have 2 static libraries, where one uses symbols from the other, and the executable needs to link against both in order to build properly. Library 'Bar' uses symbols from library 'Foo' internally, but 'Foo' is not part of the "interface" of Bar, i.e., the calli