Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

CMake will not detect a variable as empty string #11584

Merged
merged 1 commit into from
Jul 8, 2018

Conversation

fran6co
Copy link
Contributor

@fran6co fran6co commented Jul 6, 2018

Description

Testing it with CMake 3.12 it's not detecting that CUDA_TOOLSET is empty

@fran6co fran6co requested a review from szha as a code owner July 6, 2018 15:23
@@ -210,7 +210,7 @@ if(USE_CUDA)
find_package(CUDA REQUIRED)
add_definitions(-DMSHADOW_USE_CUDA=1)
if(FIRST_CUDA AND (NOT USE_OLDCMAKECUDA))
if(CUDA_TOOLSET STREQUAL "")
if(NOT CUDA_TOOLSET)
Copy link
Contributor

@yajiedesign yajiedesign Jul 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be (NOT CUDA_TOOLSET) OR (CUDA_TOOLSET STREQUAL "") is good

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOT checks for empty string and when the variable is not set, so there is no need for the OR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@yajiedesign
Copy link
Contributor

LGTM

@szha szha merged commit 6924390 into apache:master Jul 8, 2018
XinYao1994 pushed a commit to XinYao1994/incubator-mxnet that referenced this pull request Aug 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants