summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Ticehurst <billti@hotmail.com>2019-05-16 20:04:50 -0700
committerBen Smith <binji@chromium.org>2019-05-16 20:04:50 -0700
commit66cb491d3ecd8f0ea438fd90033112330117729b (patch)
tree193a8ac9e7f04c22bb3fae164625872bba1f893d
parentc65a5319441a86109f2c4f9cdc1d626e89875c4f (diff)
downloadwabt-66cb491d3ecd8f0ea438fd90033112330117729b.tar.gz
wabt-66cb491d3ecd8f0ea438fd90033112330117729b.tar.bz2
wabt-66cb491d3ecd8f0ea438fd90033112330117729b.zip
Fix up CMake warning (#1081)
-rw-r--r--.gitignore2
-rw-r--r--CMakeLists.txt8
2 files changed, 6 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 79c4e47b..645634fa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,9 @@
/bin
+/build
/out
/fuzz-out
/emscripten
*.pyc
.idea/
+.vscode/
/cmake-build-debug/
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 49f5bfbc..6d68cb18 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,19 +27,19 @@ option(CODE_COVERAGE "Build with code coverage enabled" OFF)
option(WITH_EXCEPTIONS "Build with exceptions enabled" OFF)
option(WERROR "Build with warnings as errors" OFF)
-if (${CMAKE_C_COMPILER_ID} STREQUAL "Clang")
+if (CMAKE_C_COMPILER_ID MATCHES "Clang")
set(COMPILER_IS_CLANG 1)
set(COMPILER_IS_GNU 0)
set(COMPILER_IS_MSVC 0)
-elseif (${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
+elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU")
set(COMPILER_IS_CLANG 0)
set(COMPILER_IS_GNU 1)
set(COMPILER_IS_MSVC 0)
-elseif (${CMAKE_C_COMPILER_ID} STREQUAL "MSVC")
+elseif (MSVC)
set(COMPILER_IS_CLANG 0)
set(COMPILER_IS_GNU 0)
set(COMPILER_IS_MSVC 1)
-elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Emscripten")
+elseif (CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
set(COMPILER_IS_CLANG 1)
set(COMPILER_IS_GNU 0)
set(COMPILER_IS_MSVC 0)