mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
[platform] updating fsnotifier/macOS CMake project; fixing warnings
GitOrigin-RevId: d8029527f4c077eede8057e1b07d50e35262851b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9abfed6edd
commit
104a727093
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
project(fsnotifier C)
|
||||
|
||||
if(NOT APPLE)
|
||||
@@ -9,7 +9,10 @@ set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9)
|
||||
|
||||
add_compile_options("-fmodules" "-flto=full" "-Wall" "-Wextra" "-Wpedantic" "-Wno-newline-eof")
|
||||
add_executable(fsnotifier fsnotifier.c)
|
||||
target_compile_options(fsnotifier PRIVATE "-O2" "-Wall" "-Wextra" "-Wpedantic")
|
||||
target_link_options(fsnotifier PRIVATE "-flto=full")
|
||||
target_link_libraries(fsnotifier PRIVATE "$<LINK_LIBRARY:FRAMEWORK,CoreFoundation>" "$<LINK_LIBRARY:FRAMEWORK,CoreServices>")
|
||||
|
||||
install(TARGETS fsnotifier DESTINATION ${CMAKE_CURRENT_LIST_DIR}/../../../bin/mac)
|
||||
cmake_path(SET install_dir NORMALIZE ${CMAKE_CURRENT_LIST_DIR}/../../../bin/mac)
|
||||
install(TARGETS fsnotifier DESTINATION ${install_dir})
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
@@ -114,7 +114,7 @@ static void PrintMountedFileSystems(CFArrayRef roots) {
|
||||
#define INPUT_BUF_LEN 2048
|
||||
static char input_buf[INPUT_BUF_LEN];
|
||||
|
||||
static char *read_stdin() {
|
||||
static char *read_stdin(void) {
|
||||
char* result = fgets(input_buf, INPUT_BUF_LEN, stdin);
|
||||
if (result == NULL || feof(stdin)) {
|
||||
return NULL;
|
||||
@@ -126,7 +126,7 @@ static char *read_stdin() {
|
||||
return input_buf;
|
||||
}
|
||||
|
||||
static bool ParseRoots() {
|
||||
static bool ParseRoots(void) {
|
||||
CFMutableArrayRef roots = CFArrayCreateMutable(NULL, 0, NULL);
|
||||
bool has_private_root = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user