Fixes the way conditions are checked on variables so it is correct. (#780)

This commit is contained in:
Daniel Lemire 2020-04-23 16:01:40 -04:00 committed by GitHub
parent 4d0c7d706d
commit 502fee1b45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -14,14 +14,14 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
function(add_quickstart_test TEST_NAME SOURCE_FILE)
# Second argument is C++ standard name
if (MSVC)
if (${ARGV2})
if (ARGV2)
set(QUICKSTART_FLAGS /std:${ARGV2})
else()
set(QUICKSTART_FLAGS /WX)
endif()
set(QUICKSTART_INCLUDE /I${PROJECT_SOURCE_DIR}/include /I${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/src/simdjson.cpp)
else()
if (${ARGV2})
if (ARGV2)
set(QUICKSTART_FLAGS -Werror -std=${ARGV2})
else()
set(QUICKSTART_FLAGS -Werror)
@ -30,7 +30,7 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
endif()
# Third argument tells whether to compile with -fno-exceptions
if (${ARGV3})
if (ARGV3)
if (NOT MSVC)
set(QUICKSTART_FLAGS ${QUICKSTART_FLAGS} -fno-exceptions)
endif()