Commit 7052c751 authored by Joe Loser's avatar Joe Loser Committed by Facebook Github Bot

wrap CMAKE_CXX_FLAGS_COMMON arguments using strings

Summary:
It can be dangerous to set a CMake variable and not wrap the values as strings at times. The arguments can be forwarded to the compiler in use which will not know how to handle multiple arguments getting treated as one. For an example error using CMake 3.9.6 and Clang 5.0.1, if you do not wrap `CMAKE_CXX_FLAGS_COMMON` using string literals, you will get an error:

```
Problems were encountered while collecting compiler information:
	clang-5.0: error: unknown argument: '-g;-Wall;-Wextra'
```

Closes https://github.com/facebook/folly/pull/746

Reviewed By: simpkins

Differential Revision: D6854510

Pulled By: yfeldblum

fbshipit-source-id: c3ae626033e6733d0ce6f19fc6c06190315bf0db
parent 11e1b8ad
set(CMAKE_CXX_FLAGS_COMMON -g -Wall -Wextra)
set(CMAKE_CXX_FLAGS_COMMON "-g -Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_COMMON}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_COMMON} -O3")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment