File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ string(STRIP "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" CMAKE_CXX_FLAGS_RELWITHDEBINFO)
138
138
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} "
139
139
CACHE STRING "Flags for RelWithDebInfo configuration." FORCE )
140
140
141
+ set (CMAKE_CXX_FLAGS "" )
141
142
if (HNSWLIB_EXAMPLES )
142
143
message ("Building examples and tests" )
143
144
message ("System architecture: ${CMAKE_HOST_SYSTEM_PROCESSOR} " )
@@ -173,7 +174,7 @@ if(HNSWLIB_EXAMPLES)
173
174
set (${FLAGS_VAR} "${${FLAGS_VAR} }" CACHE STRING
174
175
"Flags for ${config} configuration." FORCE )
175
176
endforeach ()
176
- string (REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} " )
177
+ # string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
177
178
endif ()
178
179
add_cxx_flags (/O2 /W1 /openmp )
179
180
endif ()
@@ -243,3 +244,8 @@ if(HNSWLIB_EXAMPLES)
243
244
endif ()
244
245
endforeach ()
245
246
endif ()
247
+
248
+ # Persist CMAKE_CXX_FLAGS in the cache for debuggability.
249
+ string (STRIP "${CMAKE_CXX_FLAGS} " CMAKE_CXX_FLAGS )
250
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} "
251
+ CACHE STRING "Flags used by the CXX compiler during all build types." FORCE )
You can’t perform that action at this time.
0 commit comments