Fix CMake checks for Linux The LINUX variable is not a thing (at least not by default). Use an explicit CMAKE_SYSTEM_NAME check.
diff --git a/CMakeLists.txt b/CMakeLists.txt index d171a67..6b4cf08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -222,7 +222,7 @@ endif() # The version of clang currently on our Mac bots doesn't seem to support this flag. -if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND (LINUX OR WINDOWS)) +if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT APPLE) add_link_flag("-fuse-ld=lld") endif() @@ -473,7 +473,7 @@ else() message(STATUS "Building libbinaryen as shared library.") add_library(binaryen SHARED) - if(LINUX) + if(CMAKE_SYSTEM_NAME STREQUAL "Linux") # Disable interposition and resolve Binaryen symbols locally. add_link_flag("-Bsymbolic") endif()