diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3d37b52bb341fa8b70f1124e43134c39939241dd..e3f7b2bca5d6be5020bfbef5a3938d2ecb1c5e0b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,9 @@ cmake_minimum_required (VERSION 2.6)
 
 project(cta)
 
+set(CMAKE_C_FLAGS "-fPIC -pedantic -Wall -Wextra -Werror -Wno-unused-parameter")
+set(CMAKE_CXX_FLAGS "-fPIC -pedantic -Wall -Wextra -Werror -Wno-unused-parameter")
+
 # Explicitly setting the C and C++ compiler flags for the RelWithDebInfo build
 # in order to prevent the -O2 flag from being used.
 set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g")