It would be helpful if the cmake build was fixed to not require some specific custom setup that was used by the author during development. The cmake list file seems to check for the existence of a cmake test file, to decide whether or not to build the tests. These files seem to have been moved outside reach of the setup in place, under test/test_cmake. Also, it would be better to get rid of this: add_subdirectory(../../../.. "${CMAKE_CURRENT_BINARY_DIR}/boost_superproject") Ideally, these cmake tests should assume scope is a submodule, or a subfolder, of the boost super project. Claudio.
On 11/28/23 12:34, Claudio DeSouza via Boost wrote:
It would be helpful if the cmake build was fixed to not require some specific custom setup that was used by the author during development.
The cmake list file seems to check for the existence of a cmake test file, to decide whether or not to build the tests. These files seem to have been moved outside reach of the setup in place, under test/test_cmake. Also, it would be better to get rid of this:
add_subdirectory(../../../.. "${CMAKE_CURRENT_BINARY_DIR}/boost_superproject")
Ideally, these cmake tests should assume scope is a submodule, or a subfolder, of the boost super project.
CMake is not used to run the library tests. Library testing is done exclusively with b2. Hence test/CMakeLists.txt is intentionally missing and add_subdirectory(test) is skipped. test/test_cmake is a test for CMakeLists.txt in Boost.Scope root (that is, it tests that it is syntactically correct and lists all the necessary dependencies). It does not run the actual library tests. In test/test_cmake/CMakeLists.txt, add_subdirectory(../../../.. "${CMAKE_CURRENT_BINARY_DIR}/boost_superproject") is necessary to define all Boost library targets, so that the dependencies in the main Boost.Scope CMakeLists.txt can be resolved. For it to work, Boost.Scope should be part of Boost directory structure. The is, the contents of the Boost.Scope repository is expected to be in libs/scope in the Boost tree. The CMake test is not supposed to be run on a standalone Boost.Scope.
Andrey Semashev wrote:
CMake is not used to run the library tests. Library testing is done exclusively with b2. Hence test/CMakeLists.txt is intentionally missing and add_subdirectory(test) is skipped.
It's useful nowadays to have a working test/CMakeLists.txt, because more and more people use CMake for evaluating and testing Boost libraries, and expect the procedure described at https://github.com/boostorg/cmake#testing-boost-with-cmake to work. Even though the test/Jamfile for Scope isn't of the trivial form supported by boost_test_jamfile, porting it isn't hard, and I've done so: https://github.com/pdimov/scope/blob/feature/test-cml/test/CMakeLists.txt People who would want to use CMake to run the tests should place this CMakeLists.txt file in the libs/scope/test/ directory. This is not a 100% port because it doesn't contain the header check part, but it's good enough and significantly better than nothing. At some point we should probably add having CMake-invocable tests as a library requirement. But I probably need to finish the documentation on how to do that, first.
On 11/28/23 1:34 AM, Claudio DeSouza via Boost wrote:
add_subdirectory(../../../.. "${CMAKE_CURRENT_BINARY_DIR}/boost_superproject")
Ideally, these cmake tests should assume scope is a submodule, or a subfolder, of the boost super project.
I would disagree with this. This would be a defacto circular dependency: boost_superproject -> submodule scope -> boost superproject. I think this would conflict with efforts to "modularize boost". I see this latter at the ability to ship/build/test a library without having to require that the library be part of something else.
Claudio.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (4)
-
Andrey Semashev
-
Claudio DeSouza
-
Peter Dimov
-
Robert Ramey