basic j2 setup
This commit is contained in:
@ -2,5 +2,6 @@ project(bwinf C)
|
|||||||
cmake_minimum_required(VERSION 3.17)
|
cmake_minimum_required(VERSION 3.17)
|
||||||
set( CMAKE_EXPORT_COMPILE_COMMANDS ON )
|
set( CMAKE_EXPORT_COMPILE_COMMANDS ON )
|
||||||
set_property(GLOBAL PROPERTY C_STANDARD 99)
|
set_property(GLOBAL PROPERTY C_STANDARD 99)
|
||||||
add_subdirectory("lib/acl")
|
include_directories("lib/acl/include")
|
||||||
|
add_subdirectory("lib/acl" EXCLUDE_FROM_ALL)
|
||||||
add_subdirectory("j1-Passwoerter")
|
add_subdirectory("j1-Passwoerter")
|
||||||
|
|||||||
4
j2-Baulwuerfe/CMakeLists.txt
Normal file
4
j2-Baulwuerfe/CMakeLists.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
file(GLOB J2SOURCES "src/*.c")
|
||||||
|
file(GLOB ACLSOURCES "../lib/acl/src/*.c")
|
||||||
|
add_executable(j2 ${J1SOURCES} ${ACLSOURCES})
|
||||||
|
target_link_libraries(j2 PRIVATE m)
|
||||||
14
j2-Baulwuerfe/src/main.c
Normal file
14
j2-Baulwuerfe/src/main.c
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
void pointerCheck(void *pointer) {
|
||||||
|
if(pointer == NULL) {
|
||||||
|
perror("Error: ");
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
if(argc != 2) printf("file argument required");
|
||||||
|
bool sucess;
|
||||||
|
FILE *fp = fopen(argv[1], "rb");
|
||||||
|
char *input = acl_ReadTextFile(fp, &sucess);
|
||||||
2
lib/acl
2
lib/acl
Submodule lib/acl updated: 285f43f65a...a83de1b97b
Reference in New Issue
Block a user