From a8a087b099b2e3dfbba9c8a726208c4e88e98be7 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 21 Nov 2002 15:15:49 -0500 Subject: [PATCH] move compile defs to cxx and c flags --- Source/cmTryCompileCommand.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmTryCompileCommand.cxx b/Source/cmTryCompileCommand.cxx index 44752eb8d..04a7a4d2d 100644 --- a/Source/cmTryCompileCommand.cxx +++ b/Source/cmTryCompileCommand.cxx @@ -153,7 +153,8 @@ int cmTryCompileCommand::CoreTryCompileCode( return -1; } - fprintf(fout, "ADD_DEFINITIONS(${COMPILE_DEFINITIONS})\n"); + fprintf(fout, "SET(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} ${COMPILE_DEFINITIONS})\n"); + fprintf(fout, "SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${COMPILE_DEFINITIONS})\n"); fprintf(fout, "INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES})\n"); fprintf(fout, "LINK_DIRECTORIES(${LINK_DIRECTORIES})\n"); // handle any compile flags we need to pass on