llvm.org GIT mirror llvm / 5eb4649
[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 Shoaib Meenai 1 year, 10 months ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
9898
9999 llvm_map_components_to_libnames(LIBRARIES ${link_components})
100100 get_target_property(t ${executable} TYPE)
101 if("x${t}" STREQUAL "xSTATIC_LIBRARY")
101 if(t STREQUAL "STATIC_LIBRARY")
102102 target_link_libraries(${executable} INTERFACE ${LIBRARIES})
103 elseif("x${t}" STREQUAL "xSHARED_LIBRARY" OR "x${t}" STREQUAL "xMODULE_LIBRARY")
103 elseif(t STREQUAL "SHARED_LIBRARY" OR t STREQUAL "MODULE_LIBRARY")
104104 target_link_libraries(${executable} PRIVATE ${LIBRARIES})
105105 else()
106106 # Use plain form for legacy user.