Skip to content

Commit

Permalink
Avoid overwriting CMAKE_CXX_FLAGS
Browse files Browse the repository at this point in the history
Currently, we can't specify new `CMAKE_CXX_FLAGS` from the command line
of invoking cmake due to we overwrote the flags in CMakeLists.txt.

This patch avoids this.
  • Loading branch information
ChuanqiXu9 committed Nov 23, 2023
1 parent c920982 commit f5ccc27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ endif()
# End Detecing Uthread


string(REPLACE ";" " " CMAKE_CXX_FLAGS "${CXX_FLAGS}")
string(REPLACE ";" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAGS}")

if(NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
set(CMAKE_CXX_FLAGS_DEBUG "-O0")
Expand Down

0 comments on commit f5ccc27

Please sign in to comment.