cmake: set CMAKE_CXX_FLAGS in FBCompilerSettingsUnix.cmake

Summary:
It looks like the various CMAKE_CXX_FLAGS_* are simply ineffective, and I'm not
sure why, setting CMAKE_CXX_FLAGS does work though, and CMake appears to add
some release/debug flags to it when generating Ninja files.

Reviewed By: fanzeyi

Differential Revision: D27862117

fbshipit-source-id: a89f6182b5bae9a087f8fcfd4c5f9526f91e2adf
This commit is contained in:
Xavier Deguillard 2021-04-19 15:07:16 -07:00 committed by Facebook GitHub Bot
parent e1f54eead9
commit 85a3b27852

View File

@ -6,6 +6,4 @@
# to these shared compiler settings in order to avoid accidentally # to these shared compiler settings in order to avoid accidentally
# breaking a build in another project! # breaking a build in another project!
set(CMAKE_CXX_FLAGS_COMMON "-g -Wall -Wextra -Wno-deprecated -Wno-deprecated-declarations") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -Wno-deprecated -Wno-deprecated-declarations")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_CXX_FLAGS_COMMON}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_COMMON} -O3")