aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian Walch <florian@fwalch.com>2014-11-18 14:01:24 +0100
committerFlorian Walch <florian@fwalch.com>2014-11-19 17:21:21 +0100
commit96b31ca04814193197f6ec16049bd0cfc02929c9 (patch)
tree6577ce62fa16621f396f877a14df01b889cc2896 /src
parente8e3e6e798b789acc659b19f0c422c6444fc167c (diff)
downloadrneovim-96b31ca04814193197f6ec16049bd0cfc02929c9.tar.gz
rneovim-96b31ca04814193197f6ec16049bd0cfc02929c9.tar.bz2
rneovim-96b31ca04814193197f6ec16049bd0cfc02929c9.zip
CMake: Set -Wconversion by default.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/CMakeLists.txt74
1 files changed, 54 insertions, 20 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index b06b4fa547..e3e3c05cfb 100644
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -38,34 +38,68 @@ endforeach()
list(REMOVE_ITEM NEOVIM_SOURCES ${to_remove})
+# Handle legacy files that don't yet pass -Wconversion.
set(CONV_SOURCES
- arabic.c
- cursor.c
- garray.c
- hashtab.c
- log.c
- map.c
- memfile.c
- memory.c
- misc2.c
- profile.c
- tempfile.c
- )
+ buffer.c
+ charset.c
+ cursor_shape.c
+ diff.c
+ digraph.c
+ edit.c
+ eval.c
+ ex_cmds2.c
+ ex_cmds.c
+ ex_docmd.c
+ ex_eval.c
+ ex_getln.c
+ farsi.c
+ fileio.c
+ file_search.c
+ fold.c
+ getchar.c
+ hardcopy.c
+ if_cscope.c
+ indent.c
+ indent_c.c
+ keymap.c
+ main.c
+ mark.c
+ mbyte.c
+ memline.c
+ menu.c
+ message.c
+ misc1.c
+ move.c
+ normal.c
+ ops.c
+ option.c
+ os_unix.c
+ path.c
+ popupmnu.c
+ quickfix.c
+ regexp.c
+ regexp_nfa.c
+ screen.c
+ search.c
+ sha256.c
+ spell.c
+ strings.c
+ syntax.c
+ tag.c
+ term.c
+ ui.c
+ undo.c
+ version.c
+ window.c)
foreach(sfile ${CONV_SOURCES})
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/src/nvim/${sfile}")
- message(FATAL_ERROR "${sfile} doesn't exist(it was added to CONV_SOURCES)")
+ message(FATAL_ERROR "${sfile} doesn't exist (it was added to CONV_SOURCES)")
endif()
endforeach()
-file(GLOB_RECURSE EXTRA_CONV_SOURCES os/*.c api/*.c msgpack_rpc/*.c)
-foreach(sfile ${EXTRA_CONV_SOURCES})
- file(RELATIVE_PATH f "${PROJECT_SOURCE_DIR}/src/nvim" "${sfile}")
- list(APPEND CONV_SOURCES ${f})
-endforeach()
-
set_source_files_properties(
- ${CONV_SOURCES} PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -Wconversion")
+ ${CONV_SOURCES} PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-conversion")
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
if(DEFINED ENV{SANITIZE})