Fixes the way conditions are checked on variables so it is correct. (#780)
This commit is contained in:
parent
4d0c7d706d
commit
502fee1b45
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue