]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Change CMAKE_BUILD_TYPE comparison to be case-insensitive (#2130)
authorevan-swinney <evan.swinney@gmail.com>
Wed, 17 Apr 2024 03:51:30 +0000 (22:51 -0500)
committerGitHub <noreply@github.com>
Wed, 17 Apr 2024 03:51:30 +0000 (20:51 -0700)
commit5daa209cfa68da574d2082180273dea2a0382a86
tree2c8d8f1672b3ed4911d2f0c5d6ad49238b0b9a0b
parent1a2fd29f6de7decd097dc4e30629ff96a068f72e
Change CMAKE_BUILD_TYPE comparison to be case-insensitive (#2130)

Currently the `CMAKE_BUILD_TYPE` is being compared in a case-sensitive
way. It seems current CMake documentation [suggests treating this in a
case-insensitive manner
now-a-days](https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#case-sensitivity).

This being case-sensitive creates needless complexities in other
projects if they compile their own project with `cmake
-DCMAKE_BUILD_TYPE=release ..`, etc. In this specific case, libarchive
has a fatal error due to the lowercase `release`.

I'd honestly like to remove these comparisons entirely; as I'm not sure
if they're really needed or not if `libarchive` is only using the
Makefile or Ninja generators with CMake.

This PR changes the `CMAKE_BUILD_TYPE` comparison to be
case-insensitive, and leaves the rest alone.

This should also fix the following issue(s):
* https://github.com/libarchive/libarchive/issues/1792
CMakeLists.txt