[CMake] newbie q - where do I put what in which CMakeLists file? out of source build

Michael Hertling mhertling at online.de
Wed Mar 9 13:09:39 EST 2011


On 03/09/2011 05:54 PM, Pierre Abbat wrote:
> On Wednesday 09 March 2011 10:22:50 Michael Wild wrote:
>> Make the ~/tone12/CMakeLists.txt your main CMake file (i.e. put the
>> project() command in there and all other commands that apply to the
>> whole project) and add a "add_subdirectory(src)" call, and then call
>> CMake with "cmake .." instead.
> 
> Doesn't work. config.h is in ~/tone12/build as before, but it says it can't 
> find it, and with VERBOSE=1 it appears to be compiling the file into 
> ~/tone12/src/, which shouldn't exist. The package contains everything in 
> ~/tone12/build and lots of temporary files, which shouldn't be in a package.
> 
> Pierre

Could you boil down your project to a minimal but complete example
which demonstrates the issues with the header not being found and
the files not being placed properly and post it here?

Regards,

Michael


More information about the CMake mailing list