I'm not an experimented CMake user, I'm currently trying to include an existing project to a top project and the CMakelists.txt
of the top level project is very simple:
cmake_minimum_required(VERSION 2.8)
project(A)
add_subdirectory(B)
As a mater of testing gradually at this point, I wanted to see if the targets defined in project B are building.
So running a make all
from the build directory of project A builds correctly, but some target which are not part of all fail to build from project A build directory, where I'm getting link errors with "undefined reference", while the same target could build successfully from the project B' build directory.
Could somebody explain please what the issue could be?