From d3289e9d967de478476dd1eca9bf686cc34ac11b Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Tue, 14 May 2019 18:34:56 +0200 Subject: [PATCH] [project] syncs CMake and shell build options for macOS file watcher GitOrigin-RevId: 4d197f5a3e9c67b3c282cfbc63a2a7fe28c50801 --- native/fsNotifier/mac/CMakeLists.txt | 2 ++ native/fsNotifier/mac/make.sh | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/native/fsNotifier/mac/CMakeLists.txt b/native/fsNotifier/mac/CMakeLists.txt index bd14b2837579..34b553771d55 100644 --- a/native/fsNotifier/mac/CMakeLists.txt +++ b/native/fsNotifier/mac/CMakeLists.txt @@ -5,7 +5,9 @@ if(NOT APPLE) message(FATAL_ERROR "macOS only.") endif() +set(CMAKE_C_FLAGS "-O2 -Wall -Wextra -Wpedantic -Wno-newline-eof") set(CMAKE_C_STANDARD 11) +set(CMAKE_OSX_DEPLOYMENT_TARGET 10.8) find_library(CORE_SERVICES CoreServices) diff --git a/native/fsNotifier/mac/make.sh b/native/fsNotifier/mac/make.sh index 29004ac07e7d..57e4e187d430 100755 --- a/native/fsNotifier/mac/make.sh +++ b/native/fsNotifier/mac/make.sh @@ -1,3 +1,5 @@ #!/bin/sh -clang -arch x86_64 -mmacosx-version-min=10.8 -framework CoreServices -o fsnotifier fsnotifier.c \ No newline at end of file +C_FLAGS="-std=c11 -O2 -Wall -Wextra -Wpedantic -Wno-newline-eof" + +clang -arch x86_64 -mmacosx-version-min=10.8 -framework CoreServices -std=c11 $C_FLAGS -o fsnotifier fsnotifier.c \ No newline at end of file