cmake: Prefer add_definitions() for setting preprocessor defines

This commit is contained in:
James McCoy 2018-06-17 23:29:39 -04:00
parent 863a87d5f3
commit a26fd8a888
No known key found for this signature in database
GPG Key ID: DFE691AE331BA3DB

View File

@ -353,7 +353,7 @@ main(void)
} }
" MSGPACK_HAS_FLOAT32) " MSGPACK_HAS_FLOAT32)
if(MSGPACK_HAS_FLOAT32) if(MSGPACK_HAS_FLOAT32)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNVIM_MSGPACK_HAS_FLOAT32") add_definitions(-DNVIM_MSGPACK_HAS_FLOAT32)
endif() endif()
option(FEAT_TUI "Enable the Terminal UI" ON) option(FEAT_TUI "Enable the Terminal UI" ON)
@ -374,7 +374,7 @@ if(FEAT_TUI)
} }
" UNIBI_HAS_VAR_FROM) " UNIBI_HAS_VAR_FROM)
if(UNIBI_HAS_VAR_FROM) if(UNIBI_HAS_VAR_FROM)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNVIM_UNIBI_HAS_VAR_FROM") add_definitions(-DNVIM_UNIBI_HAS_VAR_FROM)
endif() endif()
find_package(LibTermkey REQUIRED) find_package(LibTermkey REQUIRED)