Commit f4f3b9c2 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

fix casing of check_cxx_compiler_flag

Summary: The CMake function `check_cxx_compiler_flag` is snake-case rather than uppercase.

Reviewed By: vitaut

Differential Revision: D26573998

fbshipit-source-id: 91d5e2cea933d35967d013b2344e50f52fb6ba77
parent a3c7ccef
...@@ -29,7 +29,7 @@ endif() ...@@ -29,7 +29,7 @@ endif()
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
# clang only rejects unknown warning flags if -Werror=unknown-warning-option # clang only rejects unknown warning flags if -Werror=unknown-warning-option
# is also specified. # is also specified.
CHECK_CXX_COMPILER_FLAG( check_cxx_compiler_flag(
-Werror=unknown-warning-option -Werror=unknown-warning-option
COMPILER_HAS_UNKNOWN_WARNING_OPTION) COMPILER_HAS_UNKNOWN_WARNING_OPTION)
if (COMPILER_HAS_UNKNOWN_WARNING_OPTION) if (COMPILER_HAS_UNKNOWN_WARNING_OPTION)
...@@ -37,8 +37,8 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") ...@@ -37,8 +37,8 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
"${CMAKE_REQUIRED_FLAGS} -Werror=unknown-warning-option") "${CMAKE_REQUIRED_FLAGS} -Werror=unknown-warning-option")
endif() endif()
CHECK_CXX_COMPILER_FLAG(-Wshadow-local COMPILER_HAS_W_SHADOW_LOCAL) check_cxx_compiler_flag(-Wshadow-local COMPILER_HAS_W_SHADOW_LOCAL)
CHECK_CXX_COMPILER_FLAG( check_cxx_compiler_flag(
-Wshadow-compatible-local -Wshadow-compatible-local
COMPILER_HAS_W_SHADOW_COMPATIBLE_LOCAL) COMPILER_HAS_W_SHADOW_COMPATIBLE_LOCAL)
if (COMPILER_HAS_W_SHADOW_LOCAL AND COMPILER_HAS_W_SHADOW_COMPATIBLE_LOCAL) if (COMPILER_HAS_W_SHADOW_LOCAL AND COMPILER_HAS_W_SHADOW_COMPATIBLE_LOCAL)
...@@ -46,31 +46,31 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") ...@@ -46,31 +46,31 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
list(APPEND FOLLY_CXX_FLAGS -Wshadow-compatible-local) list(APPEND FOLLY_CXX_FLAGS -Wshadow-compatible-local)
endif() endif()
CHECK_CXX_COMPILER_FLAG(-Wnoexcept-type COMPILER_HAS_W_NOEXCEPT_TYPE) check_cxx_compiler_flag(-Wnoexcept-type COMPILER_HAS_W_NOEXCEPT_TYPE)
if (COMPILER_HAS_W_NOEXCEPT_TYPE) if (COMPILER_HAS_W_NOEXCEPT_TYPE)
list(APPEND FOLLY_CXX_FLAGS -Wno-noexcept-type) list(APPEND FOLLY_CXX_FLAGS -Wno-noexcept-type)
endif() endif()
CHECK_CXX_COMPILER_FLAG( check_cxx_compiler_flag(
-Wnullability-completeness -Wnullability-completeness
COMPILER_HAS_W_NULLABILITY_COMPLETENESS) COMPILER_HAS_W_NULLABILITY_COMPLETENESS)
if (COMPILER_HAS_W_NULLABILITY_COMPLETENESS) if (COMPILER_HAS_W_NULLABILITY_COMPLETENESS)
list(APPEND FOLLY_CXX_FLAGS -Wno-nullability-completeness) list(APPEND FOLLY_CXX_FLAGS -Wno-nullability-completeness)
endif() endif()
CHECK_CXX_COMPILER_FLAG( check_cxx_compiler_flag(
-Winconsistent-missing-override -Winconsistent-missing-override
COMPILER_HAS_W_INCONSISTENT_MISSING_OVERRIDE) COMPILER_HAS_W_INCONSISTENT_MISSING_OVERRIDE)
if (COMPILER_HAS_W_INCONSISTENT_MISSING_OVERRIDE) if (COMPILER_HAS_W_INCONSISTENT_MISSING_OVERRIDE)
list(APPEND FOLLY_CXX_FLAGS -Wno-inconsistent-missing-override) list(APPEND FOLLY_CXX_FLAGS -Wno-inconsistent-missing-override)
endif() endif()
CHECK_CXX_COMPILER_FLAG(-faligned-new COMPILER_HAS_F_ALIGNED_NEW) check_cxx_compiler_flag(-faligned-new COMPILER_HAS_F_ALIGNED_NEW)
if (COMPILER_HAS_F_ALIGNED_NEW) if (COMPILER_HAS_F_ALIGNED_NEW)
list(APPEND FOLLY_CXX_FLAGS -faligned-new) list(APPEND FOLLY_CXX_FLAGS -faligned-new)
endif() endif()
CHECK_CXX_COMPILER_FLAG(-fopenmp COMPILER_HAS_F_OPENMP) check_cxx_compiler_flag(-fopenmp COMPILER_HAS_F_OPENMP)
if (COMPILER_HAS_F_OPENMP) if (COMPILER_HAS_F_OPENMP)
list(APPEND FOLLY_CXX_FLAGS -fopenmp) list(APPEND FOLLY_CXX_FLAGS -fopenmp)
endif() endif()
......
...@@ -315,7 +315,7 @@ set(PCLMUL_FILES ...@@ -315,7 +315,7 @@ set(PCLMUL_FILES
${FOLLY_DIR}/hash/detail/Crc32CombineDetail.cpp ${FOLLY_DIR}/hash/detail/Crc32CombineDetail.cpp
${FOLLY_DIR}/hash/detail/Crc32cDetail.cpp ${FOLLY_DIR}/hash/detail/Crc32cDetail.cpp
) )
CHECK_CXX_COMPILER_FLAG(-mpclmul COMPILER_HAS_M_PCLMUL) check_cxx_compiler_flag(-mpclmul COMPILER_HAS_M_PCLMUL)
if (COMPILER_HAS_M_PCLMUL) if (COMPILER_HAS_M_PCLMUL)
message( message(
STATUS STATUS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment