riju/langs/objectivec++.yaml

52 lines
935 B
YAML

id: "objectivec++"
aliases:
- "objc++"
- "objcpp"
- "objectivecpp"
name: "Objective-C++"
install:
apt:
- gnustep-devel
- gobjc++
- clang-format
- clangd
main: "main.mm"
template: |
#import <Foundation/Foundation.h>
int main() {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSLog(@"Hello, world!");
[pool drain];
return 0;
}
compile: |
gcc $(gnustep-config --objc-flags) main.mm $(gnustep-config --base-libs) -o main
run: |
./main
format:
run: |
clang-format --assume-filename=format.m
input: |
#import <Foundation/Foundation.h>
int main() {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSLog(@"Hello, world!");
[pool drain];
return 0;
}
lsp:
setup: |
(gnustep-config --objc-flags && gnustep-config --base-libs) | sed -E 's/\s+/\n/g' > compile_flags.txt
start: |
clangd
skip:
- lsp