Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake error CMP0002 when added multiple times #309

Open
alexmrtn opened this issue Aug 26, 2019 · 0 comments
Open

CMake error CMP0002 when added multiple times #309

alexmrtn opened this issue Aug 26, 2019 · 0 comments

Comments

@alexmrtn
Copy link

alexmrtn commented Aug 26, 2019

Hi,

The top level CMakeLists.txt file is missing a guard when this project is recursively added in several places. As example, if a project uses both azure-iot-sdk-c and azure-event-hubs-c using the add_subdirectory cmake function, it triggers a CMP0002 error.

Can you add this lines of code as it is done for the umqtt to fix this ?

if (TARGET amqp)
    RETURN()
endif()

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant