Changes to cef_variables.cmake are made permanently, there is no undo.
()
| 549 | |
| 550 | |
| 551 | def fix_cmake_variables_permanently_windows(): |
| 552 | """Changes to cef_variables.cmake are made permanently, there is no undo. |
| 553 | """ |
| 554 | # To get rid of these warnings: |
| 555 | # > cl : Command line warning D9025 : overriding '/GR' with '/GR-' |
| 556 | # > cl : Command line warning D9025 : overriding '/W3' with '/W4' |
| 557 | # > cl : Command line warning D9025 : overriding '/MD' with '/MT' |
| 558 | cmake_variables = os.path.join(Options.cef_binary, "cmake", |
| 559 | "cef_variables.cmake") |
| 560 | with open(cmake_variables, "rb") as fp: |
| 561 | contents = fp.read().decode("utf-8") |
| 562 | set1 = 'set(CMAKE_CXX_FLAGS_RELEASE "")' |
| 563 | set2 = 'set(CMAKE_CXX_FLAGS "")' |
| 564 | if "if(OS_WINDOWS)" not in contents: |
| 565 | print("[automate.py] WARNING: failed to fix cmake variables" |
| 566 | " permanently on Windows") |
| 567 | return |
| 568 | if set1 not in contents or set2 not in contents: |
| 569 | contents = contents.replace("if(OS_WINDOWS)", |
| 570 | "if(OS_WINDOWS)\n {set1}\n {set2}" |
| 571 | .format(set1=set1, set2=set2)) |
| 572 | else: |
| 573 | return |
| 574 | with open(cmake_variables, "wb") as fp: |
| 575 | print("[automate.py] Fix permanently: {filename}" |
| 576 | .format(filename=os.path.basename(cmake_variables))) |
| 577 | fp.write(contents.encode("utf-8")) |
| 578 | |
| 579 | |
| 580 | def fix_cmake_variables_for_MD_library(undo=False, try_undo=False): |
no outgoing calls
no test coverage detected