Fixed C compiler detection error in CMakeList.txt (#176)

* Fixed C compiler detection error in CMakeList.txt

* Update CMakeLists.txt

Co-authored-by: wenyongh <wenyong.huang@intel.com>
This commit is contained in:
renjipanicker 2020-02-24 08:59:23 +05:30 committed by GitHub
parent dc7177e745
commit 36b1044363
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,7 +63,7 @@ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat -Wformat-security")
# set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wsign-conversion")
if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64")
if (NOT (${CMAKE_C_COMPILER} MATCHES ".*clang.*"))
if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang"))
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register")
endif ()
endif ()