Repository navigation
Conversation
Summary: - On some platforms, `CMAKE_SYSTEM_ARCHITECTURE` may resolve to an empty string. - When this value is used without quotes to the `string` command, it is ill-formed with error: ``` CMake Error at CMakeLists.txt:174 (string): string sub-command FIND requires 3 or 4 parameters. ``` - Explicitly wrap the value to the `string` operation in quotes to treat `CMAKE_SYSTEM_ARCHITECTURE` as a string, which is allowed to be empty. The result is that the `string` operation will not result in a hard error.
JoeLoser
force-pushed
the
cmake_empty_var
branch
from
March 2, 2019 01:56
7a05326 to
39acc42
Compare
facebook-github-bot
left a comment
Contributor
There was a problem hiding this comment.
@yfeldblum has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
sandraiser
pushed a commit
to sandraiser/folly
that referenced
this pull request
Mar 4, 2019
Summary: - On some platforms, `CMAKE_SYSTEM_ARCHITECTURE` may resolve to an empty string. - When this value is used without quotes to the `string` command, it is ill-formed with error: ``` CMake Error at CMakeLists.txt:174 (string): string sub-command FIND requires 3 or 4 parameters. ``` - Explicitly wrap the value to the `string` operation in quotes to treat `CMAKE_SYSTEM_ARCHITECTURE` as a string, which is allowed to be empty. The result is that the `string` operation will not result in a hard error. Pull Request resolved: meta#1040 Reviewed By: calebmarchent Differential Revision: D14293784 Pulled By: yfeldblum fbshipit-source-id: cd5924fa62277aa07e930c7b088197ef596be977
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
CMAKE_SYSTEM_ARCHITECTUREmay resolve to an emptystring.
stringcommand, it isill-formed with error:
stringoperation in quotes to treatCMAKE_SYSTEM_ARCHITECTUREas a string, which is allowed to be empty.The result is that the
stringoperation will not result in a harderror.