summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmTryCompileCommand.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmTryCompileCommand.cxx b/Source/cmTryCompileCommand.cxx
index fa90957..103f815 100644
--- a/Source/cmTryCompileCommand.cxx
+++ b/Source/cmTryCompileCommand.cxx
@@ -136,6 +136,7 @@ int cmTryCompileCommand::CoreTryCompileCode(
fprintf(fout, "PROJECT(CMAKE_TRY_COMPILE)\n");
fprintf(fout, "IF (CMAKE_ANSI_CXXFLAGS)\n");
fprintf(fout, " SET(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}\")\n");
+ fprintf(fout, " SET(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}\")\n");
fprintf(fout, "ENDIF (CMAKE_ANSI_CXXFLAGS)\n");
// handle any compile flags we need to pass on
if (compileFlags.size())