Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ build*/
!.vscode/launch.json
.gitattributes
compile_commands.json
CMakeUserPresets.json
/*.cpp
/*.patch
/*.diff
Expand Down
1 change: 1 addition & 0 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,5 @@ def package(self):
def package_info(self):
self.cpp_info.set_property("cmake_file_name", "P2300")
self.cpp_info.set_property("cmake_target_name", "P2300::P2300")
self.cpp_info.set_property("cmake_target_aliases", ["STDEXEC::stdexec"])
Comment on lines 58 to +60
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm no conan expert myself, but what do the two lines above yours do? there is no "P2300" file or "P2300::P2300" target.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attn @kexianda

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ericniebler Sorry for late replay.

It is a minor issue. Let me explain:

1, self.cpp_info.set_property("cmake_file_name", "P2300")
self.cpp_info.set_property("cmake_target_name", "P2300::P2300")

The cmake target name of execution is STDEXEC::stdexec. It was declared as P2300::P2300 in the conanfile years ago. Conan will generate a Find-P2300.cmake, wiht the target name P2300::P2300.

2, self.cpp_info.set_property("cmake_target_aliases", ["STDEXEC::stdexec"])
Adding an alias(STDEXEC::stdexec) of cmake target for execution

self.cpp_info.libs = ["system_context"]
2 changes: 1 addition & 1 deletion test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ enable_testing()
find_package(P2300 REQUIRED)

add_executable(test_stdexec test.cpp)
target_link_libraries(test_stdexec P2300::P2300)
target_link_libraries(test_stdexec STDEXEC::stdexec)
add_test(test_stdexec test_stdexec)
Loading