aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2022-01-12 18:20:43 +0100
committerRobert Tari <robert@tari.in>2022-01-12 18:20:43 +0100
commit20b381726943b11acc852f7de179005d221ec9fd (patch)
tree0fceb92e65464c9a0ce78eccbe83a6540b91d109
parent502ff9200cedb7d28e922858a3f62a9a8dc6a19b (diff)
downloadayatana-indicator-display-20b381726943b11acc852f7de179005d221ec9fd.tar.gz
ayatana-indicator-display-20b381726943b11acc852f7de179005d221ec9fd.tar.bz2
ayatana-indicator-display-20b381726943b11acc852f7de179005d221ec9fd.zip
CMakeLists.txt: Clean up compilation flags
-rw-r--r--CMakeLists.txt19
1 files changed, 8 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9d5ca89..63b4d29 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,8 +29,13 @@ else()
endif()
if(ENABLE_WERROR)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
+ add_definitions("-Werror")
+endif()
+
+if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ add_definitions("-Weverything")
+elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+ add_definitions("-Wall")
endif()
set(CMAKE_INSTALL_PKGLIBEXECDIR "${CMAKE_INSTALL_LIBEXECDIR}/${CMAKE_PROJECT_NAME}")
@@ -79,15 +84,7 @@ include_directories (SYSTEM
##
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-
-# set the compiler warnings
-if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
- list(APPEND CXX_WARNING_ARGS -Weverything -Wno-c++98-compat -Wno-padded)
-elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
- list(APPEND CXX_WARNING_ARGS -Wall -Wextra -Wpedantic)
-endif()
-
-add_compile_options(-std=c++14 -fPIC)
+add_compile_options(-fPIC)
add_subdirectory(src)
add_subdirectory(data)