[CMake] Using ExternalProject with find_library and find_path

2018-08-24 Thread Alexander Dahl
Hei hei, for a standalone build without system libraries I was experimenting with the ExternalProject module today. My goal is to have some top level build project which includes several CMake projects and some external projects without relying on dev libraries installed on the system (reason are

Re: [CMake] Using ExternalProject with find_library and find_path

2018-08-24 Thread Petr Kmoch
Hi Alex, the standard solution to this is to use a Superbuild approach, in which the top-level CMakeList contains *only* ExternalProject calls. That means your actual project becomes just another "external" project in this superbuild, which allows you set up all build dependencies etc. as necessar

Re: [CMake] Adding an individual define to each source file of a library

2018-08-24 Thread George PF
>> foreach(x IN LISTS mysrcs) >> message("at ${x}") >> set_property(SOURCE x APPEND PROPERTY COMPILE_DEFINITIONS >> "TEST1;TEST2;") > > almost there but you forgot to take value of 'x' > > set_property(SOURCE ${x} APPEND PROPERTY COMPILE_DEFINITIONS "TEST1;TEST2;") > > works fo

Re: [CMake] Problem with creating shared library

2018-08-24 Thread Damir Porobic
I've fixed both issues, the second by implementing the pimpl idiom but still I can't used the library in the other project, again I get the error with undefined reference to the constructor (and a method that I've added): [ 75%] Linking CXX executable testApp CMakeFiles/testApp.dir/main.cpp.o:

[CMake] Handling of generated files in POST_BUILD custom commands

2018-08-24 Thread Pedro Navarro via CMake
Hi all, I'm trying to build an executable that has its debug symbols in a separate file. I implemented that with a POST_BUILD custom command: add_executable(foo a.cpp) add_custom_command(TARGET foo POST_BUILD COMMAND ${CMAKE_OBJCOPY} --only-keep-debug foo foo.sym COMMAND ${CMAKE_OBJCO

[CMake] Abwesenheitsnachricht: Handling of generated files in POST_BUILD custom commands

2018-08-24 Thread Sören Textor
Derzeit bin ich nicht im Hause Ihre E-Mail wird nicht weitergeleitet. In dringenden Fällen bitte supp...@ditec-gmbh.de oder Telefonhotline +49-6221-31698-110 oder die Zentrale +49-6221-31698-0 kontaktieren. --- DiTEC Dr. Siegfried Kahlich & Dierk Lang