[lttng-dev] [lttng-ust GIT PULL] Doc: add a CMake example

Sebastien Boisvert sboisvert at gydle.com
Fri Jun 17 14:52:06 UTC 2016


Hi Phil,

On 06/17/2016 10:25 AM, Philippe Proulx wrote:
> On Fri, Jun 17, 2016 at 12:09 AM, Sebastien Boisvert
> <sboisvert at gydle.com> wrote:
>> Hi Mathieu,
>>
>> Please pull 7 commits for a new example in the documentation:
> 
> Isn't the "standard" way to use CMake this, in terms of directories:
> 
>     mkdir build
>     cd build
>     cmake ..
>     make
> 
> ?

I can rename the directory from cmake-multiple-shared-libraries.build to build.

I don't know if it is standard to create the build directory inside the source tree.
I always do out-of-tree builds, but I don't know if it is incoherent with the standard way.

Either way, I will make the changes you think are required.

> 
> Also, just a note: CMake 3.6 will have a FindLTTngUST [1] module which defines
> an `LTTng::UST` imported target. This should be more robust than just:
> 

I will add a check to detect CMake >= 3.6 and use find_package(LTTngUST) in that case.

>     target_link_libraries(tracepoint-provider dl lttng-ust)
> 
> About this line, by the way, you should at least use `${CMAKE_DL_LIBS}` instead
> of `dl`.
> 

I will do this.


Thanks



> Phil
> 
>>
>>
>> The following changes since commit 01f0e40ce5b0c30c7c0706b63532049b311c83cf
>> are available in the git repository at
>>
>> https://github.com/sebhtml/lttng-ust.git
>> tags/cmake-multiple-shared-libraries.2016-06-17
>>
>>
>> Sebastien Boisvert (7):
>>       Doc: add CMake example
>>       Doc: clean up cmake example
>>       Doc: add a trace.sh script in the cmake example
>>       Doc: clean up cmake file
>>       Doc: fix English issue
>>       Doc: rename cmake example
>>       Doc: ship cmake example with 'make distcheck'
>>
>>
>>
>>  doc/examples/Makefile.am                                             | 15
>> +++++++++++++
>>  doc/examples/cmake-multiple-shared-libraries/CMakeLists.txt          | 20
>> +++++++++++++++++
>>  doc/examples/cmake-multiple-shared-libraries/README.md               | 52
>> +++++++++++++++++++++++++++++++++++++++++++++
>>  doc/examples/cmake-multiple-shared-libraries/aligner-lib.cpp         | 16
>> ++++++++++++++
>>  doc/examples/cmake-multiple-shared-libraries/aligner-lib.h           |  7
>> ++++++
>>  doc/examples/cmake-multiple-shared-libraries/aligner.cpp             | 10
>> +++++++++
>>  doc/examples/cmake-multiple-shared-libraries/tester-lib.cpp          | 16
>> ++++++++++++++
>>  doc/examples/cmake-multiple-shared-libraries/tester-lib.h            |  7
>> ++++++
>>  doc/examples/cmake-multiple-shared-libraries/tester.cpp              | 15
>> +++++++++++++
>>  doc/examples/cmake-multiple-shared-libraries/trace.sh                |  9
>> ++++++++
>>  doc/examples/cmake-multiple-shared-libraries/tracepoint-provider.cpp |  6
>> ++++++
>>  doc/examples/cmake-multiple-shared-libraries/tracepoint-provider.h   | 27
>> +++++++++++++++++++++++
>>  12 files changed, 200 insertions(+)
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev at lists.lttng.org
>> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


More information about the lttng-dev mailing list