Skip to content

Commit

Permalink
Update build files
Browse files Browse the repository at this point in the history
  • Loading branch information
fontanf committed Apr 12, 2024
1 parent 6b3f0d5 commit 950e762
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
run: |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel
cmake --install build --prefix install
- name: Run unit tests
working-directory: build/test
run: ctest --parallel
Expand All @@ -48,6 +49,7 @@ jobs:
run: |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel
cmake --install build --prefix install
- name: Run tests
run: python3 -u scripts/run_tests.py test_results_ref
- name: Process tests
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ python3 scripts/download_data.py
Solve:

```shell
./build/src/knapsack/KnapsackSolver_knapsack_main --verbosity-level 1 --algorithm dynamic-programming-primal-dual --input data/knapsack/largecoeff/knapPI_2_10000_10000000/knapPI_2_10000_10000000_50.csv --format pisinger
./build/src/knapsack/KnapsackSolver_knapsack --verbosity-level 1 --algorithm dynamic-programming-primal-dual --input data/knapsack/largecoeff/knapPI_2_10000_10000000/knapPI_2_10000_10000000_50.csv --format pisinger
```
```
====================================
Expand Down Expand Up @@ -205,7 +205,7 @@ Feasible: 1
```

```shell
./build/src/subset_sum/KnapsackSolver_subset_sum_main --verbosity-level 1 --input data/subset_sum/pthree/pthree_1000_1 --algorithm dynamic-programming-bellman-word-ram-rec
./build/src/subset_sum/KnapsackSolver_subset_sum --verbosity-level 1 --input data/subset_sum/pthree/pthree_1000_1 --algorithm dynamic-programming-bellman-word-ram-rec
```
```
====================================
Expand Down
14 changes: 6 additions & 8 deletions scripts/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@


knapsack_main = os.path.join(
"build",
"src",
"knapsack",
"KnapsackSolver_knapsack_main")
"install",
"bin",
"KnapsackSolver_knapsack")
knapsack_data = os.environ['KNAPSACK_DATA']


Expand Down Expand Up @@ -53,10 +52,9 @@


subset_sum_main = os.path.join(
"build",
"src",
"subset_sum",
"KnapsackSolver_subset_sum_main")
"install",
"bin",
"KnapsackSolver_subset_sum")
subset_sum_data = os.environ['SUBSET_SUM_DATA']


Expand Down
2 changes: 2 additions & 0 deletions src/knapsack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ target_link_libraries(KnapsackSolver_knapsack_main PUBLIC
KnapsackSolver_knapsack_dynamic_programming_bellman
KnapsackSolver_knapsack_dynamic_programming_primal_dual
Boost::program_options)
set_target_properties(KnapsackSolver_knapsack_main PROPERTIES OUTPUT_NAME "KnapsackSolver_knapsack" )
install(TARGETS KnapsackSolver_knapsack_main DESTINATION bin)

add_library(KnapsackSolver_knapsack_generator)
target_sources(KnapsackSolver_knapsack_generator PRIVATE
Expand Down
2 changes: 2 additions & 0 deletions src/multiple_choice_subset_sum/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ target_sources(KnapsackSolver_multiple_choice_subset_sum_main PRIVATE
target_link_libraries(KnapsackSolver_multiple_choice_subset_sum_main PUBLIC
KnapsackSolver_multiple_choice_subset_sum_dynamic_programming_bellman
Boost::program_options)
set_target_properties(KnapsackSolver_multiple_choice_subset_sum_main PROPERTIES OUTPUT_NAME "KnapsackSolver_multiple_choice_subset_sum" )
install(TARGETS KnapsackSolver_multiple_choice_subset_sum_main DESTINATION bin)
2 changes: 2 additions & 0 deletions src/subset_sum/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ target_link_libraries(KnapsackSolver_subset_sum_main PUBLIC
KnapsackSolver_subset_sum_dynamic_programming_balancing
KnapsackSolver_subset_sum_dynamic_programming_primal_dual
Boost::program_options)
set_target_properties(KnapsackSolver_subset_sum_main PROPERTIES OUTPUT_NAME "KnapsackSolver_subset_sum" )
install(TARGETS KnapsackSolver_subset_sum_main DESTINATION bin)

add_library(KnapsackSolver_subset_sum_generator)
target_sources(KnapsackSolver_subset_sum_generator PRIVATE
Expand Down

0 comments on commit 950e762

Please sign in to comment.