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 @@ -166,7 +166,7 @@ if (NOT DEFINED CMAKE_C_STANDARD)
166
166
RESULT
167
167
${AWSLC_BINARY_DIR}
168
168
SOURCES "${CMAKE_CURRENT_LIST_DIR} /tests/compiler_features_tests/c11.c"
169
- COMPILE_DEFINITIONS - c -std=c11 )
169
+ CMAKE_FLAGS "-DCMAKE_C_FLAGS=- c -std=c11" )
170
170
if (RESULT )
171
171
set (CMAKE_C_STANDARD 11 )
172
172
else ()
@@ -344,7 +344,7 @@ macro(check_compiler file_to_test flag_to_set)
344
344
${flag_to_set} # Use CMake variable of the same name as the C flag to allow later reference
345
345
${AWSLC_BINARY_DIR}
346
346
SOURCES "${AWSLC_SOURCE_DIR} /tests/compiler_features_tests/${file_to_test} "
347
- COMPILE_DEFINITIONS " -Werror ${ARGN} "
347
+ CMAKE_FLAGS "-DCMAKE_C_FLAGS=-Werror ${ARGN} " "-DCMAKE_CXX_FLAGS= -Werror ${ARGN} "
348
348
OUTPUT_VARIABLE ERROR_MESSAGE )
349
349
if (${flag_to_set} )
350
350
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D${flag_to_set} " )
@@ -371,7 +371,7 @@ macro(check_run file_to_test flag_to_set compile_flags)
371
371
COMPILE_RESULT
372
372
"${CMAKE_CURRENT_BINARY_DIR} "
373
373
"${CMAKE_CURRENT_LIST_DIR} /tests/compiler_features_tests/${file_to_test} "
374
- COMPILE_DEFINITIONS " ${compile_flags} "
374
+ CMAKE_FLAGS "-DCMAKE_C_FLAGS= ${compile_flags} " "-DCMAKE_CXX_FLAGS= ${compile_flags} "
375
375
OUTPUT_VARIABLE COMPILE_AND_RUN_OUTPUT )
376
376
if (NOT COMPILE_RESULT )
377
377
message (WARNING "COMPILE_AND_RUN_OUTPUT ${COMPILE_AND_RUN_OUTPUT} " )
You can’t perform that action at this time.
0 commit comments