diff --git a/CMakeLists.txt b/CMakeLists.txt index cf3dde0f..0a5a89d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,21 +22,10 @@ set(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" CACHE PATH "The sub set(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE) set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The subdirectory to the header prefix" FORCE) -if (CMAKE_COMPILER_IS_GNUCXX) - if (CMAKE_SYSTEM_NAME MATCHES Linux) - set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -ansi -Wundef -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common") - set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -fno-check-new -fno-common") - endif (CMAKE_SYSTEM_NAME MATCHES Linux) -endif (CMAKE_COMPILER_IS_GNUCXX) -if(MSVC) - if (MSVC_VERSION GREATER 1399) - # If using Visual C++ 2005 (MSVC80) and greater (MSVC_VERSION=1400) - add_definitions(/D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /Zc:wchar_t-) - endif (MSVC_VERSION GREATER 1399) -endif(MSVC) -if (WIN32) - set(CMAKE_DEBUG_POSTFIX "d") -endif (WIN32) +if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") +endif() SET(TAGLIB_LIB_MAJOR_VERSION "1") SET(TAGLIB_LIB_MINOR_VERSION "7")