[CMake] Errors when building from project root
Philip Lowman
philip at yhbt.com
Sun Feb 15 19:47:24 EST 2009
On Sun, Feb 15, 2009 at 4:05 PM, Wade Williams <wadesworld at mac.com> wrote:
> I have a project that looks like:
>
> project_root/lib/util
>
> In util is the CMakeLists.txt file that contains all the necessary commands
> to build the util lib.
>
> In the lib dir is a CMakeLists.txt file that simply has
> add_subdirectory(util).
>
> In the project_root dir is a CMakeLists.txt file that simply has
> add_subdirectory(lib).
>
> If I enter the util directory and issue:
>
> cmake .
> make
>
> then the library builds fine.
>
> If I enter lib and do the same, the library builds fine.
>
> but if I enter the project root and do the same, I get errors about a
> header not being found. I'm confused as to how that can be the case if the
> two dependent directories built fine?
>
> Any thoughts as to why this might be happening?
You might not be building what you think you're building in the project
root. You could try make "VERBOSE=1" to see the compilation flags that are
being used and compare what happens when you invoke make in the two
directories.
--
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090215/88463449/attachment.htm>
More information about the CMake
mailing list