Skip to content

Commit 48d9edf

Browse files
authored
Merge pull request #855 from os-fpga/build_vpr_latest_init_git
build_vpr_latest: init submodule if it's missing
2 parents f2ff8d5 + 83dcfb9 commit 48d9edf

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ set(IPO_LINK_WARN_SUPRESS_FLAGS " ")
314314
add_custom_target(build_vpr_latest)
315315
add_custom_command(
316316
TARGET build_vpr_latest
317-
COMMAND bash build_vpr_latest.sh
317+
COMMAND bash build_vpr_latest.sh ${PATCH_DIR}/CMAKE_fix/PATCHED_vpr_latest/CMakeLists.txt
318318
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/vpr_latest
319319
)
320320

include/CMAKE_fix/PATCHED_vpr_latest/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,9 @@ endif()
411411

412412
add_subdirectory(libs) #libs/CMakeLists.txt handles adding warnings flags to non-external libraries
413413

414-
if(${WITH_PARMYS})
415-
add_subdirectory(parmys)
416-
endif()
414+
#if(${WITH_PARMYS})
415+
# add_subdirectory(parmys)
416+
#endif()
417417

418418
#Add the various tools
419419
add_compile_options(${WARN_FLAGS}) #Add warn flags for VTR tools

vpr_latest/build_vpr_latest.sh

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,21 @@ export CPU_CORES=${CPU_CORES:="$hw_num_cores"}
1010
printf " CPU_CORES= $CPU_CORES hw_num_cores= $hw_num_cores\n"
1111

1212
vpr_latest_bin_dir="$cur_dir/vtr/build/vpr"
13-
printf "\n vpr_latest_bin_dir= $vpr_latest_bin_dir\n\n"
1413

14+
mkdir -p vtr
15+
pushd vtr
16+
ls -1 Makefile || git submodule update --init --recursive
17+
popd
1518

16-
cd vtr && make -j $CPU_CORES
17-
19+
# copy the patched CMakefile
20+
# include/CMAKE_fix/PATCHED_vpr_latest/CMakeLists.txt
21+
if (( $# > 0 )); then
22+
cp -v $1 vtr
23+
fi
1824

25+
# do make in vtr
26+
echo
27+
cd vtr && make -j $CPU_CORES
1928
vtr_make_status=$?
2029

2130
printf "\n vtr_make_status= $vtr_make_status\n"
@@ -27,6 +36,12 @@ file_status=$?
2736
if (( $file_status == 0 )); then
2837
printf "\ncopying to vpr_latest..\n"
2938
cp -v "$vpr_latest_bin_dir/vpr" "$cur_dir/vpr_latest"
39+
echo "build_vpr_latest SUCCEEDED"
40+
else
41+
echo
42+
echo "build_vpr_latest: vpr binary not found: $vpr_latest_bin_dir/vpr"
43+
echo "build_vpr_latest FAILED"
44+
echo
3045
fi
3146

3247
printf "\n done building vpr_latest in $cur_dir\n\n"

0 commit comments

Comments
 (0)