X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=CMakeCommon%2FCommon.cmake;h=4ad9e74b0381cccbc75022a004aa29f10a0cf8e7;hb=6be99917aaca6ec5ca328053e3d078c1c4c193ac;hp=3e5d6abb3f82b7ffecf2bd9148fc3d9b1b44f108;hpb=b0ee07cb6f78c3d98f39a6588a0e90faee7f7dca;p=modules%2Fshaper.git diff --git a/CMakeCommon/Common.cmake b/CMakeCommon/Common.cmake index 3e5d6abb3..4ad9e74b0 100644 --- a/CMakeCommon/Common.cmake +++ b/CMakeCommon/Common.cmake @@ -1,4 +1,21 @@ -## Copyright (C) 2014-20xx CEA/DEN, EDF R&D +# Copyright (C) 2014-2020 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# cmake_minimum_required (VERSION 2.6) cmake_policy(SET CMP0011 NEW) @@ -40,3 +57,14 @@ IF(UNIX) #MESSAGE(STATUS "linker flags are: " ${CMAKE_SHARED_LINKER_FLAGS}) ENDIF(CMAKE_COMPILER_IS_GNUCC) ENDIF(UNIX) + +# Set highest warnings level +IF(MSVC) + IF(CMAKE_CXX_FLAGS MATCHES "/W[0-4]") + string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") + endif() +ELSE() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") +ENDIF()