diff options
-rw-r--r-- | Source/cmDSPMakefile.cxx | 18 | ||||
-rw-r--r-- | Source/cmDSPWriter.cxx | 18 | ||||
-rw-r--r-- | Templates/CMakeWindowsSystemConfig.cmake | 5 | ||||
-rw-r--r-- | Templates/DLLHeader.dsptemplate | 24 | ||||
-rw-r--r-- | Templates/EXEHeader.dsptemplate | 21 | ||||
-rw-r--r-- | Templates/EXEWinHeader.dsptemplate | 21 | ||||
-rw-r--r-- | Templates/staticLibHeader.dsptemplate | 22 |
7 files changed, 100 insertions, 29 deletions
diff --git a/Source/cmDSPMakefile.cxx b/Source/cmDSPMakefile.cxx index 7fa43f0..dfee8f1 100644 --- a/Source/cmDSPMakefile.cxx +++ b/Source/cmDSPMakefile.cxx @@ -565,6 +565,24 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName, cmSystemTools::ReplaceString(line, "EXTRA_DEFINES", m_Makefile->GetDefineFlags()); + cmSystemTools::ReplaceString(line, + "CMAKE_CXX_FLAGS_RELEASE", + m_Makefile-> + GetDefinition("CMAKE_CXX_FLAGS_RELEASE")); + cmSystemTools::ReplaceString(line, + "CMAKE_CXX_FLAGS_MINSIZEREL", + m_Makefile-> + GetDefinition("CMAKE_CXX_FLAGS_MINSIZEREL") + ); + cmSystemTools::ReplaceString(line, + "CMAKE_CXX_FLAGS_DEBUG", + m_Makefile-> + GetDefinition("CMAKE_CXX_FLAGS_DEBUG")); + cmSystemTools::ReplaceString(line, + "CMAKE_CXX_FLAGS", + m_Makefile-> + GetDefinition("CMAKE_CXX_FLAGS")); + fout << line.c_str() << std::endl; } } diff --git a/Source/cmDSPWriter.cxx b/Source/cmDSPWriter.cxx index 7fa43f0..dfee8f1 100644 --- a/Source/cmDSPWriter.cxx +++ b/Source/cmDSPWriter.cxx @@ -565,6 +565,24 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName, cmSystemTools::ReplaceString(line, "EXTRA_DEFINES", m_Makefile->GetDefineFlags()); + cmSystemTools::ReplaceString(line, + "CMAKE_CXX_FLAGS_RELEASE", + m_Makefile-> + GetDefinition("CMAKE_CXX_FLAGS_RELEASE")); + cmSystemTools::ReplaceString(line, + "CMAKE_CXX_FLAGS_MINSIZEREL", + m_Makefile-> + GetDefinition("CMAKE_CXX_FLAGS_MINSIZEREL") + ); + cmSystemTools::ReplaceString(line, + "CMAKE_CXX_FLAGS_DEBUG", + m_Makefile-> + GetDefinition("CMAKE_CXX_FLAGS_DEBUG")); + cmSystemTools::ReplaceString(line, + "CMAKE_CXX_FLAGS", + m_Makefile-> + GetDefinition("CMAKE_CXX_FLAGS")); + fout << line.c_str() << std::endl; } } diff --git a/Templates/CMakeWindowsSystemConfig.cmake b/Templates/CMakeWindowsSystemConfig.cmake index a1ca685..c30d75f 100644 --- a/Templates/CMakeWindowsSystemConfig.cmake +++ b/Templates/CMakeWindowsSystemConfig.cmake @@ -6,4 +6,7 @@ SET (WORDS_BIGENDIAN ) SET (HAVE_LIMITS_H 1) SET (HAVE_UNISTD_H 1) SET (CXX VC++60) - +SET (CMAKE_CXX_FLAGS_RELEASE "/MD /O2" CACHE_NO_REPLACE) +SET (CMAKE_CXX_FLAGS_MINSIZEREL "/MD /O1" CACHE_NO_REPLACE) +SET (CMAKE_CXX_FLAGS_DEBUG "/MDd /Zi /Od /Gz /O2" CACHE_NO_REPLACE) +SET (CMAKE_CXX_FLAGS "/W3 /Zm1000 /GX /GR" CACHE_NO_REPLACE) diff --git a/Templates/DLLHeader.dsptemplate b/Templates/DLLHeader.dsptemplate index e5c3c5b..5378d4c 100644 --- a/Templates/DLLHeader.dsptemplate +++ b/Templates/DLLHeader.dsptemplate @@ -56,9 +56,11 @@ RSC=rc.exe # PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GR /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "OUTPUT_LIBNAME_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GR /GX /O2 BUILD_INCLUDES EXTRA_DEFINES /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "OUTPUT_LIBNAME_EXPORTS" /FD /c
-# SUBTRACT CPP /YX
+# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "OUTPUT_LIBNAME_EXPORTS" /FD /c
+# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS"
+# ADD CPP CMAKE_CXX_FLAGS_RELEASE
+# ADD CPP CMAKE_CXX_FLAGS
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
@@ -83,9 +85,11 @@ LINK32=link.exe # PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /GR /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "OUTPUT_LIBNAME_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /GR /GX /Zi /Od BUILD_INCLUDES EXTRA_DEFINES /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "OUTPUT_LIBNAME_EXPORTS" /FD /GZ /c
-# SUBTRACT CPP /YX
+# ADD BASE CPP /nologo /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "OUTPUT_LIBNAME_EXPORTS" /FD /c
+# ADD CPP /nologo /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS"
+# ADD CPP CMAKE_CXX_FLAGS_DEBUG
+# ADD CPP CMAKE_CXX_FLAGS
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
@@ -111,10 +115,12 @@ LINK32=link.exe # PROP Intermediate_Dir "LIBRARY_OUTPUT_PATHMinSizeRel"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /GR /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "OUTPUT_LIBNAME_EXPORTS" /FD /c
+# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FD /c
# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /GR /GX /O1 BUILD_INCLUDES EXTRA_DEFINES /D "VTKDLL" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "OUTPUT_LIBNAME_EXPORTS" /FD /c
-# SUBTRACT CPP /YX
+# ADD CPP /nologo /D "VTKDLL" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS"
+# ADD CPP CMAKE_CXX_FLAGS_MINSIZEREL
+# ADD CPP CMAKE_CXX_FLAGS
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
diff --git a/Templates/EXEHeader.dsptemplate b/Templates/EXEHeader.dsptemplate index e94b624..b9f5699 100644 --- a/Templates/EXEHeader.dsptemplate +++ b/Templates/EXEHeader.dsptemplate @@ -55,8 +55,11 @@ RSC=rc.exe # PROP Output_Dir "EXECUTABLE_OUTPUT_PATHRelease"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GR /GX /Zm1000 /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
-# ADD CPP /nologo /MD /W3 /GR /GX /Zm1000 /O2 /D "WIN32" BUILD_INCLUDES EXTRA_DEFINES /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS"
+# ADD CPP CMAKE_CXX_FLAGS_RELEASE
+# ADD CPP CMAKE_CXX_FLAGS
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@@ -80,8 +83,11 @@ CM_MULTILINE_LIBRARIES # PROP Output_Dir "EXECUTABLE_OUTPUT_PATHDebug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
-# ADD BASE CPP /W3 /GR /Zm1000 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
-# ADD CPP /nologo /W3 /MDd /GR /Gm /GX /Zm1000 /ZI /Od /D "WIN32" BUILD_INCLUDES EXTRA_DEFINES /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# ADD BASE CPP /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# ADD CPP /nologo /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS"
+# ADD CPP CMAKE_CXX_FLAGS_DEBUG
+# ADD CPP CMAKE_CXX_FLAGS
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
@@ -106,8 +112,11 @@ CM_MULTILINE_LIBRARIES # PROP Output_Dir "EXECUTABLE_OUTPUT_PATHMinSizeRel"
# PROP Intermediate_Dir "MinSizeRel"
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /GR /GX /Zm1000 /O1 /Gs /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
-# ADD CPP /nologo /MD /W3 /GR /GX /Zm1000 /O1 /Gs /D "WIN32" BUILD_INCLUDES EXTRA_DEFINES /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP /nologo /D "WIN32" BUILD_INCLUDES EXTRA_DEFINES /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS"
+# ADD CPP CMAKE_CXX_FLAGS_MINSIZEREL
+# ADD CPP CMAKE_CXX_FLAGS
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
diff --git a/Templates/EXEWinHeader.dsptemplate b/Templates/EXEWinHeader.dsptemplate index 5734941..560c6b4 100644 --- a/Templates/EXEWinHeader.dsptemplate +++ b/Templates/EXEWinHeader.dsptemplate @@ -55,8 +55,11 @@ RSC=rc.exe # PROP Output_Dir "EXECUTABLE_OUTPUT_PATHRelease"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GR /GX /Zm1000 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c
-# ADD CPP /nologo /MD /W3 /GR /GX /Zm1000 /O2 /D "WIN32" BUILD_INCLUDES EXTRA_DEFINES /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c
+# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c
+# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS"
+# ADD CPP CMAKE_CXX_FLAGS_RELEASE
+# ADD CPP CMAKE_CXX_FLAGS
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
@@ -82,8 +85,11 @@ CM_MULTILINE_LIBRARIES # PROP Output_Dir "EXECUTABLE_OUTPUT_PATHDebug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
-# ADD BASE CPP /W3 /GR /Zm1000 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FD /GZ /c
-# ADD CPP /nologo /W3 /MDd /GR /Gm /GX /Zm1000 /ZI /Od /D "WIN32" BUILD_INCLUDES EXTRA_DEFINES /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FD /GZ /c
+# ADD BASE CPP /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c
+# ADD CPP /nologo /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FD /GZ /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS"
+# ADD CPP CMAKE_CXX_FLAGS_DEBUG
+# ADD CPP CMAKE_CXX_FLAGS
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
@@ -109,8 +115,11 @@ CM_MULTILINE_LIBRARIES # PROP Output_Dir "EXECUTABLE_OUTPUT_PATHMinSizeRel"
# PROP Intermediate_Dir "MinSizeRel"
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /GR /GX /Zm1000 /O1 /Gs /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c
-# ADD CPP /nologo /MD /W3 /GR /GX /Zm1000 /O1 /Gs /D "WIN32" BUILD_INCLUDES EXTRA_DEFINES /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c
+# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c
+# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS"
+# ADD CPP CMAKE_CXX_FLAGS_MINSIZEREL
+# ADD CPP CMAKE_CXX_FLAGS
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
diff --git a/Templates/staticLibHeader.dsptemplate b/Templates/staticLibHeader.dsptemplate index 419f312..31640ef 100644 --- a/Templates/staticLibHeader.dsptemplate +++ b/Templates/staticLibHeader.dsptemplate @@ -52,8 +52,11 @@ RSC=rc.exe # PROP Output_Dir "LIBRARY_OUTPUT_PATHRelease"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c
-# ADD CPP /nologo /GR /MD /W3 /GX /Zm1000 /O2 BUILD_INCLUDES EXTRA_DEFINES /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
+# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c
+# ADD CPP /nologo /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS"
+# ADD CPP CMAKE_CXX_FLAGS_RELEASE
+# ADD CPP CMAKE_CXX_FLAGS
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@@ -75,8 +78,11 @@ LIB32=link.exe -lib # PROP Output_Dir "LIBRARY_OUTPUT_PATHDebug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /GR /GX /Zm1000 /Zi /Od BUILD_INCLUDES EXTRA_DEFINES /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /GZ /c
+# ADD BASE CPP /nologo /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /c
+# ADD CPP /nologo /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /GZ /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS"
+# ADD CPP CMAKE_CXX_FLAGS_DEBUG
+# ADD CPP CMAKE_CXX_FLAGS
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
@@ -97,9 +103,11 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "MinSizeRel"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /FD /c
-# ADD CPP /nologo /GR /GX /Zm1000 /MD /W3 /O1 BUILD_INCLUDES EXTRA_DEFINES /D "NDEBUG" /D "_MBCS" /D "_ATL_DLL" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
+# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /FD /c
+# ADD CPP /nologo /D "NDEBUG" /D "_MBCS" /D "_ATL_DLL" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS"
+# ADD CPP CMAKE_CXX_FLAGS_MINSIZEREL
+# ADD CPP CMAKE_CXX_FLAGS
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
|