-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
author Manav Shah <manavshah2002@live.com> 1617172313 -0700 committer Manav Shah <manavshah2002@live.com> 1618279004 -0700 Made cmake for lp_solve
- Loading branch information
1 parent
adb62d5
commit dbab7de
Showing
4 changed files
with
75 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,7 @@ test/Testing/Temporary/CTestCostData.txt | |
*.log | ||
.Rproj.user | ||
*.png | ||
test/build | ||
.vscode | ||
build | ||
.Rhistory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying | ||
# file Copyright.txt or https://cmake.org/licensing for details. | ||
|
||
cmake_minimum_required(VERSION 3.16.3) | ||
|
||
# We name the project and the target for the ExternalProject_Add() call | ||
# to something that will highlight to the user what we are working on if | ||
# something goes wrong and an error message is produced. | ||
|
||
project(lpsolve-populate NONE) | ||
|
||
include(ExternalProject) | ||
ExternalProject_Add(lpsolve-populate | ||
"UPDATE_DISCONNECTED" "False" "URL" "https://sourceforge.net/projects/lpsolve/files/lpsolve/5.5.2.11/lp_solve_5.5.2.11_source.tar.gz/download" "URL_HASH" "MD5=a829a8d9c60ff81dc72ff52363703886" | ||
SOURCE_DIR "/home/manav/volesti_fork/test/_deps/lpsolve-src" | ||
BINARY_DIR "/home/manav/volesti_fork/test/_deps/lpsolve-build" | ||
CONFIGURE_COMMAND "" | ||
BUILD_COMMAND "" | ||
INSTALL_COMMAND "" | ||
TEST_COMMAND "" | ||
USES_TERMINAL_DOWNLOAD YES | ||
USES_TERMINAL_UPDATE YES | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
function(Get_LP_Solver) | ||
find_path(LPSOLVE_DIR NAMES LPsolve_src PATHS ../../external) | ||
|
||
if(NOT LPSOLVE_DIR) | ||
|
||
include(FetchContent) | ||
FetchContent_Declare( | ||
lpSolve | ||
URL https://sourceforge.net/projects/lpsolve/files/lpsolve/5.5.2.11/lp_solve_5.5.2.11_source.tar.gz/download | ||
URL_HASH MD5=a829a8d9c60ff81dc72ff52363703886 | ||
) | ||
|
||
FetchContent_GetProperties(lpSolve) | ||
|
||
if(NOT lpSolve_POPULATE) | ||
message(STATUS "Downloading lp_solve.") | ||
FetchContent_Populate(lpSolve) | ||
message(STATUS "Download complete") | ||
|
||
set(LPSOLVE_DIR ${lpSolve_SOURCE_DIR}) | ||
message(STATUS "Using downloaded lp_solve at: ${LPSOLVE_DIR}") | ||
|
||
else() | ||
message(STATUS "lp_solve found: ${LPSOLVE_DIR}") | ||
|
||
endif() | ||
|
||
set(LPSOLVE_DIR "_deps/lpsolve-src") | ||
message(STATUS "Using downloaded lp_solve at: ${LPSOLVE_DIR}") | ||
|
||
endif() | ||
|
||
include_directories(${LPSOLVE_DIR}) | ||
|
||
endfunction() |