| Issue |
60975
|
| Summary |
Don't restrict list of CMake build types
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
rossburton
|
For example, the llvm directory restricts the value of `CMAKE_BUILD_TYPE`:
```
if (CMAKE_BUILD_TYPE AND
NOT uppercase_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$")
message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
endif()
```
https://github.com/llvm/llvm-project/blob/main/llvm/CMakeLists.txt#L389
That is the default set of build types, but it is not the exhaustive list of build types. Quoting from the [CMake manual](https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html):
>Typical values include Debug, Release, RelWithDebInfo and MinSizeRel, but custom build types can also be defined.
I suggest just deleting this chunk, as it doesn't serve any purpose: the person building llvm should be able to specify a custom build type if they wish.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs