From d631e114f95865dfd5c59f0fda47ef5a654155f9 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 17 Sep 2002 15:41:21 -0400 Subject: BUG: Generated CMakeLists.txt file needs to take CMAKE_ANSI_CXXFLAGS into account. --- Source/cmTryCompileCommand.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/cmTryCompileCommand.cxx b/Source/cmTryCompileCommand.cxx index 8638dd9..9128756 100644 --- a/Source/cmTryCompileCommand.cxx +++ b/Source/cmTryCompileCommand.cxx @@ -72,6 +72,9 @@ bool cmTryCompileCommand::InitialPass(std::vector const& argv) return false; } 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, "ENDIF (CMAKE_ANSI_CXXFLAGS)\n"); fprintf(fout,"ADD_EXECUTABLE(cmTryCompileExec \"%s\")\n",argv[2].c_str()); fclose(fout); projectName = "CMAKE_TRY_COMPILE"; -- cgit v0.12