diff options
author | Brad King <brad.king@kitware.com> | 2002-09-17 19:41:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2002-09-17 19:41:21 (GMT) |
commit | d631e114f95865dfd5c59f0fda47ef5a654155f9 (patch) | |
tree | e3530b9539d1cfc35732e203a8b7d39dfdc858e8 /Source/cmTryCompileCommand.cxx | |
parent | 67e13e97986fb4483c37d39a3d0dbce880090083 (diff) | |
download | CMake-d631e114f95865dfd5c59f0fda47ef5a654155f9.zip CMake-d631e114f95865dfd5c59f0fda47ef5a654155f9.tar.gz CMake-d631e114f95865dfd5c59f0fda47ef5a654155f9.tar.bz2 |
BUG: Generated CMakeLists.txt file needs to take CMAKE_ANSI_CXXFLAGS into account.
Diffstat (limited to 'Source/cmTryCompileCommand.cxx')
-rw-r--r-- | Source/cmTryCompileCommand.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
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<std::string> 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"; |