diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ef6728..409db2b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,12 +6,13 @@ endif(TARGET ds) 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_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(libds PUBLIC include) diff --git a/src/main.c b/src/main.c index 9b4da95..b1a1f47 100644 --- a/src/main.c +++ b/src/main.c @@ -95,11 +95,11 @@ int test_vec_index() { } int test_vec_clear(){ vec test_vec; + char* test_string = "test"; void** vec_data = NULL; int return_code; vec_init(&test_vec); 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);