[ https://issues.apache.org/jira/browse/PROTON-2774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robbie Gemmell updated PROTON-2774: ----------------------------------- Description: replace CMAKE_SOURCE_DIR variable with PROJECT_SOURCE_DIR ================ Original description, overall task not completed, just element above (see comment) CMake recognizes the notion that project may be either top-level, or included from other projects that intend to depend on it. [https://cmake.org/cmake/help/latest/variable/PROJECT_IS_TOP_LEVEL.html] This inclusion is performed either with add_subdirectory() or by FetchContent_MakeAvailable(). There are several preconditions for this to work #. proton must compile cleanly with whatever compile (warning) flags the top-level project sets; I intend to clean proton so that it compiles with qpid-dispatch/skupper-router flags #. CMakeLists.txt need to be written to not assume that CMAKE_SOURCE_DIRECTORY corresponds to the currently active project. Use the PROJECT_SOURCE_DIRECTORY and similar variables instead. #. targets in CMakeLists.txt must be written so that they can be immediately used by the including projects #. tests and other miscellaneous parts of the project should not be enabled when proton is not the top-project As an example, the Google Test project supports this kind of composite builds. was: replace CMAKE_SOURCE_DIR variable with PROJECT_SOURCE_DIR ================ Original description, task not completed ( CMake recognizes the notion that project may be either top-level, or included from other projects that intend to depend on it. https://cmake.org/cmake/help/latest/variable/PROJECT_IS_TOP_LEVEL.html This inclusion is performed either with add_subdirectory() or by FetchContent_MakeAvailable(). There are several preconditions for this to work #. proton must compile cleanly with whatever compile (warning) flags the top-level project sets; I intend to clean proton so that it compiles with qpid-dispatch/skupper-router flags #. CMakeLists.txt need to be written to not assume that CMAKE_SOURCE_DIRECTORY corresponds to the currently active project. Use the PROJECT_SOURCE_DIRECTORY and similar variables instead. #. targets in CMakeLists.txt must be written so that they can be immediately used by the including projects #. tests and other miscellaneous parts of the project should not be enabled when proton is not the top-project As an example, the Google Test project supports this kind of composite builds. > Support composite CMake builds > ------------------------------ > > Key: PROTON-2774 > URL: https://issues.apache.org/jira/browse/PROTON-2774 > Project: Qpid Proton > Issue Type: Improvement > Components: build, proton-c > Affects Versions: proton-c-0.39.0 > Reporter: Jiri Daněk > Assignee: Jiri Daněk > Priority: Major > Fix For: proton-c-0.40.0 > > > replace CMAKE_SOURCE_DIR variable with PROJECT_SOURCE_DIR > ================ > Original description, overall task not completed, just element above (see > comment) > > CMake recognizes the notion that project may be either top-level, or included > from other projects that intend to depend on it. > [https://cmake.org/cmake/help/latest/variable/PROJECT_IS_TOP_LEVEL.html] > This inclusion is performed either with add_subdirectory() or by > FetchContent_MakeAvailable(). > There are several preconditions for this to work > #. proton must compile cleanly with whatever compile (warning) flags the > top-level project sets; I intend to clean proton so that it compiles with > qpid-dispatch/skupper-router flags > #. CMakeLists.txt need to be written to not assume that > CMAKE_SOURCE_DIRECTORY corresponds to the currently active project. Use the > PROJECT_SOURCE_DIRECTORY and similar variables instead. > #. targets in CMakeLists.txt must be written so that they can be immediately > used by the including projects > #. tests and other miscellaneous parts of the project should not be enabled > when proton is not the top-project > As an example, the Google Test project supports this kind of composite builds. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org