On Thursday, April 14, 2016 at 4:18:07 PM UTC-5, Andrey Semashev wrote:
On 2016-04-14 22:00, Edward Diener wrote:
On 4/14/2016 1:37 PM, Rene Rivera wrote:
On Thu, Apr 14, 2016 at 12:33 PM, Louis Dionne
javascript:> wrote: Don't overthink it. All I'm saying is that the Boost guidelines recommend that CMakeLists.txt should appear in $some_library/build/CMakeLists.txt, while I argue that current practice is to put it in $some_library/CMakeLists.txt.
Just to be clear. It's not a recommendation. It's a requirement.
Ideally could not one have a CMakeLists.txt file wherever there is currently a jamfile ? In the library's 'build' directory to build a non-header only library, in the library's 'doc' directory to build the docs, in the library's 'test' directory to run the tests etc.
Yes, that is possible and what should be done according to the current guidelines. It's just not how it's typically done in other projects that use cmake.
The cmake files could be separated out to different directories, however there needs to be a top-level cmake to bring all of them together. This is because cmake is more of a configuration system rather than just a build system. So it can generate files for any build systems, Makefiles, Visual Studio. Technically, it could generate build files for boost, however, its not supported. So first you create and configure a build directory: mkdir build cd build cmake .. Then you can invoke the build through "targets". So if you want to build the tests you might build the 'check' target: cmake --build . --target check This is different than Boost.Build where you just cd into a directory and start building. This is why a top-level cmake file is important. The cmake file can be easily split across multiple cmake files if the library author wants, but there needs to be one at the top-level to glue them all together.
My personal problem with CMake is, while the language to use it is more understandable for me than 'jam', its doc is just as hard for me to understand as Boost Build if not even harder <g>. Mastering yet another build system which is documented mainly for those who already know what it is about is not my idea of programming fun.
Unlike Boost.Build, cmake has built in commands 'cmake --help*' which at least make it easier to use when you know what you're doing.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost