File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ if (NOT DEFINED CMAKE_C_STANDARD)
175
175
RESULT
176
176
${AWSLC_BINARY_DIR}
177
177
SOURCES "${CMAKE_CURRENT_LIST_DIR} /tests/compiler_features_tests/c11.c"
178
- COMPILE_DEFINITIONS - c -std=c11)
178
+ CMAKE_FLAGS "-DCMAKE_C_FLAGS=- c -std=c11" )
179
179
if (RESULT)
180
180
set (CMAKE_C_STANDARD 11)
181
181
else ()
@@ -353,7 +353,7 @@ macro(check_compiler file_to_test flag_to_set)
353
353
${flag_to_set} # Use CMake variable of the same name as the C flag to allow later reference
354
354
${AWSLC_BINARY_DIR}
355
355
SOURCES "${AWSLC_SOURCE_DIR} /tests/compiler_features_tests/${file_to_test} "
356
- COMPILE_DEFINITIONS " -Werror ${ARGN} "
356
+ CMAKE_FLAGS "-DCMAKE_C_FLAGS=-Werror ${ARGN} " "-DCMAKE_CXX_FLAGS= -Werror ${ARGN} "
357
357
OUTPUT_VARIABLE ERROR_MESSAGE)
358
358
if (${flag_to_set} )
359
359
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D${flag_to_set} " )
@@ -380,7 +380,7 @@ macro(check_run file_to_test flag_to_set compile_flags)
380
380
COMPILE_RESULT
381
381
"${CMAKE_CURRENT_BINARY_DIR} "
382
382
"${CMAKE_CURRENT_LIST_DIR} /tests/compiler_features_tests/${file_to_test} "
383
- COMPILE_DEFINITIONS " ${compile_flags} "
383
+ CMAKE_FLAGS "-DCMAKE_C_FLAGS= ${compile_flags} " "-DCMAKE_CXX_FLAGS= ${compile_flags} "
384
384
OUTPUT_VARIABLE COMPILE_AND_RUN_OUTPUT)
385
385
if (NOT COMPILE_RESULT)
386
386
message (WARNING "COMPILE_AND_RUN_OUTPUT ${COMPILE_AND_RUN_OUTPUT} " )
You can’t perform that action at this time.
0 commit comments