]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
*** empty log message ***
authoradam <adam>
Mon, 14 Mar 2011 11:30:40 +0000 (11:30 +0000)
committeradam <adam>
Mon, 14 Mar 2011 11:30:40 +0000 (11:30 +0000)
salome_adm/cmake_files/FindPLATFORM.cmake

index a49a8c5072ec406108d9297339402659e91a245f..4b08dbf0ff2789df2380648fc76a1ac32df84328 100644 (file)
@@ -42,12 +42,21 @@ ENDIF(NOT CMAKE_BUILD_TYPE)
 
 IF(WINDOWS)
 ELSE(WINDOWS)
-  SET(TROLL_VAL $ENV{I_AM_A_TROLL_I_DO_NOT_FIX_${MODULE}_WARNINGS})
-  IF(X${TROLL_VAL} STREQUAL X1)
-  ELSE(X${TROLL_VAL} STREQUAL X1)
+  SET(ADD_WERROR ON)
+  SET(NAMES ACCEPT_SALOME_WARNINGS ACCEPT_${MODULE}_WARNINGS I_AM_A_TROLL_I_DO_NOT_FIX_${MODULE}_WARNINGS)
+  FOREACH(name ${NAMES})
+    SET(VAL $ENV{${name}})
+    IF(X${VAL} STREQUAL X0)
+      SET(ADD_WERROR ON)
+    ENDIF(X${VAL} STREQUAL X0)
+    IF(X${VAL} STREQUAL X1)
+      SET(ADD_WERROR OFF)
+    ENDIF(X${VAL} STREQUAL X1)
+  ENDFOREACH(name ${NAMES})
+  IF(ADD_WERROR)
     SET(CMAKE_C_FLAGS "-Werror")
     SET(CMAKE_CXX_FLAGS "-Werror")
-  ENDIF(X${TROLL_VAL} STREQUAL X1)
+  ENDIF(ADD_WERROR)
 ENDIF(WINDOWS)
 
 IF(CMAKE_BUILD_TYPE)