From a26fd8a888c0e8ed27f003ce5948aa3d42fdb087 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sun, 17 Jun 2018 23:29:39 -0400 Subject: [PATCH] cmake: Prefer add_definitions() for setting preprocessor defines --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cc40755b4d..a697480fba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -353,7 +353,7 @@ main(void) } " 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() option(FEAT_TUI "Enable the Terminal UI" ON) @@ -374,7 +374,7 @@ if(FEAT_TUI) } " 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() find_package(LibTermkey REQUIRED)