diff options
author | Shoaib Meenai <smeenai@fb.com> | 2017-12-05 01:19:48 +0000 |
---|---|---|
committer | Shoaib Meenai <smeenai@fb.com> | 2017-12-05 01:19:48 +0000 |
commit | 5eb464901bea0241bcc9b9eb19df836961abb9f9 (patch) | |
tree | fea69e972679f5fb9386e6a65d4da681d7a38e11 /cmake | |
parent | c93edadc6a8a55d81d2b75ebdda5db59e40f5fb2 (diff) |
[cmake] Modernize some conditionals. NFC
The "x${...}" form was a workaround for CMake versions prior to 3.1,
where the if command would interpret arguments as variables even when
quoted [1]. We can drop the workaround now that our minimum CMake
version is 3.4.
[1] https://cmake.org/cmake/help/v3.1/policy/CMP0054.html
Differential Revision: https://reviews.llvm.org/D40744
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319723 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/LLVM-Config.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/modules/LLVM-Config.cmake b/cmake/modules/LLVM-Config.cmake index 2b9ab23c477..9cce1a2d4bc 100644 --- a/cmake/modules/LLVM-Config.cmake +++ b/cmake/modules/LLVM-Config.cmake @@ -99,9 +99,9 @@ function(explicit_llvm_config executable) llvm_map_components_to_libnames(LIBRARIES ${link_components}) get_target_property(t ${executable} TYPE) - if("x${t}" STREQUAL "xSTATIC_LIBRARY") + if(t STREQUAL "STATIC_LIBRARY") target_link_libraries(${executable} INTERFACE ${LIBRARIES}) - elseif("x${t}" STREQUAL "xSHARED_LIBRARY" OR "x${t}" STREQUAL "xMODULE_LIBRARY") + elseif(t STREQUAL "SHARED_LIBRARY" OR t STREQUAL "MODULE_LIBRARY") target_link_libraries(${executable} PRIVATE ${LIBRARIES}) else() # Use plain form for legacy user. |