Hi,

I have the following setup:

CMakeLists.txt [have project()]
externals\CMakeLists.txt [add_subdirectory(file)]
externals\file\CMakeLists.txt [have project()]

The problem I am facing is because in the last txt-file I have:
add_executable(file <srcs>)

when I ask to show the directories, what I get is this:
PROJECT_SOURCE_DIR: /.../externals/file
PROJECT_BINARY_DIR:  /.../build/externals/file
CMAKE_CURRENT_BINARY_DIR:  /.../build/externals/file

So far it is logical.

When I "make" it, it says:
Linking C executable ../../bin/file

But the current binary directory is "build/externals/file", why does
it build in "../../bin"??

How can I know in what directory the executable is being build? I
thought this was always in "CMAKE_CURRENT_BINARY_DIR"?


Thanks,
Steven
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to