0026861: Configuration, CMake - enable -Wall warnings when using CLang
authoribs <ibs@opencascade.com>
Wed, 11 Nov 2015 14:48:18 +0000 (17:48 +0300)
committerbugmaster <bugmaster@opencascade.com>
Mon, 23 Nov 2015 10:40:49 +0000 (13:40 +0300)
-Wall warning option added for CLang compiler

adm/cmake/occt_defs_flags.cmake

index 54b8073..36ba859 100644 (file)
@@ -89,7 +89,7 @@ if (MSVC)
   else()
     set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
   endif()
-elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
 endif()