Add conditional check for sqlpp23 alias creation#97
Add conditional check for sqlpp23 alias creation#97bmarques1995 wants to merge 1 commit intorbock:mainfrom
Conversation
Check if target sqlpp23::sqlpp23 exists before creating alias.
|
I have a couple of questions about this PR:
|
for the first question, I used the target provided by the project (at cmake/configs/Sqlpp23Config.cmake) |
Which target did you use, was it
Again, can you provide the minimal reproducible example? Actually I cannot imagine how and why it would try to create a second alias. I'd like to examine the problem in more detail, because the proposed fix in your PR seems to be masking some other bug. |
|
I tried to reproduce the problem, that your PR tries to fix, with the connection pool example. The connection pool example needed a few minor fixes (see the other PR that I just submitted), but otherwise it worked fine. I tried modifying its CMakeLists.txt and replaced the So for me everything works correctly, just as expected. As I said before, I really want to see your minimal reproducible example, because I am unable to reproduce the error on my machine. Just for the record, I am using |
I will send a minimum example later |
|
Thanks for the discussion (especially since I am not a CMake expert at all)! I suggest to create an issue to discuss what's currently wrong. |
That makes sense indeed. I don't quite understand what is the error that bmarques1995 gets. From his explanation it seems that there is an attempt to define the target That's why I agree that it makes sense for @bmarques1995 to open an issue and provide the error message from CMake that he gets, ideally coupled with a minimal reproducible example. |
Check if target sqlpp23::sqlpp23 exists before creating alias. this is important if you need to recreate the cmake target