]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
add support for CMAKE_BUILD_TYPE None (#2074)
authorMatt Smith <matt-sm@users.noreply.github.com>
Mon, 26 Feb 2024 03:39:20 +0000 (19:39 -0800)
committerGitHub <noreply@github.com>
Mon, 26 Feb 2024 03:39:20 +0000 (19:39 -0800)
closes https://github.com/libarchive/libarchive/issues/2060

CMakeLists.txt

index c982af9ac0a24cd804c8669d91037c58c4890b62..71248c62af5b2563f22f87327fca006b8a0b0ef9 100644 (file)
@@ -20,6 +20,7 @@ endif()
 #   Release        : Release build
 #   RelWithDebInfo : Release build with Debug Info
 #   MinSizeRel     : Release Min Size build
+#   None           : No build type
 IF(NOT CMAKE_BUILD_TYPE)
   SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Type" FORCE)
 ENDIF(NOT CMAKE_BUILD_TYPE)
@@ -31,12 +32,12 @@ IF("${cached_type}" STREQUAL "UNINITIALIZED")
 ENDIF("${cached_type}" STREQUAL "UNINITIALIZED")
 # Check the Build Type.
 IF(NOT "${CMAKE_BUILD_TYPE}"
-       MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)\$")
+       MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel|None)\$")
   MESSAGE(FATAL_ERROR
           "Unknown keyword for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}\n"
-          "Acceptable keywords: Debug,Release,RelWithDebInfo,MinSizeRel")
+          "Acceptable keywords: Debug,Release,RelWithDebInfo,MinSizeRel,None")
 ENDIF(NOT "${CMAKE_BUILD_TYPE}"
-          MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)\$")
+          MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel|None)\$")
 
 # On MacOS, prefer MacPorts libraries to system libraries.
 # I haven't come up with a compelling argument for this to be conditional.