• Joe Loser's avatar
    Fix to handle empty CMAKE_SYSTEM_ARCHITECTURE (#1040) · 1cb1ad79
    Joe Loser authored
    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: https://github.com/facebook/folly/pull/1040
    
    Reviewed By: calebmarchent
    
    Differential Revision: D14293784
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: cd5924fa62277aa07e930c7b088197ef596be977
    1cb1ad79
CMakeLists.txt 30.8 KB