PR26666: CMAKE_BUILD_TYPE was previously being reset to blank.
By setting it after project() we ensure that it is not blank.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Actually I don't think this is the right solution.
The CMAKE_BUILD_TYPE variable needs to be cached. Setting it can stay where it is as long as the set command caches.
Changing:
set(CMAKE_BUILD_TYPE "Debug")
-to-
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type (default Debug)")
Should fix the bug.
Comment Actions
Agreed, it may be best if it's cached: other projects have hit issues with having to force-cache it for Ninja generators (https://github.com/DynamoRIO/dynamorio/issues/919). For some reason in this other project we're not caching it for non-Ninja but it is not clear why: https://github.com/DynamoRIO/dynamorio/blob/master/CMakeLists.txt#L132