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