X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=CMakeLists.txt;h=1654333665e2f4106060f926ed2bca1fb68ef5fb;hb=d90e97b2838053165eaf6a21906991d4c8faaac7;hp=cc6c88a72a689c46a0b8e8981c060e511448e0c2;hpb=db95653246560c24ad3c8cb224b3d9321b50af0a;p=staging%2Fwindowmanager.git diff --git a/CMakeLists.txt b/CMakeLists.txt index cc6c88a..1654333 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,10 +40,17 @@ macro(wlproto var_basename proto_xml_basename) include_directories(${CMAKE_CURRENT_BINARY_DIR}) endmacro() -add_definitions(-D_GNU_SOURCE -DDEBUG_OUTPUT) +set(ENABLE_DEBUG_OUTPUT OFF CACHE BOOL "Enable debug logging") +if(ENABLE_DEBUG_OUTPUT) + add_definitions(-DDEBUG_OUTPUT) +else() + remove_definitions(-DDEBUG_OUTPUT) +endif() + +add_definitions(-D_GNU_SOURCE) -set(CMAKE_C_FLAGS "-Wall -Wextra -Wno-unused-parameter -std=c99 ${CMAKE_C_FLAGS}") -set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -std=c++14 ${CMAKE_CXX_FLAGS}") +set(CMAKE_C_FLAGS "-Wall -Wextra -Wno-comment -Wno-unused-parameter -fvisibility=hidden -std=c99 ${CMAKE_C_FLAGS}") +set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-comment -Wno-unused-parameter -fvisibility=hidden -std=c++14 ${CMAKE_CXX_FLAGS}") set(SANITIZER_MODE "none" CACHE STRING "Build using a specific sanitizer (e.g. 'address', 'thread', 'leak', 'undefined'), depends on compiler; default none") if (NOT ${SANITIZER_MODE} STREQUAL "none" AND NOT ${SANITIZER_MODE} STREQUAL "")