-
Notifications
You must be signed in to change notification settings - Fork 804
Open
Description
Describe the bug
BTCPP_LIBRARY_VERSION can get the value of CMAKE_PROJECT_VERSION from the project parent.
grep -rnHe "BTCPP_LIBRARY_VERSION"
src/behavior_tree.cpp:118: auto const parts = splitString(BTCPP_LIBRARY_VERSION, '.');
src/behavior_tree.cpp:127: return BTCPP_LIBRARY_VERSION;
CMakeLists.txt:257:target_compile_definitions(${BTCPP_LIBRARY} PUBLIC BTCPP_LIBRARY_VERSION="${CMAKE_PROJECT_VERSION}")
How to Reproduce
I'm not totally sure how to reproduce.
Inside a CMakeList.txt:
FetchContent_Declare(
BehaviorTree
GIT_REPOSITORY https://github.com/BehaviorTree/BehaviorTree.CPP.git
GIT_TAG 4.6.2)
FetchContent_MakeAvailable(BehaviorTree)
Compiling in verbose mode, you can see different values :
- Either get the GIT_TAG of another FetchContent_Declare
... -DBTCPP_LIBRARY_VERSION=\"0.11.1\"
- or a dummy value:
... -DBTCPP_LIBRARY_VERSION=\"\"
- or even:
... -DBTCPP_LIBRARY_VERSION=\"1.0.0\"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels