diff --git a/cmake/dependencies/CMakeLists.txt b/cmake/dependencies/CMakeLists.txt index 972a70e375..71555f63fa 100644 --- a/cmake/dependencies/CMakeLists.txt +++ b/cmake/dependencies/CMakeLists.txt @@ -185,7 +185,9 @@ if(BUILD_CoinUtils) FetchContent_Declare( CoinUtils GIT_REPOSITORY "https://github.com/Mizux/CoinUtils.git" - GIT_TAG "stable/2.11") + GIT_TAG "stable/2.11" + PATCH_COMMAND git apply --ignore-whitespace + "${CMAKE_CURRENT_LIST_DIR}/../../patches/coinutils-2.11.patch") FetchContent_MakeAvailable(CoinUtils) list(POP_BACK CMAKE_MESSAGE_INDENT) message(CHECK_PASS "fetched") @@ -200,7 +202,9 @@ if(BUILD_Osi) FetchContent_Declare( Osi GIT_REPOSITORY "https://github.com/Mizux/Osi.git" - GIT_TAG "stable/0.108") + GIT_TAG "stable/0.108" + PATCH_COMMAND git apply --ignore-whitespace + "${CMAKE_CURRENT_LIST_DIR}/../../patches/osi-0.108.patch") FetchContent_MakeAvailable(Osi) list(POP_BACK CMAKE_MESSAGE_INDENT) message(CHECK_PASS "fetched") @@ -215,7 +219,9 @@ if(BUILD_Clp) FetchContent_Declare( Clp GIT_REPOSITORY "https://github.com/Mizux/Clp.git" - GIT_TAG "stable/1.17.4") + GIT_TAG "stable/1.17.4" + PATCH_COMMAND git apply --ignore-whitespace + "${CMAKE_CURRENT_LIST_DIR}/../../patches/clp-1.17.4.patch") FetchContent_MakeAvailable(Clp) list(POP_BACK CMAKE_MESSAGE_INDENT) message(CHECK_PASS "fetched") @@ -230,7 +236,9 @@ if(BUILD_Cgl) FetchContent_Declare( Cgl GIT_REPOSITORY "https://github.com/Mizux/Cgl.git" - GIT_TAG "stable/0.60") + GIT_TAG "stable/0.60" + PATCH_COMMAND git apply --ignore-whitespace + "${CMAKE_CURRENT_LIST_DIR}/../../patches/cgl-0.60.patch") FetchContent_MakeAvailable(Cgl) list(POP_BACK CMAKE_MESSAGE_INDENT) message(CHECK_PASS "fetched") @@ -245,7 +253,9 @@ if(BUILD_Cbc) FetchContent_Declare( Cbc GIT_REPOSITORY "https://github.com/Mizux/Cbc.git" - GIT_TAG "stable/2.10") + GIT_TAG "stable/2.10" + PATCH_COMMAND git apply --ignore-whitespace + "${CMAKE_CURRENT_LIST_DIR}/../../patches/cbc-2.10.patch") FetchContent_MakeAvailable(Cbc) list(POP_BACK CMAKE_MESSAGE_INDENT) message(CHECK_PASS "fetched") diff --git a/patches/cbc-2.10.patch b/patches/cbc-2.10.patch new file mode 100644 index 0000000000..c189c9cf39 --- /dev/null +++ b/patches/cbc-2.10.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 22b7a17f..0a5a18dd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -51,6 +51,7 @@ if(APPLE) + CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override -Wno-unused-command-line-argument -Wno-unused-result -Wno-exceptions" + ) ++ add_compile_options(-O1) + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment version") + endif(APPLE) + diff --git a/patches/cgl-0.60.patch b/patches/cgl-0.60.patch new file mode 100644 index 0000000000..c3d8ddfa64 --- /dev/null +++ b/patches/cgl-0.60.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4a70789..d19c2a9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -51,6 +51,7 @@ if(APPLE) + CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override -Wno-unused-command-line-argument -Wno-unused-result -Wno-exceptions" + ) ++ add_compile_options(-O1) + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment version") + endif(APPLE) + diff --git a/patches/clp-1.17.4.patch b/patches/clp-1.17.4.patch new file mode 100644 index 0000000000..26d4c9dc85 --- /dev/null +++ b/patches/clp-1.17.4.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e1d43115..6b2a17ad 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -51,6 +51,7 @@ if(APPLE) + CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override -Wno-unused-command-line-argument -Wno-unused-result -Wno-exceptions" + ) ++ add_compile_options(-O1) + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment version") + endif(APPLE) + diff --git a/patches/coinutils-2.11.patch b/patches/coinutils-2.11.patch new file mode 100644 index 0000000000..01958318c0 --- /dev/null +++ b/patches/coinutils-2.11.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fcfa658..267ddd9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -51,6 +51,7 @@ if(APPLE) + CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override -Wno-unused-command-line-argument -Wno-unused-result -Wno-exceptions" + ) ++ add_compile_options(-O1) + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment version") + endif(APPLE) + diff --git a/patches/osi-0.108.patch b/patches/osi-0.108.patch new file mode 100644 index 0000000000..a282726abf --- /dev/null +++ b/patches/osi-0.108.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7b3cee2..2ac9c9d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -51,6 +51,7 @@ if(APPLE) + CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override -Wno-unused-command-line-argument -Wno-unused-result -Wno-exceptions" + ) ++ add_compile_options(-O1) + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment version") + endif(APPLE) +