Changeset: 08ac37b530b1 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=08ac37b530b1 Modified Files: CMakeLists.txt common/utils/matomic.h monetdb5/extras/rapi/CMakeLists.txt monetdb_config.h.in Branch: cmake-fun Log Message:
Removed unused compiler parameters for warning messages. With Intel compiler on LInux we should disable __GNUC__ macro. diffs (66 lines): diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -678,15 +678,11 @@ if(${ENABLE_STRICT} STREQUAL "YES") MT_checkCompilerFlag("-Wformat-overflow=1") MT_checkCompilerFlag("-Wno-format-truncation") MT_checkCompilerFlag("-Wno-format-nonliteral") - MT_checkCompilerFlag("-Wno-error=suggest-attribute=format") - MT_checkCompilerFlag("-Wno-unused-command-line-argument") - MT_checkCompilerFlag("-Wno-cast-function-type") MT_checkCompilerFlag("-Winit-self") MT_checkCompilerFlag("-Winvalid-pch") MT_checkCompilerFlag("-Wmissing-declarations") MT_checkCompilerFlag("-Wmissing-format-attribute") MT_checkCompilerFlag("-Wmissing-prototypes") - MT_checkCompilerFlag("-Wno-missing-field-initializers") MT_checkCompilerFlag("-Wold-style-definition") MT_checkCompilerFlag("-Wpacked") MT_checkCompilerFlag("-Wunknown-pragmas") @@ -702,7 +698,6 @@ if(${ENABLE_STRICT} STREQUAL "YES") MT_checkCompilerFlag("-Wduplicated-branches") MT_checkCompilerFlag("-Wrestrict") MT_checkCompilerFlag("-Wnested-externs") - MT_checkCompilerFlag("-Wno-char-subscripts") MT_checkCompilerFlag("-Wunreachable-code") elseif(${CMAKE_C_COMPILER_ID} STREQUAL "Intel") if(NOT WIN32) diff --git a/common/utils/matomic.h b/common/utils/matomic.h --- a/common/utils/matomic.h +++ b/common/utils/matomic.h @@ -277,6 +277,8 @@ typedef volatile char ATOMIC_FLAG; #else +#include <pthread.h> //required for pthread_mutex_t + /* emulate using mutexes */ typedef size_t ATOMIC_BASE_TYPE; diff --git a/monetdb5/extras/rapi/CMakeLists.txt b/monetdb5/extras/rapi/CMakeLists.txt --- a/monetdb5/extras/rapi/CMakeLists.txt +++ b/monetdb5/extras/rapi/CMakeLists.txt @@ -27,6 +27,7 @@ if(NOT ${ENABLE_RINTEGRATION} STREQUAL " string(REPLACE "-I" "" R_INCLUDE_DIR ${R_CPP_OUTPUT}) # cmake will get confused string(REPLACE "-fopenmp" "" R_LIBRARIES ${R_LD_OUTPUT}) # We don't want to link to OpenMP string(REPLACE "-fopenmp=libgomp" "" R_LIBRARIES ${R_LIBRARIES}) + string(REGEX REPLACE "-specs=[^\ ]*" "" R_LIBRARIES ${R_LIBRARIES}) # -specs argument is not used and both GCC and Clang complain about it message(STATUS "R executable, library and include files found") elseif(${ENABLE_RINTEGRATION} STREQUAL "YES") diff --git a/monetdb_config.h.in b/monetdb_config.h.in --- a/monetdb_config.h.in +++ b/monetdb_config.h.in @@ -441,10 +441,9 @@ #cmakedefine __attribute__(a) #endif -/* Intel compiler doesn't support _Pragma from GCC well */ +/* Disable __GNUC__ on Intel compiler */ #if defined(__GNUC__) && defined(__INTEL_COMPILER) -#undef _Pragma -#define _Pragma(a) +#undef __GNUC__ #endif /* Does your compiler support the `_Noreturn' specifier? (C11 feature) */ _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list