Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OR-Tools Integration & C++17 upgrade #1035

Open
wants to merge 148 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
74e6e73
add or-tools to ssc
dguittet Apr 24, 2023
1696543
ortools_test working
dguittet Jun 13, 2023
e9845c0
or_tools test
dguittet Jun 13, 2023
a1c5e56
Merge branch 'develop' into ortools
dguittet Jun 13, 2023
d4d7992
update for latest gtest
dguittet Aug 28, 2023
ae828af
update windows build
dguittet Sep 5, 2023
9659782
update build for windows
dguittet Sep 5, 2023
48a0636
or-tools in CI
dguittet Sep 18, 2023
61515c5
or-tools in CI
dguittet Sep 18, 2023
019a817
or-tools in CI
dguittet Sep 18, 2023
0f30dc9
fix ci.yml
dguittet Sep 18, 2023
0f79487
fix paths ci.yml
dguittet Sep 18, 2023
ff83c30
fix cmake
dguittet Sep 18, 2023
07fd932
fix min_up_down_params permissive
dguittet Sep 18, 2023
786632a
fix min_up_down_params permissive
dguittet Sep 18, 2023
60ea590
use curl for macosx
dguittet Sep 18, 2023
7e31e70
fix curl cmd
dguittet Sep 18, 2023
efcc7e6
update shared/CMakeLists for XPRESS
dguittet Sep 21, 2023
8c624ba
delete Eigen3 and run all tests
dguittet Sep 21, 2023
b9cf977
Merge branch 'ortools' of https://github.com/NREL/ssc into ortools
dguittet Sep 21, 2023
3505065
USE_XPRESS in CMakeLists
dguittet Sep 21, 2023
7a29650
rename test
dguittet Sep 21, 2023
2c28f80
fix PvYield test
dguittet Sep 21, 2023
63d0a0a
update XPRESS in CMakeLists
dguittet Sep 21, 2023
8d7e946
Merge branch 'ortools' of https://github.com/nrel/ssc into ortools
dguittet Sep 21, 2023
3ab34a2
Merge branch 'develop' into ortools
dguittet Sep 26, 2023
3be8f42
Merge branch 'develop' into ortools
dguittet Oct 10, 2023
f6f9a10
Merge branch 'develop' into ortools
dguittet Oct 10, 2023
f68af28
Merge branch 'develop' into ortools
dguittet Oct 19, 2023
592383e
Merge branch 'develop' into ortools
dguittet Nov 16, 2023
731d913
Merge branch 'develop' into ortools
dguittet Jan 31, 2024
e552c57
run ortools at the end of generic system for testing
dguittet Jan 31, 2024
242ad56
Merge branch 'patch' into ortools
dguittet Apr 3, 2024
6f3cfe3
Merge branch 'develop' into ortools
dguittet Apr 3, 2024
b6c8964
Merge branch 'patch' into ortools
dguittet Apr 22, 2024
20b3f1c
update CMake for Windows
dguittet Apr 26, 2024
1da87c7
https://developercommunity.visualstudio.com/t/error-c2872-byte-ambigu…
dguittet Apr 26, 2024
9e75692
Revert "https://developercommunity.visualstudio.com/t/error-c2872-byt…
dguittet Apr 26, 2024
cd1e8ec
https://developercommunity.visualstudio.com/t/error-c2872-byte-ambigu…
dguittet Apr 26, 2024
2895d03
Merge branch 'c17_std_byte' into ortools
dguittet Apr 26, 2024
0af910e
CI update OR-tools download for mac arm64
dguittet Apr 30, 2024
ceba4c8
Merge branch 'ortools' of https://github.com/nrel/ssc into ortools
dguittet Apr 30, 2024
b97d924
CI update OR-tools download for mac arm64
dguittet Apr 30, 2024
10110a0
Merge branch 'patch' into c17_std_byte
dguittet May 2, 2024
c004673
update CMake and reading OR-tools input file
dguittet May 3, 2024
a52d40c
add mac intel and try windows runner
dguittet May 6, 2024
dbdeabd
windows build
dguittet May 6, 2024
4253ae5
windows ci
dguittet May 6, 2024
900f359
windows ci
dguittet May 6, 2024
b044226
windows ci
dguittet May 6, 2024
f4452dc
windows ci
dguittet May 6, 2024
ce50f0b
windows ci
dguittet May 6, 2024
3060a2e
windows ci
dguittet May 6, 2024
f266b91
windows ci
dguittet May 6, 2024
e66bcfa
windows ci
dguittet May 6, 2024
255f215
windows ci
dguittet May 6, 2024
fd91767
windows ci
dguittet May 6, 2024
b243ced
Update ci.yml
dguittet May 6, 2024
46214d9
Update ci.yml
dguittet May 6, 2024
68938c0
Merge branch 'ortools' of https://github.com/NREL/ssc into ortools
dguittet May 6, 2024
4758077
Update ci.yml
dguittet May 6, 2024
91f7e63
Merge branch 'ortools' into c17_std_byte
dguittet May 6, 2024
39ef963
Revert "Merge branch 'ortools' into c17_std_byte"
dguittet May 6, 2024
210512c
Merge branch 'c17_std_byte' into ortools
dguittet May 6, 2024
b5535d9
Update ci.yml
dguittet May 6, 2024
1f807e7
Merge branch 'c17_std_byte' into ortools
dguittet May 6, 2024
68ee2a5
Update ci.yml
dguittet May 7, 2024
372f954
Update ci.yml
dguittet May 7, 2024
b7a7e30
Update ci.yml
dguittet May 7, 2024
cb33476
Update ci.yml
dguittet May 7, 2024
420b10a
Update ci.yml
dguittet May 7, 2024
5e65487
Update ci.yml
dguittet May 7, 2024
4da9e5b
Update ci.yml
dguittet May 7, 2024
58780bb
Update ci.yml
dguittet May 7, 2024
edaf4b3
Update ci.yml
dguittet May 7, 2024
6bfbf88
Update ci.yml
dguittet May 7, 2024
851b1da
Update ci.yml
dguittet May 7, 2024
e29a0a0
Update ci.yml
dguittet May 7, 2024
07a98bd
Update ci.yml
dguittet May 7, 2024
ee3e396
Update ci.yml
dguittet May 7, 2024
4e785ad
Update ci.yml
dguittet May 8, 2024
f320c7a
fix deprecation warnings in ci.yml
dguittet May 8, 2024
22743a2
Merge branch 'ci_runners' of https://github.com/nrel/ssc into ci_runners
dguittet May 8, 2024
c056e08
Update ci.yml
dguittet May 8, 2024
c2121ed
Update ci.yml
dguittet May 8, 2024
34b68fa
Update ci.yml
dguittet May 8, 2024
6666f82
python avail check for windbosse
dguittet May 8, 2024
8613649
update test
dguittet May 9, 2024
1669ffb
update versions
dguittet May 23, 2024
9967f3e
reorder
dguittet May 29, 2024
22029e8
find_package ZLIB
dguittet May 29, 2024
fd4eec4
Merge branch 'patch' into ortools
dguittet May 29, 2024
08729a4
add GTEST caching and update CMake Windows
dguittet May 30, 2024
1d37c43
update or-tools ci
dguittet May 30, 2024
10c42f1
Merge branch 'ci_runners' into ortools
dguittet May 30, 2024
036a374
or-tools windows
dguittet May 30, 2024
9f9b591
fix or-tools tar
dguittet May 30, 2024
99f6010
fix dir
dguittet May 30, 2024
1f85737
fix dirs
dguittet May 30, 2024
a5a2a8d
build or-tools windows
dguittet Jun 3, 2024
44d1577
fix ZLIB
dguittet Jun 3, 2024
f948a37
stable or-tools
dguittet Jun 4, 2024
716020b
add temp dirs
dguittet Jun 7, 2024
d312aad
update input path
dguittet Jun 7, 2024
dcba0c6
add find_package for SCIP
dguittet Jun 10, 2024
5a3a943
Merge branch 'patch' into ortools
dguittet Jun 11, 2024
31a8712
Merge branch 'develop' into ortools
dguittet Jun 11, 2024
9415614
fix windows ci
dguittet Jun 13, 2024
d797abd
windows ci
dguittet Jun 13, 2024
ed67637
fix paths
dguittet Jun 13, 2024
4a0c85d
fit paths
dguittet Jun 13, 2024
f0660dd
fix env
dguittet Jun 13, 2024
b1e96d9
fix paths
dguittet Jun 13, 2024
871191f
add windows tests back
dguittet Jun 13, 2024
fd46f0e
windows ci
dguittet Jun 13, 2024
c5d9ca8
windows download
dguittet Jun 13, 2024
61698d0
fix paths
dguittet Jun 13, 2024
d44f6f9
test
dguittet Jun 13, 2024
8fe6957
only build release
dguittet Jun 13, 2024
bc9f728
fix debug
dguittet Jun 13, 2024
6939622
cmake windows
dguittet Jun 13, 2024
8f65427
build with msbuild
dguittet Jun 13, 2024
6186731
fix syntax
dguittet Jun 13, 2024
76a3877
ps
dguittet Jun 13, 2024
eba49e8
ps paths
dguittet Jun 13, 2024
4b11fb2
bash
dguittet Jun 13, 2024
f7dd17d
c++ 20
dguittet Jun 13, 2024
1bfcc98
building
dguittet Jun 13, 2024
0a4e444
set_outputfile C2664
dguittet Jun 13, 2024
e3ce147
lpsolve
dguittet Jun 13, 2024
0457ffc
lpsolve
dguittet Jun 13, 2024
3b2b9ee
build test
dguittet Jun 13, 2024
d3b1b31
fix
dguittet Jun 13, 2024
b737922
fix
dguittet Jun 13, 2024
e0f84e5
x64 for windows
dguittet Jun 13, 2024
fe4a1aa
change imports
dguittet Jun 13, 2024
1b45f14
refactor windows CMake
dguittet Jun 14, 2024
5be4b2f
reorder library link
dguittet Jun 14, 2024
d6c5933
add Eigen
dguittet Jun 14, 2024
86ae0cb
use OR-Tools 9.10
dguittet Jun 14, 2024
145523c
try again
dguittet Jun 14, 2024
d418e68
windows-latest
dguittet Jun 14, 2024
36fc18a
add check for SSCDIR
dguittet Jun 14, 2024
4b31a89
or-tools version 9.8
dguittet Jun 17, 2024
3872bea
ORTOOLS_VER
dguittet Jun 18, 2024
fc407ee
fix typo
dguittet Jun 20, 2024
0d48c09
Merge branch 'develop' into ortools
dguittet Jul 31, 2024
6fbc979
adapt lpsolve to c++17
dguittet Jul 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
99 changes: 81 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
GTEST_REF: b85864c64758dec007208e56af933fc3f52044ee
ORTOOLS_VER: "9.8"

jobs:
build-on-ubuntu:
Expand All @@ -27,7 +28,27 @@ jobs:
echo "GTEST=$GTEST" >> $GITHUB_ENV
SSCDIR=$GITHUB_WORKSPACE/ssc
echo "SSCDIR=$SSCDIR" >> $GITHUB_ENV
ORTOOLSDIR=$GITHUB_WORKSPACE/or-tools
echo "ORTOOLSDIR=$ORTOOLSDIR" >> $GITHUB_ENV

- name: Get cached OR-Tools
uses: actions/cache@v4
id: cachedortools
with:
path: ${{env.ORTOOLSDIR}}/
key: ortools-ubuntu

- name: Download OR-Tools
if: steps.cachedortools.outputs.cache-hit != 'true'
run: |
sudo apt update
sudo apt install -y build-essential cmake lsb-release
cd $GITHUB_WORKSPACE
wget -q https://github.com/google/or-tools/releases/download/v${ORTOOLS_VER}/or-tools_amd64_ubuntu-22.04_cpp_v${ORTOOLS_VER}.3296.tar.gz
tar -xvf or-tools_amd64_ubuntu-*
mkdir or-tools
mv or-tools*/* or-tools

- name: Get cached GTest
uses: actions/cache@v4
id: cachedgtest
Expand All @@ -51,7 +72,7 @@ jobs:
cd ${GTEST}/build
cmake -DCMAKE_CXX_FLAGS=-std=c++11 ..
make

- name: Checkout SSC
uses: actions/checkout@v4
with:
Expand All @@ -62,7 +83,7 @@ jobs:
run: |
mkdir ${SSCDIR}/build
cd ${SSCDIR}/build
cmake .. -DCMAKE_BUILD_TYPE=Release -DSAM_SKIP_TOOLS=1
cmake .. -DCMAKE_BUILD_TYPE=Release -DSAM_SKIP_TOOLS=1 -DCMAKE_INSTALL_PREFIX=${ORTOOLSDIR}

- name: Build
# Build your program with the given configuration
Expand All @@ -78,7 +99,7 @@ jobs:
${SSCDIR}/build/test/Test

- name: Upload Artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v2
with:
name: SSC Linux Shared Libraries
path: |
Expand All @@ -105,13 +126,39 @@ jobs:
echo "GTEST=$GTEST" >> $GITHUB_ENV
SSCDIR=$GITHUB_WORKSPACE/ssc
echo "SSCDIR=$SSCDIR" >> $GITHUB_ENV
ORTOOLSDIR=$GITHUB_WORKSPACE/or-tools
echo "ORTOOLSDIR=$ORTOOLSDIR" >> $GITHUB_ENV

- name: Get cached OR-Tools
uses: actions/cache@v4
id: cachedortools
with:
path: ${{env.ORTOOLSDIR}}/
key: ortools-${{ matrix.os }}

- name: download OR-Tools for Arm64
if: ${{ matrix.os == 'macos-latest' && steps.cachedortools.outputs.cache-hit != 'true'}}
run: |
cd $GITHUB_WORKSPACE
curl -LJO https://github.com/google/or-tools/releases/download/v${ORTOOLS_VER}/or-tools_arm64_macOS-14.1_cpp_v${ORTOOLS_VER}.3296.tar.gz
tar -xvf or-tools_arm64*.tar.gz
mkdir or-tools
mv or-tools*/* or-tools
- name: download OR-Tools for Intel
if: ${{ matrix.os == 'macos-14-large' && steps.cachedortools.outputs.cache-hit != 'true'}}
run: |
cd $GITHUB_WORKSPACE
curl -LJO https://github.com/google/or-tools/releases/download/v${ORTOOLS_VER}/or-tools_x86_64_macOS-14.1_cpp_v${ORTOOLS_VER}.3296.tar.gz
tar -xvf or-tools_x86_64*tar.gz
mkdir or-tools
mv or-tools*/* or-tools

- name: Get cached GTest
uses: actions/cache@v4
id: cachedgtest
with:
path: ${{env.GTEST}}/
key: gtest-${{ matrix.os }}
key: ortools-${{ matrix.os }}
- name: Clone Gtest
if: steps.cachedgtest.outputs.cache-hit != 'true'
uses: actions/checkout@v4
Expand Down Expand Up @@ -139,7 +186,7 @@ jobs:
run: |
mkdir ${SSCDIR}/build
cd ${SSCDIR}/build
cmake .. -DCMAKE_BUILD_TYPE=Release -DSAM_SKIP_TOOLS=1 -DSAMAPI_EXPORT=0
cmake .. -DCMAKE_BUILD_TYPE=Release -DSAM_SKIP_TOOLS=1 -DSAMAPI_EXPORT=0 -DCMAKE_INSTALL_PREFIX=${ORTOOLSDIR}

- name: Build
# Build your program with the given configuration
Expand All @@ -152,11 +199,11 @@ jobs:
run: |
set -e
${SSCDIR}/build/test/Test
shell: bash
shell: bash

- name: Upload Artifacts
if: ${{ matrix.os == 'macos-latest' }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v2
with:
name: SSC Mac Arm Shared Libraries
path: |
Expand All @@ -165,15 +212,15 @@ jobs:

- name: Upload Artifacts
if: ${{ matrix.os != 'macos-latest' }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v2
with:
name: SSC Mac Intel Shared Libraries
path: |
${{env.SSCDIR}}/build/ssc/libssc.dylib
${{env.SSCDIR}}/build/ssc/ssc.dylib

build-on-windows:
runs-on: windows-2019
runs-on: windows-latest

steps:
- name: Setup cmake
Expand All @@ -190,7 +237,25 @@ jobs:
echo "GTEST=$GTEST" >> $GITHUB_ENV
SSCDIR=$GITHUB_WORKSPACE/ssc
echo "SSCDIR=$SSCDIR" >> $GITHUB_ENV

ORTOOLSDIR=$GITHUB_WORKSPACE/or-tools/install
echo "ORTOOLSDIR=$ORTOOLSDIR" >> $GITHUB_ENV

- name: Get cached OR-Tools
uses: actions/cache@v4
id: cachedortools
with:
path: ${{env.ORTOOLSDIR}}
key: ortools-windows

- name: Download OR-Tools
if: steps.cachedortools.outputs.cache-hit != 'true'
shell: bash
run: |
cd $GITHUB_WORKSPACE
curl -LJO https://github.com/google/or-tools/releases/download/v${ORTOOLS_VER}/or-tools_x64_VisualStudio2022_cpp_v${ORTOOLS_VER}.3296.zip
unzip or-tools_x64_VisualStudio2022_cpp_* -d or-tools
mv or-tools/or-tools_* $ORTOOLSDIR

- name: Get cached GTest
uses: actions/cache@v4
id: cachedgtest
Expand All @@ -210,7 +275,6 @@ jobs:
if: steps.cachedgtest.outputs.cache-hit != 'true'
shell: bash
run: |
export
mkdir ${GTEST}/build
cd ${GTEST}/build
cmake -Dgtest_force_shared_crt=ON ..
Expand All @@ -221,19 +285,18 @@ jobs:
with:
path: ssc

- name: Configure CMake
- name: Build SSC
shell: bash
# Configure cmake to build ssc tests but not tools
run: |
mkdir ${SSCDIR}/build
cd ${SSCDIR}/build
cmake .. -DSAM_SKIP_TOOLS=1 -DCMAKE_CONFIGURATION_TYPES="Release"
cmake --build . --config Release -j4
# Downloaded OR-Tools has CoinOR enabled
mkdir $SSCDIR/build
cd $SSCDIR/build
cmake .. -DSAM_SKIP_TOOLS=1 -DCMAKE_CONFIGURATION_TYPES="Release" -DCMAKE_SYSTEM_VERSION="10.0" -DCMAKE_GENERATOR_PLATFORM=x64 -DUSE_COINOR=1 -DCMAKE_GENERATOR_PLATFORM=x64 -DUSE_COINOR=1
cmake --build . --config Release -j4 --target Test
cp ssc/Release/* test/Release

- name: Test
shell: bash
# Turn off fast fail for when the landbosse tests write to cerr
run: |
cd ${SSCDIR}/build/test/Release
./Test.exe
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ bld/
build/
cmake-build-debug/
cmake-build-release/
CMakeFiles
CMakeCache.txt
test/Test

# Visual Studio 2015 cache/options directory
Expand Down Expand Up @@ -344,6 +346,7 @@ build_osx/Test
build_linux/Test
build_linux/config.status
linux_test\.txt
build2

nlopt/config.h
nlopt/config.status
Expand All @@ -360,3 +363,5 @@ ssc/ssc\.exp
ssc/sscd\.exp

build_android/lib_oldssc.zip

or-tools
28 changes: 20 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ option(SAM_SKIP_TESTS "Skips building tests" OFF)

option(SAMAPI_EXPORT "Export of ssc binaries to the SAM_api directory; for Unix, compile ssc libraries for SAM_api" ON)

include(CMakeDependentOption)

CMAKE_DEPENDENT_OPTION(BUILD_DEPS "Build OR-Tools dependencies" ON "NOT SKIP_ORTOOLS" OFF)
CMAKE_DEPENDENT_OPTION(USE_COINOR "Use the COIN-OR solver" OFF "NOT SKIP_ORTOOLS" OFF)
CMAKE_DEPENDENT_OPTION(USE_HIGHS "Use the HiGHS solver" OFF "NOT SKIP_ORTOOLS" OFF)
CMAKE_DEPENDENT_OPTION(BUILD_EXAMPLES "Build examples" OFF "NOT SKIP_ORTOOLS" OFF)
CMAKE_DEPENDENT_OPTION(BUILD_SAMPLES "Build samples" OFF "NOT SKIP_ORTOOLS" OFF)
CMAKE_DEPENDENT_OPTION(INSTALL_DOC "Install doc" OFF "NOT SKIP_ORTOOLS" OFF)
CMAKE_DEPENDENT_OPTION(USE_COINOR "Use COINOR solvers" OFF "NOT SKIP_ORTOOLS" OFF)
CMAKE_DEPENDENT_OPTION(USE_XPRESS "Adds support for the XPRESS Solver" OFF "NOT SKIP_ORTOOLS" OFF)


#
# If project isn't system_advisor_model and SAM_SKIP_TOOLS=1,
# environment vars LK_LIB and LKD_LIB can be used to specify where to find those libraries
Expand All @@ -26,10 +38,10 @@ if(APPLE)
endif()

if (UNIX AND NOT CMAKE_C_COMPILER)
set(CMAKE_C_COMPILER gcc)
set(CMAKE_CXX_COMPILER g++)
set(CMAKE_C_COMPILER gcc)
set(CMAKE_CXX_COMPILER g++)
endif()
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 20)

if ( NOT APPLE)
set(CURL_DIR build_resources/libcurl_ssl_x64)
Expand All @@ -45,7 +57,6 @@ Project(sam_simulation_core VERSION 1.0.0)
#####################################################################################################################
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CXX_STANDARD 11)

function(set_no_warnings target)
get_target_property(MAIN_CFLAGS ${target} COMPILE_FLAGS)
Expand Down Expand Up @@ -82,14 +93,15 @@ function(set_default_compile_options target)
set(MAIN_CFLAGS "")
endif()
set(MAIN_CFLAGS "${MAIN_CFLAGS} -D__64BIT__")
set_property(TARGET ${target} PROPERTY CXX_STANDARD 20)
set_property(TARGET ${target} PROPERTY CXX_STANDARD_REQUIRED ON)
if(MSVC)
set(MAIN_CFLAGS "${MAIN_CFLAGS} /bigobj /MP")
set(MAIN_CFLAGS "${MAIN_CFLAGS} /D__WINDOWS__ /D_WINDOWS /D_CRT_SECURE_NO_WARNINGS /DLPWINAPP")
foreach (flag_var CMAKE_C_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG)
set(${flag_var} "${${flag_var}} /D_DEBUG" CACHE STRING "compile flags" FORCE)
endforeach()
else(MSVC)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
if (APPLE)
set(MAIN_CFLAGS "${MAIN_CFLAGS} -fno-common -DWX_PRECOMP -D__MACOSX__")
else()
Expand Down Expand Up @@ -119,7 +131,7 @@ function(set_tools_compile_options target)
if (APPLE)
set(MAIN_CFLAGS "${MAIN_CFLAGS} -D__WXOSX__")
endif()
set(MAIN_CFLAGS "${MAIN_CFLAGS} -Wall -Wno-deprecated -Wno-unknown-pragmas -Wno-overloaded-virtual -fno-common -std=c++11")
set(MAIN_CFLAGS "${MAIN_CFLAGS} -Wall -Wno-deprecated -Wno-unknown-pragmas -Wno-overloaded-virtual -fno-common")
set(MAIN_CFLAGS "${MAIN_CFLAGS} -DLK_USE_WXWIDGETS")
endif(MSVC)
set_target_properties(${target} PROPERTIES COMPILE_FLAGS ${MAIN_CFLAGS})
Expand Down Expand Up @@ -150,9 +162,9 @@ add_subdirectory(tcs)
add_subdirectory(ssc)

if (NOT SAM_SKIP_TOOLS)
add_subdirectory(sdktool)
add_subdirectory(sdktool)
endif()

if (NOT SAM_SKIP_TESTS)
add_subdirectory(test)
add_subdirectory(test)
endif()
2 changes: 2 additions & 0 deletions code_attic/cmod_tcstrough_physical_csp_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#define _HAS_STD_BYTE 0

// Trough CSP - physical model
#include "core.h"
#include "tckernel.h"
Expand Down
2 changes: 2 additions & 0 deletions code_attic/cmod_trough_physical_iph_old.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#define _HAS_STD_BYTE 0

// Trough CSP - physical model
#include "core.h"
//#include "tckernel.h"
Expand Down
12 changes: 6 additions & 6 deletions lpsolve/commonlib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@ int CMP_CALLMODEL compareREAL(const void *current, const void *candidate)
where interchanges are reflected in a caller-initialized integer "tags" list. */
void hpsort(void *attributes, int count, int offset, int recsize, MYBOOL descending, findCompare_func findCompare)
{
register int i, j, k, ir, order;
register char *hold, *base;
int i, j, k, ir, order;
char *hold, *base;
char *save;

if(count < 2)
Expand Down Expand Up @@ -443,8 +443,8 @@ void hpsortex(void *attributes, int count, int offset, int recsize, MYBOOL desce
return;
}
else {
register int i, j, k, ir, order;
register char *hold, *base;
int i, j, k, ir, order;
char *hold, *base;
char *save;
int savetag;

Expand Down Expand Up @@ -528,7 +528,7 @@ void qsortex_swap(void *attributes, int l, int r, int recsize,
int qsortex_sort(void *attributes, int l, int r, int recsize, int sortorder, findCompare_func findCompare,
void *tags, int tagsize, char *save, char *savetag)
{
register int i, j, nmove = 0;
int i, j, nmove = 0;
char *v;

/* Perform the a fast QuickSort */
Expand Down Expand Up @@ -667,7 +667,7 @@ void QS_delete(UNIONTYPE QSORTrec a[], int ipos, int epos)
}
int QS_sort(UNIONTYPE QSORTrec a[], int l, int r, findCompare_func findCompare)
{
register int i, j, nmove = 0;
int i, j, nmove = 0;
UNIONTYPE QSORTrec v;

/* Perform the a fast QuickSort */
Expand Down
6 changes: 3 additions & 3 deletions lpsolve/lp_BFP2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ REAL BFP_CALLMODEL bfp_pivotRHS(lprec *lp, LREAL theta, REAL *pcol)
pcol = lu->pcol;

if(theta != 0) {
register int i, n = lp->rows;
register LREAL roundzero = lp->epsvalue;
register LREAL *rhs = lp->rhs, rhsmax = 0;
int i, n = lp->rows;
LREAL roundzero = lp->epsvalue;
LREAL *rhs = lp->rhs, rhsmax = 0;

for(i = 0; i <= n; i++, rhs++, pcol++) {
(*rhs) -= theta * (*pcol);
Expand Down
Loading
Loading