I discovered the static keyword
This commit is contained in:
+7
-3
@@ -1,5 +1,12 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic -Werror -fsanitize=address")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-g")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
|
||||
|
||||
# generate the compile_commands for vscode / clang
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")
|
||||
@@ -24,8 +31,6 @@ set(SOURCES
|
||||
# add the executable
|
||||
add_executable(ModManager src/main.c ${SOURCES})
|
||||
|
||||
add_compile_options(-Wall -Wextra -pedantic -Werror)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_search_module(GLIB REQUIRED glib-2.0)
|
||||
pkg_search_module(AUDIT REQUIRED audit)
|
||||
@@ -33,7 +38,6 @@ pkg_search_module(LIBXML REQUIRED libxml-2.0)
|
||||
|
||||
target_include_directories(ModManager PRIVATE ${GLIB_INCLUDE_DIRS} ${LIBXML_INCLUDE_DIRS} ${AUDIT_INCLUDE_DIRS})
|
||||
|
||||
add_compile_options(-fsanitize=address)
|
||||
add_link_options(-fsanitize=address)
|
||||
|
||||
target_link_libraries(ModManager ${GLIB_LDFLAGS})
|
||||
|
||||
Reference in New Issue
Block a user