Make sure cmake uses C90 for this project.
This commit is contained in:
parent
32de4e478f
commit
276d38a292
@ -6,12 +6,13 @@ endif(TARGET ds)
|
|||||||
|
|
||||||
project(libds)
|
project(libds)
|
||||||
|
|
||||||
set_property(GLOBAL PROPERTY C_STANDARD 90)
|
add_compile_options(-pedantic -Wall)
|
||||||
ADD_COMPILE_OPTIONS(-pedantic -Wall)
|
|
||||||
|
|
||||||
add_library(ds STATIC src/libds.c src/vec.c src/ht.c src/ll.c src/sprs.c)
|
add_library(ds STATIC src/libds.c src/vec.c src/ht.c src/ll.c src/sprs.c)
|
||||||
add_executable(libds src/main.c)
|
add_executable(libds src/main.c)
|
||||||
|
|
||||||
|
set_property(TARGET ds PROPERTY C_STANDARD 90)
|
||||||
|
set_property(TARGET libds PROPERTY C_STANDARD 90)
|
||||||
target_include_directories(ds PUBLIC include)
|
target_include_directories(ds PUBLIC include)
|
||||||
target_include_directories(libds PUBLIC include)
|
target_include_directories(libds PUBLIC include)
|
||||||
|
|
||||||
|
@ -95,11 +95,11 @@ int test_vec_index() {
|
|||||||
}
|
}
|
||||||
int test_vec_clear(){
|
int test_vec_clear(){
|
||||||
vec test_vec;
|
vec test_vec;
|
||||||
|
char* test_string = "test";
|
||||||
void** vec_data = NULL;
|
void** vec_data = NULL;
|
||||||
int return_code;
|
int return_code;
|
||||||
vec_init(&test_vec);
|
vec_init(&test_vec);
|
||||||
vec_data = test_vec.data;
|
vec_data = test_vec.data;
|
||||||
char* test_string = "test";
|
|
||||||
vec_add(&test_vec, test_string);
|
vec_add(&test_vec, test_string);
|
||||||
vec_add(&test_vec, test_string);
|
vec_add(&test_vec, test_string);
|
||||||
vec_add(&test_vec, test_string);
|
vec_add(&test_vec, test_string);
|
||||||
|
Loading…
Reference in New Issue
Block a user