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)
138138set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} "
139139 CACHE STRING "Flags for RelWithDebInfo configuration." FORCE)
140140
141+ set (CMAKE_CXX_FLAGS "" )
141142if (HNSWLIB_EXAMPLES)
142143 message ("Building examples and tests" )
143144 message ("System architecture: ${CMAKE_HOST_SYSTEM_PROCESSOR} " )
@@ -173,7 +174,7 @@ if(HNSWLIB_EXAMPLES)
173174 set (${FLAGS_VAR} "${${FLAGS_VAR} }" CACHE STRING
174175 "Flags for ${config} configuration." FORCE)
175176 endforeach ()
176- string (REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} " )
177+ # string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
177178 endif ()
178179 add_cxx_flags(/O2 /W1 /openmp)
179180 endif ()
@@ -243,3 +244,8 @@ if(HNSWLIB_EXAMPLES)
243244 endif ()
244245 endforeach ()
245246endif ()
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