Re: [CMake] CMake and GDB

2012-09-19 Thread GOO Creations
u intend to debug running when you ask gdb for a backtrace? You will only be able to get a backtrace if the process has been started and has not yet exited. e.g.: gdb ./mybin break main run backtrace Nils On 09/19/2012 04:43 PM, GOO Creations wrote: Hi, I'm trying to debug my program

[CMake] CMake and GDB

2012-09-19 Thread GOO Creations
Hi, I'm trying to debug my program using GDB. I've done the following: -DCMAKE_BUILD_TYPE=Debug SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -g") SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g") But whenever I run GDB and do a backtrace, I get a message: "No Stack". I've done a Google

Re: [CMake] Recursively add directories to INCLUDE_DIRECTORIES

2012-06-11 Thread GOO Creations
: Use the GLOB_RECURSE mode of file() (cmake --help-command file) and get_filename_component. Sent from my iPhone On Jun 11, 2012, at 11:09, GOO Creations wrote: Hi all, I want to recursively scan all sub-directories (and their sub-directories, etc ...) and determine if the directory contains a

[CMake] Recursively add directories to INCLUDE_DIRECTORIES

2012-06-11 Thread GOO Creations
Hi all, I want to recursively scan all sub-directories (and their sub-directories, etc ...) and determine if the directory contains a header (.h) file. I then want to add this directory to INCLUDE_DIRECTORIES. The best thing (according to my CMake knowledge) is to write a macro for this and

[CMake] Linking to binary library with a relative path

2012-03-14 Thread GOO Creations
Hi all, I have a small problem linking a external library to my project. Here is an indication of my directory structure. root (dir) |- external (dir) |- external.so (shared library) |- mylibs (dir) |- |- myprog (executable) In the directory "mylibs" all my source code is locat