Skip to content

Update 1.11 release notes#384

Merged
zeux merged 2 commits intozeux:masterfrom
mathstuf:update-1.11-release-notes
Dec 4, 2020
Merged

Update 1.11 release notes#384
zeux merged 2 commits intozeux:masterfrom
mathstuf:update-1.11-release-notes

Conversation

@mathstuf
Copy link
Copy Markdown
Contributor

@mathstuf mathstuf commented Dec 2, 2020


This change came as news to us. Adding a release note and compatibility for others in the future :) .

For users using older pugixml releases, add an ALIAS target which works
with the new versions too.
@mathstuf mathstuf force-pushed the update-1.11-release-notes branch from 8a1e7f2 to d1d415e Compare December 2, 2020 22:17
@zeux
Copy link
Copy Markdown
Owner

zeux commented Dec 3, 2020

This definitely wasn't intended. CMakeLists.txt does have this:

add_library(pugixml INTERFACE)
target_link_libraries(pugixml INTERFACE ${pugixml-alias})
add_library(pugixml::pugixml ALIAS pugixml)

So I'd think that pugixml::pugixml and pugixml are already equivalent - is that not the case?

@zeux
Copy link
Copy Markdown
Owner

zeux commented Dec 3, 2020

(and your change would make the alias self-recursive which doesn't seem right, but I'm not a CMake expert so maybe I'm missing something)

@mathstuf
Copy link
Copy Markdown
Contributor Author

mathstuf commented Dec 3, 2020

My change is for users of find_package(pugixml) which work with 1.10 so that they continue to work with 1.12 and newer (1.11 being the "broken" release without compat).

@zeux
Copy link
Copy Markdown
Owner

zeux commented Dec 3, 2020

Mhm - before the CMake rework I can see this worked as is after using find_package:

target_link_libraries(test pugixml)

But after it doing this doesn't seem to add public includes so #include "pugixml.hpp" doesn't work. Using pugixml::pugixml target fixes this.

I'd rather fix this unconditionally because the intention was to make it possible to depend on pugixml throughout the transition but I'm not sure what the best option to do so is - a circular alias seems wrong to me. @slurps-mad-rips any comments?

@zeux
Copy link
Copy Markdown
Owner

zeux commented Dec 3, 2020

Full example that I've tried:

test.cpp:

#include "pugixml.hpp"

int main()
{
    pugi::xml_document doc;
}

CMakeLists.txt:

cmake_minimum_required(VERSION 3.0)
project(test)
add_executable(test test.cpp)
find_package(pugixml)
target_link_libraries(test pugixml)

@mathstuf
Copy link
Copy Markdown
Contributor Author

mathstuf commented Dec 3, 2020

I'd rather fix this unconditionally because the intention was to make it possible to depend on pugixml throughout the transition but I'm not sure what the best option to do so is - a circular alias seems wrong to me.

There is no circular alias. the add_library(pugixml::pugixml ALIAS) call in CMakeLists.txt makes pugixml::pugixml work in the pugixml build. The one I'm adding here makes pugixml available at find_package(pugixml) time (currently, no such target exists).

@zeux
Copy link
Copy Markdown
Owner

zeux commented Dec 3, 2020

Ahh the change is in the .cmake.in file - I missed that. Would there be any harm in adding this alias unconditionally?

@mathstuf
Copy link
Copy Markdown
Contributor Author

mathstuf commented Dec 3, 2020

I think it'd be nice to deprecate the old, un-namespaced, target eventually. The way it is now in this PR is that find_package(pugixml 1.11) would not provide the old target, but find_package(pugixml 1.9) would provide it (so that there's only one target name to use).

@zeux
Copy link
Copy Markdown
Owner

zeux commented Dec 4, 2020

I guess I don't see the potential for the deprecation until 2.0... But this doesn't seem to be harmful so I'll merge this as is. Thanks!

@zeux zeux merged commit 68a92aa into zeux:master Dec 4, 2020
@randyfan
Copy link
Copy Markdown

randyfan commented Dec 10, 2020

I'm getting the following error using the latest version (did not have this error in 1.10):
image

Here's a screenshot of my CMakeLists.txt which uses find_package(pugixml REQUIRED):
image

Any ideas what's causing the configure error? I'm a beginner CMake user

@mathstuf
Copy link
Copy Markdown
Contributor Author

Fixed in #389.

@mathstuf mathstuf deleted the update-1.11-release-notes branch December 10, 2020 12:55
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

Successfully merging this pull request may close these issues.

3 participants