<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/cmake/Modules/FindPrefixFromConfig.cmake, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[cmake] Resolve symlink when finding install prefix (#124743)</title>
<updated>2025-03-18T13:48:40+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-03-18T13:48:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2fbfbf499eabb84024541060c61f0d88e882c167'/>
<id>2fbfbf499eabb84024541060c61f0d88e882c167</id>
<content type='text'>
When determining the install prefix in LLVMConfig.cmake etc resolve
symlinks in CMAKE_CURRENT_LIST_FILE first. The motivation for this is to
support symlinks like `/usr/lib64/cmake/llvm` to
`/usr/lib64/llvm19/lib/cmake/llvm`. This only works correctly if the
paths are relative to the resolved symlink.

It's worth noting that this *mostly* already works out of the box,
because cmake automatically does the symlink resolution when the library
is found via CMAKE_PREFIX_PATH. It just doesn't happen when it's found
via the default prefix path.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When determining the install prefix in LLVMConfig.cmake etc resolve
symlinks in CMAKE_CURRENT_LIST_FILE first. The motivation for this is to
support symlinks like `/usr/lib64/cmake/llvm` to
`/usr/lib64/llvm19/lib/cmake/llvm`. This only works correctly if the
paths are relative to the resolved symlink.

It's worth noting that this *mostly* already works out of the box,
because cmake automatically does the symlink resolution when the library
is found via CMAKE_PREFIX_PATH. It just doesn't happen when it's found
via the default prefix path.</pre>
</div>
</content>
</entry>
<entry>
<title>[cmake] Fix missing paren in `FindPrefixFromConfig`</title>
<updated>2022-07-26T07:35:12+00:00</updated>
<author>
<name>John Ericson</name>
<email>John.Ericson@Obsidian.Systems</email>
</author>
<published>2022-07-26T07:29:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ae72cc72d7064fe0a71d41e0660a1cb6147de46a'/>
<id>ae72cc72d7064fe0a71d41e0660a1cb6147de46a</id>
<content type='text'>
This was in CMake syntax generation, so we didn't catch it eval time.

Follow up from D117973
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was in CMake syntax generation, so we didn't catch it eval time.

Follow up from D117973
</pre>
</div>
</content>
</entry>
<entry>
<title>[cmake] Support custom package install paths</title>
<updated>2022-07-25T21:02:53+00:00</updated>
<author>
<name>John Ericson</name>
<email>John.Ericson@Obsidian.Systems</email>
</author>
<published>2022-01-01T20:18:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ac0d1d5c7b7e0d572e35e31e0b59be765ca42a48'/>
<id>ac0d1d5c7b7e0d572e35e31e0b59be765ca42a48</id>
<content type='text'>
Firstly, we we make an additional GNUInstallDirs-style variable. With
NixOS, for example, this is crucial as we want those to go in
`${dev}/lib/cmake` not `${out}/lib/cmake` as that would a cmake subdir
of the "regular" libdir, which is installed even when no one needs to do
any development.

Secondly, we make *Config.cmake robust to absolute package install
paths. We for NixOS will in fact be passing them absolute paths to make
the `${dev}` vs `${out}` distinction mentioned above, and the
GNUInstallDirs-style variables are suposed to support absolute paths in
general so it's good practice besides the NixOS use-case.

Thirdly, we make `${project}_INSTALL_PACKAGE_DIR` CACHE PATHs like other
install dirs are.

Reviewed By: sebastian-ne

Differential Revision: https://reviews.llvm.org/D117973
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Firstly, we we make an additional GNUInstallDirs-style variable. With
NixOS, for example, this is crucial as we want those to go in
`${dev}/lib/cmake` not `${out}/lib/cmake` as that would a cmake subdir
of the "regular" libdir, which is installed even when no one needs to do
any development.

Secondly, we make *Config.cmake robust to absolute package install
paths. We for NixOS will in fact be passing them absolute paths to make
the `${dev}` vs `${out}` distinction mentioned above, and the
GNUInstallDirs-style variables are suposed to support absolute paths in
general so it's good practice besides the NixOS use-case.

Thirdly, we make `${project}_INSTALL_PACKAGE_DIR` CACHE PATHs like other
install dirs are.

Reviewed By: sebastian-ne

Differential Revision: https://reviews.llvm.org/D117973
</pre>
</div>
</content>
</entry>
<entry>
<title>[CMake] Factor out config prefix finding logic</title>
<updated>2022-01-07T20:16:18+00:00</updated>
<author>
<name>John Ericson</name>
<email>John.Ericson@Obsidian.Systems</email>
</author>
<published>2022-01-03T02:25:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=44e3365775101fec3fd355eda339282258d74415'/>
<id>44e3365775101fec3fd355eda339282258d74415</id>
<content type='text'>
See the docs in the new function for details.

 I think I found every instance of this copy pasted code. Polly could
 also use it, but currently does something different, so I will save the
 behavior change for a future revision.

We get the shared, non-installed CMake modules following the pattern
established in D116472.

It might be good to have LLD and Flang also use this, but that would be
a functional change and so I leave it as future work.

Reviewed By: beanz, lebedev.ri

Differential Revision: https://reviews.llvm.org/D116521
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See the docs in the new function for details.

 I think I found every instance of this copy pasted code. Polly could
 also use it, but currently does something different, so I will save the
 behavior change for a future revision.

We get the shared, non-installed CMake modules following the pattern
established in D116472.

It might be good to have LLD and Flang also use this, but that would be
a functional change and so I leave it as future work.

Reviewed By: beanz, lebedev.ri

Differential Revision: https://reviews.llvm.org/D116521
</pre>
</div>
</content>
</entry>
</feed>
