Project uses C++, so use CHECK_CXX_COMPILER_FLAG
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 11 Aug 2011 08:06:48 +0000 (10:06 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 11 Aug 2011 08:06:48 +0000 (10:06 +0200)
Although this doesn't change much for our specific case, it can make a
difference for some flags, so use the appropriate macro.

src/CMakeLists.txt

index 5bdfc7eeeb17ff4277326cd648296c61409aad67..4d95da35b148ff6b8e639d63a6e324477b3181d6 100644 (file)
@@ -209,7 +209,7 @@ endif(BUILD_SERVER)
 # Set some optimizations and tweaks
 #
 
-include(CheckCCompilerFlag)
+include(CheckCXXCompilerFlag)
 
 if(MSVC)
        # Visual Studio
@@ -238,7 +238,7 @@ else()
        endif()
        
        if(NOT APPLE)
-               check_c_compiler_flag("-Wno-unused-but-set-variable" HAS_UNUSED_BUT_SET_VARIABLE_WARNING)
+               CHECK_CXX_COMPILER_FLAG("-Wno-unused-but-set-variable" HAS_UNUSED_BUT_SET_VARIABLE_WARNING)
                if(HAS_UNUSED_BUT_SET_VARIABLE_WARNING)
                        set(WARNING_FLAGS "${WARNING_FLAGS} -Wno-unused-but-set-variable")
                endif(HAS_UNUSED_BUT_SET_VARIABLE_WARNING)