diff options
author | Joris Clement <joris.clement@posteo.de> | 2022-10-28 17:22:47 +0200 |
---|---|---|
committer | Joris Clement <joris.clement@posteo.de> | 2022-10-28 17:22:47 +0200 |
commit | 92f183af49740154f33688695b254832ec50a561 (patch) | |
tree | 13be4e1aa43b3b73c3b6b481a9bdc0eeb4b1d40c | |
parent | 9ff3a595aafbbbf5da4c61aa9f56a7a13daf8feb (diff) | |
download | libarchive-92f183af49740154f33688695b254832ec50a561.tar.gz |
Fix CMake warning
The warnings occurs at least with CMake version 3.24. It is caused by
CMake trying to find the gcc library due to case sensitivity.
The warning message was:
```
CMake Warning (dev) at /usr/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (LIBGCC)
does not match the name of the calling package (LibGCC). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
build/cmake/FindLibGCC.cmake:17 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:1269 (FIND_PACKAGE)
This warning is for project developers. Use -Wno-dev to suppress it.
```
-rw-r--r-- | CMakeLists.txt | 7 | ||||
-rw-r--r-- | build/cmake/FindLIBGCC.cmake (renamed from build/cmake/FindLibGCC.cmake) | 0 |
2 files changed, 4 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e3bb6591..1130b8c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -213,7 +213,7 @@ OPTION(ENABLE_BZip2 "Enable the use of the system BZip2 library if found" ON) OPTION(ENABLE_LIBXML2 "Enable the use of the system libxml2 library if found" ON) OPTION(ENABLE_EXPAT "Enable the use of the system EXPAT library if found" ON) OPTION(ENABLE_PCREPOSIX "Enable the use of the system PCREPOSIX library if found" ON) -OPTION(ENABLE_LibGCC "Enable the use of the system LibGCC library if found" ON) +OPTION(ENABLE_LIBGCC "Enable the use of the system LibGCC library if found" ON) # CNG is used for encrypt/decrypt Zip archives on Windows. OPTION(ENABLE_CNG "Enable the use of CNG(Crypto Next Generation)" ON) @@ -1264,9 +1264,10 @@ IF(NOT FOUND_POSIX_REGEX_LIB AND POSIX_REGEX_LIB MATCHES "^(AUTO|LIBPCREPOSIX)$" # # If requested, try finding library for PCREPOSIX # - IF(ENABLE_LibGCC) - FIND_PACKAGE(LibGCC) + IF(ENABLE_LIBGCC) + FIND_PACKAGE(LIBGCC) ELSE() + MESSAGE(FATAL_ERROR "libgcc not found.") SET(LIBGCC_FOUND FALSE) # Override cached value ENDIF() IF(ENABLE_PCREPOSIX) diff --git a/build/cmake/FindLibGCC.cmake b/build/cmake/FindLIBGCC.cmake index 5883ff80..5883ff80 100644 --- a/build/cmake/FindLibGCC.cmake +++ b/build/cmake/FindLIBGCC.cmake |