Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-12-16 12:55:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-16 12:55:35 +0300
commited4e7271f163b1d98feee7b956c0229cc47dad92 (patch)
treee2f0c803f59a9a4bc04eba26ad210b6a010d7f39 /build_files
parentee05792a7ba189cc7b1973d10a391ac56c683138 (diff)
CMake now tests warnings are supported, GCC 4.0 wasn't working because of unsupported warnings.
this can work for other compilers too, currently intel and gcc use this.
Diffstat (limited to 'build_files')
-rw-r--r--build_files/cmake/macros.cmake31
1 files changed, 31 insertions, 0 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 7f7ddc9d258..a246a81a545 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -275,6 +275,37 @@ macro(remove_strict_flags)
endmacro()
+macro(ADD_CHECK_C_COMPILER_FLAG
+ _CFLAGS
+ _FLAG)
+
+ include(CheckCCompilerFlag)
+
+ CHECK_C_COMPILER_FLAG(${_FLAG} SUPPORT_WALL)
+
+ if(SUPPORT_WALL)
+ message(STATUS "Using CFLAG: ${_FLAG}")
+ set(_CFLAGS "${_CFLAGS} ${_FLAG}")
+ else()
+ message(STATUS "Unsupported CFLAG: ${_FLAG}")
+ endif()
+endmacro()
+
+macro(ADD_CHECK_CXX_COMPILER_FLAG
+ _CXXFLAGS
+ _FLAG)
+
+ include(CheckCXXCompilerFlag)
+
+ CHECK_CXX_COMPILER_FLAG(${_FLAG} SUPPORT_WALL)
+
+ if(SUPPORT_WALL)
+ message(STATUS "Using CXXFLAG: ${_FLAG}")
+ set(_CFLAGS "${_CXXFLAGS} ${_FLAG}")
+ else()
+ message(STATUS "Unsupported CXXFLAG: ${_FLAG}")
+ endif()
+endmacro()
macro(get_blender_version)
file(READ ${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender.h CONTENT)