summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeLinkInformation.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2020-07-27 23:00:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2020-07-28 12:31:31 (GMT)
commitf37c14e93036fe01fca3539f539ff8821494e9d1 (patch)
treefc08ddab0c3e9b47f00cff9a287cc89a2afa13ca /Source/cmComputeLinkInformation.cxx
parent261a2585d9df7113a5ba7c9beacb641754444523 (diff)
downloadCMake-f37c14e93036fe01fca3539f539ff8821494e9d1.zip
CMake-f37c14e93036fe01fca3539f539ff8821494e9d1.tar.gz
CMake-f37c14e93036fe01fca3539f539ff8821494e9d1.tar.bz2
Source: use cmNonempty()
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r--Source/cmComputeLinkInformation.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index fbb95e1..43cceae 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -832,8 +832,7 @@ void cmComputeLinkInformation::ComputeLinkTypeInfo()
// We can support link type switching only if all needed flags are
// known.
- if (static_link_type_flag && *static_link_type_flag &&
- shared_link_type_flag && *shared_link_type_flag) {
+ if (cmNonempty(static_link_type_flag) && cmNonempty(shared_link_type_flag)) {
this->LinkTypeEnabled = true;
this->StaticLinkTypeFlag = static_link_type_flag;
this->SharedLinkTypeFlag = shared_link_type_flag;
@@ -1768,7 +1767,7 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs,
std::string d = ri;
if (!rootPath.empty() && cmHasPrefix(d, rootPath)) {
d.erase(0, rootPath.size());
- } else if (stagePath && *stagePath && cmHasPrefix(d, stagePath)) {
+ } else if (cmNonempty(stagePath) && cmHasPrefix(d, stagePath)) {
d.erase(0, strlen(stagePath));
d = cmStrCat(installPrefix, '/', d);
cmSystemTools::ConvertToUnixSlashes(d);
@@ -1799,7 +1798,7 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs,
std::string d = ri;
if (!rootPath.empty() && cmHasPrefix(d, rootPath)) {
d.erase(0, rootPath.size());
- } else if (stagePath && *stagePath && cmHasPrefix(d, stagePath)) {
+ } else if (cmNonempty(stagePath) && cmHasPrefix(d, stagePath)) {
d.erase(0, strlen(stagePath));
d = cmStrCat(installPrefix, '/', d);
cmSystemTools::ConvertToUnixSlashes(d);