@@ -36,6 +36,7 @@ string(JOIN " " VC6_CXX_FLAGS
36
36
"/GR" # Enable RTTI (Run-Time Type Information, needed for things like dynamic_cast)
37
37
"/Op" # Improve floating point consistency (More ISO-compliant and closer to 64bit behaviour)
38
38
"/EHs" # Synchronous C++ exception handling (ISO-standard C++ exception handling)
39
+ # "/GA" # Optimize for Windows Application (should only be set on the main executable?)
39
40
# "/Za" # Disable Microsoft language extensions (enforce standard)
40
41
)
41
42
set (CMAKE_CXX_FLAGS "${VC6_CXX_FLAGS} " CACHE STRING "" FORCE )
@@ -46,7 +47,7 @@ string(JOIN " " VC6_CXX_FLAGS_DEBUG
46
47
"/EHc-" # Do NOT assume extern "C" functions never throw (less strict, useful for debugging)
47
48
"/Oy-" # Disable frame pointer omission (helps debugging)
48
49
"/GZ" # Helps Catch Release-Build Errors in Debug Build
49
- "/Yd" # Store complete debug info in .obj (needed for embedded debug info from precompiled header to be accessible)
50
+ # "/Yd" # Store complete debug info in .obj (needed for embedded debug info from precompiled header to be accessible)
50
51
)
51
52
set (CMAKE_CXX_FLAGS_DEBUG "${VC6_CXX_FLAGS_DEBUG} " CACHE STRING "" FORCE )
52
53
@@ -69,21 +70,32 @@ set(CMAKE_EXE_LINKER_FLAGS "${VC6_EXE_LINKER_FLAGS}" CACHE STRING "" FORCE)
69
70
70
71
string (JOIN " " VC6_EXE_LINKER_FLAGS_RELEASE
71
72
"/RELEASE" # Set the checksum in the header and mark as release
72
- "/DEBUG:NONE" # Do not generate debug info
73
+ # "/DEBUG:NONE" # Do not generate debug info
74
+ "/PDBTYPE:SEPT" # Separate debug symbols
75
+ "/DEBUGTYPE:BOTH" # Use both CodeView and coff format for debug info
73
76
"/OPT:REF,ICF" # Remove unreferenced code/data, COMDAT folding
74
77
"/NOLOGO" # Suppress linker startup banner
75
78
)
76
79
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${VC6_EXE_LINKER_FLAGS_RELEASE} " CACHE STRING "" FORCE )
77
80
78
81
string (JOIN " " VC6_EXE_LINKER_FLAGS_DEBUG
79
- #"/DEBUG" # Generate debug info
80
- #"/PDB:NONE" # Do not generate a PDB file
81
- "/DEBUGTYPE:CV" # Use CodeView format for debug info (VC6 default)
82
+ "/DEBUG" # Generate debug info
83
+ "/DEBUGTYPE:CV" # Use CodeView format for debug info (VC6 default, needed for incremental linking)
84
+ # "/PDB:NONE" # Do not generate a PDB file
85
+ "/PDBTYPE:CON" # Place the debug type information in a single .PDB file
82
86
"/OPT:NOREF,NOICF" # Do not remove unreferenced code/data, COMDAT folding
83
- "/PDBTYPE:SEPT" # Separate debug symbols (one .pdb per .obj, easier for incremental linking)
84
87
"/INCREMENTAL:YES" # Enable incremental linking
85
88
"/VERBOSE" # Enable verbose output from the linker
86
89
)
87
90
set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${VC6_EXE_LINKER_FLAGS_DEBUG} " CACHE STRING "" FORCE )
88
91
89
- # @todo: Set default flags for C
92
+
93
+ set (CMAKE_SHARED_LINKER_FLAGS "${VC6_EXE_LINKER_FLAGS} " CACHE STRING "" FORCE )
94
+ set (CMAKE_SHARED_LINKER_FLAGS_DEBUG "${VC6_EXE_LINKER_FLAGS_DEBUG} " CACHE STRING "" FORCE )
95
+ set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "${VC6_EXE_LINKER_FLAGS_RELEASE} " CACHE STRING "" FORCE )
96
+
97
+ set (CMAKE_STATIC_LINKER_FLAGS "/machine:IX86" CACHE STRING "" FORCE )
98
+ set (CMAKE_STATIC_LINKER_FLAGS_DEBUG "" CACHE STRING "" FORCE )
99
+ set (CMAKE_STATIC_LINKER_FLAGS_RELEASE "" CACHE STRING "" FORCE )
100
+
101
+ # @todo: Set default flags for C
0 commit comments