Skip to content

Commit 56236a4

Browse files
Merge pull request #51 from dabaez/default_struction
Compiles struction by default
2 parents 3b99f70 + cf0ef88 commit 56236a4

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

compile_withcmake.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ cd ..
2626

2727
mkdir deploy
2828
cp ./mmwis/deploy/mmwis deploy/
29-
cp ./mmwis/deploy/struction deploy/
29+
if [ -f ./mmwis/deploy/struction ]; then
30+
cp ./mmwis/deploy/struction deploy/
31+
fi
3032
cp ./build/redumis deploy/
3133
cp ./build/graphchecker deploy/
3234
cp ./build/sort_adjacencies deploy/

mmwis/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,12 @@ target_include_directories(lib_mmwis PRIVATE ${MMWIS_INCLUDES})
141141

142142
add_dependencies(lib_mmwis libkaffpa)
143143

144-
option(STRUCTION_ENABLE_APPS "enable/disable struction executables")
145-
add_subdirectory(extern/struction EXCLUDE_FROM_ALL)
144+
option(STRUCTION_ENABLE_APPS "enable/disable struction executables" ON)
145+
if(STRUCTION_ENABLE_APPS)
146+
add_subdirectory(extern/struction)
147+
else()
148+
add_subdirectory(extern/struction EXCLUDE_FROM_ALL)
149+
endif()
146150

147151
add_executable(mmwis "app/mmwis.cpp" $<TARGET_OBJECTS:libkaffpa>
148152
$<TARGET_OBJECTS:libmapping>

mmwis/compile.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fi
1919
# compile mmwis and hils
2020

2121
rm -rf deploy
22-
# rm -rf build
22+
rm -rf build
2323
mkdir build
2424
cd build
2525
cmake ../ -DCMAKE_C_COMPILER=$(which gcc) -DCMAKE_CXX_COMPILER=$(which g++) -DCMAKE_BUILD_TYPE=${buildtype}
@@ -28,7 +28,9 @@ cd ..
2828

2929
mkdir deploy
3030
cp ./build/mmwis deploy/mmwis
31-
cp ./build/extern/struction/branch_reduce_convergence deploy/struction
32-
# rm -rf build
31+
if [ -f ./build/extern/struction/branch_reduce_convergence ]; then
32+
cp ./build/extern/struction/branch_reduce_convergence deploy/struction
33+
fi
34+
rm -rf build
3335

3436

0 commit comments

Comments
 (0)