[Cmake-commits] [cmake-commits] king committed XL-C.cmake 1.2 1.3

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Sep 30 09:38:26 EDT 2009


Update of /cvsroot/CMake/CMake/Modules/Compiler
In directory public:/mounts/ram/cvs-serv6148/Modules/Compiler

Modified Files:
	XL-C.cmake 
Log Message:
Add initial XL C compiler flags for safer builds

This commit adds some default initial C flags for the XL compiler.  The
most important is "-qhalt=e" which causes the compiler to error-out on
non-severe error messages.  This is necessary to get try-compiles to
fail when bad arguments are passed to a function.


Index: XL-C.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Compiler/XL-C.cmake,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** XL-C.cmake	30 Sep 2009 13:37:33 -0000	1.2
--- XL-C.cmake	30 Sep 2009 13:38:23 -0000	1.3
***************
*** 1,4 ****
--- 1,9 ----
  SET(CMAKE_C_VERBOSE_FLAG "-V")
  
+ # -qthreaded     = Ensures that all optimizations will be thread-safe
+ # -qalias=noansi = Turns off type-based aliasing completely (safer optimizer)
+ # -qhalt=e       = Halt on error messages (rather than just severe errors)
+ SET(CMAKE_C_FLAGS_INIT "-qthreaded -qalias=noansi -qhalt=e")
+ 
  SET(CMAKE_C_FLAGS_DEBUG_INIT "-g")
  SET(CMAKE_C_FLAGS_RELEASE_INIT "-O -DNDEBUG")



More information about the Cmake-commits mailing list