diff options
author | Rich Wareham <rjw57@cantab.net> | 2014-02-27 13:00:25 +0000 |
---|---|---|
committer | Rich Wareham <rjw57@cantab.net> | 2014-02-27 13:00:25 +0000 |
commit | f26b0aa88cee6c3d1aababd81e3d8de20f4af283 (patch) | |
tree | 9ec4bdecb0dd8eef0f38ff735977f9af3b1b7229 | |
parent | 20b799a6f2dac747c6d0c324a7295689d001930d (diff) | |
parent | 1f827beff0ddc3aa10189aac5e756a70c3eec270 (diff) | |
download | rneovim-f26b0aa88cee6c3d1aababd81e3d8de20f4af283.tar.gz rneovim-f26b0aa88cee6c3d1aababd81e3d8de20f4af283.tar.bz2 rneovim-f26b0aa88cee6c3d1aababd81e3d8de20f4af283.zip |
Merge pull request #187 from rjw57/issue-179
Use CMAKE_C_FLAGS variable to set compiler flags.
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 04b59acd28..8859ab8488 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,12 @@ set(NEOVIM_VERSION_PATCH 0) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) -add_definitions(-DHAVE_CONFIG_H -Wall -std=gnu99) +# If the C compiler is some GNU-alike, use the gnu99 standard and enable all warnings. +if(CMAKE_COMPILER_IS_GNUCC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -std=gnu99") +endif(CMAKE_COMPILER_IS_GNUCC) + +add_definitions(-DHAVE_CONFIG_H) if(CMAKE_BUILD_TYPE MATCHES Debug) # cmake automatically appends -g to the compiler flags set(DEBUG 1) |