It seems some cases were missing to the configuration.
Details
Details
Diff Detail
Diff Detail
Event Timeline
lib/CMakeLists.txt | ||
---|---|---|
51 | Rather than doing this as a STREQUAL where you have to check both possible orders, maybe we should iterate over the list? Something more like: foreach(sanitizer in ${LLVM_USE_SANITIZER}) if(sanitizer STREQUAL "Address") set(enable_address On) endif() if(sanitizer STREQUAL "Undefined") set(enable_ub On) endif() ... <other sanitizers> endforeach() if(enable_address and enable_undefined) ... elseif(...) endif() I think doing it this way makes the code more adaptable to future changes. Alternatively you can get rid of needing to check both orders by using the list(FIND ...) CMake command, which might be cleaner too. |
Rather than doing this as a STREQUAL where you have to check both possible orders, maybe we should iterate over the list?
Something more like:
I think doing it this way makes the code more adaptable to future changes.
Alternatively you can get rid of needing to check both orders by using the list(FIND ...) CMake command, which might be cleaner too.