diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-11-26 20:53:28 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-11-26 20:53:45 +0200 |
commit | 8a703fbcb752f4e21b6f04ec9ac8a9553ff9a82e (patch) | |
tree | a4e62586abc18e7416e883055b6ee80cbfb0787b | |
parent | 4934864106c4c4ba56559ed2096970e1ea5d7d94 (diff) |
cmake: set C_FLAGS too
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index dccdf14..7d8ba34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,9 @@ option(TREAT_WARNINGS_AS_ERRORS "Treat warnings as errors" FALSE) set(KMSXX_ENABLE_PYTHON ON CACHE BOOL "Enable Python wrappers") set(KMSXX_ENABLE_KMSCUBE OFF CACHE BOOL "Enable kmscube") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -Wall") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra -Wno-unused-parameter") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra -Wno-unused-parameter") @@ -51,6 +54,7 @@ check_lto() if (NOT ${U_CMAKE_BUILD_TYPE} MATCHES DEBUG) if (LTO_WORKS) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flto") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto") set(CMAKE_AR "${LTO_AR}") set(CMAKE_RANLIB "${LTO_RANLIB}") |