| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Some pkg-config implementations on Windows don't return the same
results as those on other platforms. They appear to be bugs in those
implementations, the one that comes with Strawberry perl being one
case where this was observed. The handling of Libs and Cflags entries
is incomplete, resulting in some flags not being reported where they
should be. These are faults in the pkg-config implementation, not in
CMake or its tests, so we disable those parts of the tests on Windows
to avoid reporting false positives.
|
|
|
|
|
|
|
|
|
| |
The documentation of pkg_check_modules() is a little ambiguous about
whether spaces are allowed in a moduleSpec that includes a version
constraint. All examples in the docs do not have spaces, so it could be
claimed spaces are not supported. The tests fail on Windows when spaces
are included, likely because some pkg-config implementations don't
support that. Update the tests to not assume spaces are supported as
part of a moduleSpec.
|
|
|
|
|
|
|
|
|
| |
The Windows implementation of these tests have been found to not
handle Windows paths and path separators properly in a number of
areas. The whole approach taken in these tests appears dubious, so
they may need to be significantly rewritten. Disable them until then
so we don't get false positives.
Issue: #22031
|
|
|
|
|
|
|
|
|
| |
Older versions of pkg-config (e.g. 0.21 and 0.22) do not
handle correctly spaces in paths specified in .pc files.
It breaks RunCMake.FindPkgConfig test, if CMake is built
inside path containing spaces. In this case, we check if
we're inside such path, and if pkg-config is broken; and
if both are true, test is to be skipped.
|
|
|
|
|
|
|
|
|
|
| |
Revert commit 020976d637 (FindPkgConfig: Populate
_STATIC_LINK_LIBRARIES. Add STATIC_TARGET., 2021-12-31,
v3.24.0-rc1~105^2). Several regressions have been reported.
Revert the feature pending further discussion and design work.
Issue: #21714
Fixes: #23642
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add LINK_LIBRARIES test to demonstrate static linking of transitive
dependencies.
Add STATIC_TARGET argument to pkg_check_modules() and pkg_search_module().
Influences the properties of target produced by IMPORTED_TARGET.
When enabled: target's properties will be populated from <XXX>_STATIC_*
variables instead of from <XXX>_* variables.
Update existing tests concerning properties of targets produced via
IMPORTED_TARGET, to test STATIC_TARGET variant too.
Update existing tests concerning <XXX>_* variables to test <XXX>_STATIC_*
variables too.
Breaking changes to pkg_check_modules() and pkg_search_module():
- Variables CMAKE_FIND_LIBRARY_PREFIXES and CMAKE_FIND_LIBRARY_SUFFIXES can no
longer be used to influence library lookup (i.e. the internal call to
find_library()), because FindPkgConfig now internally relies on these
variables to differentiate between shared and static library lookup.
Prefer CMAKE_SHARED_LIBRARY_PREFIX + CMAKE_SHARED_LIBRARY_SUFFIX, or
CMAKE_STATIC_LIBRARY_PREFIX + CMAKE_STATIC_LIBRARY_SUFFIX, depending on
whether you wish to impact static or shared lookup.
- <XXX>_LINK_LIBRARIES will now be populated only with libraries
located via CMAKE_SHARED_LIBRARY_PREFIX + CMAKE_SHARED_LIBRARY_SUFFIX match
- <XXX>_STATIC_LIBRARIES now processes -framework options
- <XXX>_STATIC_LDFLAGS_OTHER now processes -framework options
- <XXX>_STATIC_CFLAGS_OTHER now processes -isystem options
- <XXX>_STATIC_INCLUDE_DIRS now processes -isystem options
Fixes: #21714
|
| |
|
|
|
|
|
|
|
|
| |
Treat backslash-escaped spaces as "space within argument" rather than
"space delimiting arguments".
Update our `FindPkgConfig_LIBRARY_PATH` test case to escape spaces in
the path, and run it unconditionally.
|
|\
| |
| |
| |
| |
| |
| | |
17e4934dbf FindPkgConfig: Restore legacy behavior when CMP0126 is set to NEW
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6461
|
| |
| |
| |
| |
| |
| | |
Module behavior must be independent from `CMP0126` policy.
Fixes: #22526
|
| |
| |
| |
| |
| |
| |
| |
| | |
Tell `pkg-config --libs` not to filter out `-L` flags for entries of
`PKG_CONFIG_SYSTEM_LIBRARY_PATH` (and `LIBRARY_PATH` for `pkgconf`).
We should always search everywhere the `.pc` file expects.
Fixes: #22148
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's common for some people to use the PKG_CONFIG environment variable
to not only load a custom pkg-config/pkgconf but also to load some
default arguments such as `--static` or `--keep-system-libs` which often
worked since shell scripts would call `$PKG_CONFIG --libs pkg` without
quotes, but this breaks FindPkgConfig since it uses the full string as
`argv[0]` and might try looking for a binary called `pkgconf --static`,
instead of looking for `pkgconf` and adding `--static` as the `argv[1]`
Additionally adds RunCMake.FindPkgConfig ARGN test case
Fixes: #22305
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
|
|
|
|
| |
Fixes: #22180
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
8b12982653 Merge branch 'backport-test-FindPkgConfig-isolate-env'
4c939b0d39 Tests: Isolate RunCMake.FindPkgConfig from caller environment
20eeb40aaf Tests: Isolate RunCMake.FindPkgConfig from caller environment
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5108
|
| |
| |
| |
| |
| | |
Avoid interference from `CMAKE_PREFIX_PATH` and friends if they
happen to be set in the environment from which the tests are run.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
See https://github.com/codespell-project/codespell#readme
The following command was used:
```
codespell -q6 --skip="\
.git,\
*.json,\
./Copyright.txt,\
./Help/command/foreach.rst,\
./Help/prop_test/REQUIRED_FILES.rst,\
./Help/variable/CTEST_COVERAGE_COMMAND.rst,\
./Modules/CMakeCheckCompilerFlagCommonPatterns.cmake,\
./Modules/CMakeRCInformation.cmake,\
./Modules/Internal/CPack/NSIS.template.in,\
./Modules/FindMatlab.cmake,\
./Modules/MatlabTestsRedirect.cmake,\
./Modules/Platform/Windows-Clang.cmake,\
./Modules/Platform/Windows-Intel-Fortran.cmake,\
./Modules/Platform/Windows-MSVC.cmake,\
./Source/CMakeVersion.cmake,\
./Source/cmConvertMSBuildXMLToJSON.py,\
./Source/cmCreateTestSourceList.cxx,\
./Source/cmGlobalVisualStudio10Generator.cxx,\
./Source/cmExportBuildFileGenerator.cxx,\
./Source/cmExportInstallAndroidMKGenerator.cxx,\
./Source/cmExportInstallFileGenerator.cxx,\
./Source/cmExportSet.cxx,\
./Source/cmExportTryCompileFileGenerator.cxx,\
./Source/cmFindPackageCommand.cxx,\
./Source/cmInstallCommand.cxx,\
./Source/cmGeneratorExpressionLexer.cxx,\
./Source/cmLocalVisualStudio7Generator.cxx,\
./Source/cmOrderDirectories.cxx,\
./Source/cmTarget.cxx,\
./Source/kwsys/*,\
./Source/QtDialog/CMakeSetupDialog.ui,\
./Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx,\
./Source/CTest/cmParseCoberturaCoverage.h,\
./Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in,\
./Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt,\
./Tests/RunCMake/GoogleTest/xml_output.cpp,\
./Tests/RunCMake/Make/TargetMessages*,\
./Utilities/*,\
" \
-L "\
dependees,\
endwhile,\
fo,\
filetest,\
helpfull,\
nd,\
objext,\
stoll,\
supercedes,\
superceded,\
vas,\
varn,\
"
```
|
|/
|
|
| |
Use 3.3 or 2.8.12 where possible.
|
|
|
|
| |
Fixes: #20652
|
| |
|
|
|
|
|
| |
These tests are only run on Apple platforms, so remove code for all other
platforms form them.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
pkg-config's .pc files can sometimes provide libraries that are visible to
the linker but not present in CMake's known search paths. In the case
where CMake can find some, but not all of the library dependencies
provided in a .pc file, this allows them to be passed through as "-lfoo"
when the full path can't be found.
This also removes the test failure cases that occured because of this
scenario and adjsuts the remaining tests to account for not-found
libraries
|
|
|
|
|
|
|
|
|
|
| |
When running `pkg_search_module`, it may be useful to get the matching
module name in order to run `pkg_get_variable`.
`pkg_search_module` now defines `<prefix>_MODULE_NAME` which contains
the first matching module name.
Fixes: #19648
|
|
|
|
| |
Fixes: #15805
|
|
|
|
| |
Issue: #15805
|
| |
|
|
|
|
| |
Fixes: #18416
|
| |
|
| |
|
|
|
|
| |
Some are user-facing. Others are source comments.
|
| |
|
| |
|
|
|
|
| |
Instead of the deprecated --atleast-version one.
|
|
|
|
|
|
|
| |
Add a ``FIND_LIBRARY_USE_LIB32_PATHS`` global property analogous to the
``FIND_LIBRARY_USE_LIB64_PATHS`` property. This helps find commands on
multilib systems that use ``lib32`` directories and either do not have
``lib`` symlinks or point ``lib`` to ``lib64``.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The fix in commit v3.5.0-rc1~27^2 (FindPkgConfig: set standard variables
in the cache, 2016-01-20) added the wrong variable name to the cache.
The test was only testing that the cache variable existed, not that it
also had the correct value. Update the test to ensure that the cache
value matches the local variable value.
Reported-by: Bernd Lörwald
|
|
|
|
|
|
|
|
|
| |
Fixes a regression introduced when the code was simplified to use the
variable queries.
Fixes #15903.
Reported-by: Bernd Lörwald
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases, CMake returned the following error:
-- Checking for module 'foo'
-- Package 'foo' not found
When the actual error returned by pkg-config was:
Package 'bar', required by 'foo', not found
Now, the actual error is forwarded to the user.
-- Checking for module 'foo'
-- Package 'bar', required by 'foo', not found
For the standard case (i.e. the package was indeed not found), the
CMake error was:
-- Checking for module 'foo'
-- Package 'foo' not found
But it now prints:
-- Checking for module 'foo'
-- No package 'foo' found
The associated test was also updated. ${last} refers to the last
CLI argument.
|
| |
|
|
|
|
|
|
|
|
| |
The CMAKE_FRAMEWORK_PATH and CMAKE_APPBUNDLE_PATH cache variables are
supposed to be used to generate the extra paths passed to pkg-config,
but instead the CMAKE_PREFIX_PATH variable is used.
This bug was introduced by the refactor in commit v3.1.0-rc1~747^2~1.
|
|
|
|
|
| |
Hack the CMP0054 warning locally to be an error and run the test suite.
Resolve CMP0054 in Tests/* code as appropriate for each case.
|
| |
|
|
Use CMAKE_PREFIX_PATH, CMAKE_FRAMEWORK_PATH, and CMAKE_APPBUNDLE_PATH
cache and environment variables to extend PKG_CONFIG_PATH before calling
pkg-config.
In each of the path in these variables it searches for lib/pkgconfig.
Then, depending on the system, it searches for
lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig (debian) or for
lib64/pkgconfig (other 64 bit unixes). If any of these path is found,
it is appended to the PKG_CONFIG_PATH enviromnent variable.
Add two new arguments to the pkg_check_module and pkg_search_module
macro, NO_CMAKE_PATH and NO_CMAKE_ENVIRONMENT_PATH. The new signature
are therefore:
pkg_check_modules(<PREFIX> [REQUIRED] [QUIET]
[NO_CMAKE_PATH] [NO_CMAKE_ENVIRONMENT_PATH]
<MODULE> [<MODULE>]*)
pkg_search_module(<PREFIX> [REQUIRED] [QUIET]
[NO_CMAKE_PATH] [NO_CMAKE_ENVIRONMENT_PATH]
<MODULE> [<MODULE>]*)
By default, if CMAKE_MINIMUM_REQUIRED_VERSION is 3.1 or later (in
order to keep compatibility with the previous behavior), or if
PKG_CONFIG_USE_CMAKE_PREFIX_PATH is set, the CMAKE_PREFIX_PATH,
CMAKE_FRAMEWORK_PATH, and CMAKE_APPBUNDLE_PATH cache and environment
variables will be added to pkgconfig search path.
The NO_CMAKE_PATH and NO_CMAKE_ENVIRONMENT_PATH arguments disable this
behavior for the cache variables and the environment variables,
respectively, similarly to the find_package() command.
|