aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2018-06-03 14:34:21 +0300
committerWohlstand <admin@wohlnet.ru>2018-06-03 14:34:21 +0300
commit4cfba5ee6a404e71c3d7b86b7b1ec680c3d7521d (patch)
treeff9bf122a1bbf00f51e7771e8d68bfd18ccffde1 /CMakeLists.txt
parentae11d031fd9e802ccfdc1f2a7678c737fe6f85a9 (diff)
downloadlibADLMIDI-4cfba5ee6a404e71c3d7b86b7b1ec680c3d7521d.tar.gz
libADLMIDI-4cfba5ee6a404e71c3d7b86b7b1ec680c3d7521d.tar.bz2
libADLMIDI-4cfba5ee6a404e71c3d7b86b7b1ec680c3d7521d.zip
Fixed some warnings on MinGW
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e104d8d..ce162a0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,10 +11,13 @@ ELSEIF(NOT MSVC AND NOT MSDOS)
set(LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -Wl,--gc-sections -Wl,-s")
ENDIF()
-# Global optimization flags
IF(NOT MSVC AND NOT MSDOS)
+# Global optimization flags
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fno-omit-frame-pointer")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-omit-frame-pointer")
+# Turn on all warnings
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_RELEASE} -Wall -Wextra")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_RELEASE} -Wall -Wextra")
ENDIF()
if (CMAKE_BUILD_TYPE EQUAL "RELEASE")
@@ -45,7 +48,7 @@ function(set_legacy_standard destTarget)
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
# Turn on warnings and legacy C/C++ standards to support more compilers
target_compile_options(${destTarget} PRIVATE
- $<$<COMPILE_LANGUAGE:C>:-Wall -pedantic -std=c90>
+ $<$<COMPILE_LANGUAGE:C>:-Wall -pedantic -std=c90 -Wno-long-long>
$<$<COMPILE_LANGUAGE:CXX>:-Wall -pedantic -std=gnu++98>
)
endif()