From a2a113c6ff10ce1aea3aaba9f47eb6643e164311 Mon Sep 17 00:00:00 2001 From: Olli Wang Date: Thu, 28 Feb 2019 04:58:45 +0800 Subject: [PATCH] Fix ninja build error. (#677) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NDK now uses ninja for building but yaml-cpp would emit the “ninja: error: build.ninja:326: bad $-escape (literal $ must be written as $$)” error due to syntax error in the generated build.ninja file. Related issue: https://github.com/jbeder/yaml-cpp/issues/630 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bf6a0f0..e41a814 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -175,11 +175,11 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR ### Make specific if(${CMAKE_BUILD_TOOL} MATCHES make OR ${CMAKE_BUILD_TOOL} MATCHES gmake) - add_custom_target(debuggable $(MAKE) clean + add_custom_target(debuggable ${CMAKE_MAKE_PROGRAM} clean COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug ${CMAKE_SOURCE_DIR} COMMENT "Adjusting settings for debug compilation" VERBATIM) - add_custom_target(releasable $(MAKE) clean + add_custom_target(releasable ${CMAKE_MAKE_PROGRAM} clean COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release ${CMAKE_SOURCE_DIR} COMMENT "Adjusting settings for release compilation" VERBATIM)