summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJukka Ojanen <jukka.ojanen@linkotec.net>2014-11-13 20:12:58 +0200
committerJukka Ojanen <jukka.ojanen@linkotec.net>2014-11-13 20:12:58 +0200
commite22e42ae5515c7f214744f4ad8e417cd86922f4e (patch)
tree8883dd887a599756e15e4766136ef0dd135ed1f0 /CMakeLists.txt
parentff7ee6bfd6126b0ed3c273be60fb791671189bb9 (diff)
downloadffts-e22e42ae5515c7f214744f4ad8e417cd86922f4e.zip
ffts-e22e42ae5515c7f214744f4ad8e417cd86922f4e.tar.gz
Enable compiler warnings
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 11 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 548a462..d69d490 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,12 +34,19 @@ option(ENABLE_SHARED
add_definitions(-DFFTS_CMAKE_GENERATED)
if(MSVC)
+ # enable all warnings but also disable some..
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4 /wd4127")
+
add_definitions(-D_USE_MATH_DEFINES)
-else()
+endif(MSVC)
+
+# GCC specific options
+if(CMAKE_COMPILER_IS_GNUCC)
include(CheckIncludeFile)
include(CheckLibraryExists)
-
- #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -pipe -Wall")
+
+ # enable all warnings
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")
# some systems need libm for some of the math functions to work
check_library_exists(m pow "" HAVE_LIBM)
@@ -47,7 +54,7 @@ else()
list(APPEND CMAKE_REQUIRED_LIBRARIES m)
list(APPEND FFTS_EXTRA_LIBRARIES m)
endif(HAVE_LIBM)
-endif(MSVC)
+endif(CMAKE_COMPILER_IS_GNUCC)
include_directories(src)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
OpenPOWER on IntegriCloud