Skip to content

Avoid CMake config file case issues.#105

Merged
DanAlbert merged 1 commit intogoogle:masterfrom
DanAlbert:fix-cmake-package-case
Jun 1, 2020
Merged

Avoid CMake config file case issues.#105
DanAlbert merged 1 commit intogoogle:masterfrom
DanAlbert:fix-cmake-package-case

Conversation

@DanAlbert
Copy link
Copy Markdown
Contributor

https://cmake.org/cmake/help/latest/command/find_package.html says
that the config file can take two forms, Config.cmake or
-config.cmake. Right now we use the -config
form but don't transform the name to lower case.

Experimentally CMake uses the C locale for this, but the docs don't
take a stance (although it appears that anything outside
[A-Za-z0-9_.:+-]+ isn't valid in a target name anyway), so just
avoid the problem altogether than use the untransformed name.

No test added because until we actually work a full end-to-end test
that actually runs CMake into our tests there isn't any useful test to
write here.

Fixes #98

https://cmake.org/cmake/help/latest/command/find_package.html says
that the config file can take two forms, <PackageName>Config.cmake or
<lower-case-package-name>-config.cmake. Right now we use the -config
form but don't transform the name to lower case.

Experimentally CMake uses the C locale for this, but the docs don't
take a stance (although it appears that anything outside
`[A-Za-z0-9_.:+-]+` isn't valid in a target name anyway), so just
avoid the problem altogether than use the untransformed name.

No test added because until we actually work a full end-to-end test
that actually runs CMake into our tests there isn't any useful test to
write here.

Fixes google#98
@DanAlbert DanAlbert requested a review from enh-google June 1, 2020 21:45
@DanAlbert DanAlbert merged commit 301e444 into google:master Jun 1, 2020
@DanAlbert DanAlbert deleted the fix-cmake-package-case branch June 1, 2020 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants