On 17 December 2013 14:27, J Decker <d3c...@gmail.com> wrote:
> which is... build seperately into seperate directories even with makefile.
> [...]

Yes, and that is a good feature of CMake.
What is still unclear to me is how the package registry works in such case.

Here is the basic example to support my previous question:

A library project:

/FooBar/
/FooBar/CMakeLists.txt
/FooBar/FooBarConfig.cmake

build in two variants:

cd /FooBar-build-debug
cmake -DCMAKE_BUILD_TYPE=Debug ../FooBar
cd /FooBar-build-release
cmake -DCMAKE_BUILD_TYPE=Release ../FooBar

A library client project with approach to structure and builds:

/FooBarUser/CMakeLists.txt
cd /FooBarUser-build-debug
cmake -DCMAKE_BUILD_TYPE=Debug ../FooBarUser
cd /FooBarUser-build-release
cmake -DCMAKE_BUILD_TYPE=Release ../FooBarUser

In /FooBarUser/CMakeLists.txt, there is find_package(FooBar)
which is supposed to look for FooBar in my local
package registry ~/.cmake to find FooBar from its build tree
(here, I'm interested in development workflow w/o installation).

Here come my questions":


Which FooBar build is picked?
How does CMake decide to pick one or another?
How do I configure CMakeLists.txt of FooBar and FooBarUser
so this command building FooBarUser client
picks FooBar from  /FooBar-build-debug

cmake -DCMAKE_BUILD_TYPE=Debug ../FooBarUser

and this picks FooBar from  /FooBar-build-release

cmake -DCMAKE_BUILD_TYPE=Release ../FooBarUser

?

Hopefully, I've managed to clarify what I'm asking about.

Best regards,
-- 
Mateusz  Łoskot, http://mateusz.loskot.net
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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

Reply via email to