Skip to content

Commit 23535b0

Browse files
authored
Merge pull request #2515 from AlexandreSinger/feature-remove-warnings
Fixed a Couple Simple Warnings
2 parents c1c1e3d + b2697ff commit 23535b0

File tree

2 files changed

+22
-20
lines changed

2 files changed

+22
-20
lines changed

libs/libvtrutil/cmake/modules/configure_version.cmake

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
#Figure out the git revision
55
find_package(Git QUIET)
66
if(GIT_FOUND)
7-
exec_program(${GIT_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}
8-
ARGS describe --always --long --dirty
9-
OUTPUT_VARIABLE VTR_VCS_REVISION
10-
RETURN_VALUE GIT_DESCRIBE_RETURN_VALUE)
7+
execute_process(COMMAND ${GIT_EXECUTABLE} describe --always --long --dirty
8+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
9+
OUTPUT_VARIABLE VTR_VCS_REVISION
10+
OUTPUT_STRIP_TRAILING_WHITESPACE
11+
RESULT_VARIABLE GIT_DESCRIBE_RETURN_VALUE)
1112

1213
if(NOT GIT_DESCRIBE_RETURN_VALUE EQUAL 0)
1314
#Git describe failed, usually this means we
@@ -18,10 +19,12 @@ if(GIT_FOUND)
1819

1920
#Call again with exclude to get the revision excluding any tags
2021
#(i.e. just the commit ID and dirty flag)
21-
exec_program(${GIT_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}
22-
ARGS describe --always --long --dirty --exclude '*'
23-
OUTPUT_VARIABLE VTR_VCS_REVISION_SHORT
24-
RETURN_VALUE GIT_DESCRIBE_RETURN_VALUE)
22+
execute_process(COMMAND ${GIT_EXECUTABLE} describe --always --long --dirty --exclude '*'
23+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
24+
OUTPUT_VARIABLE VTR_VCS_REVISION_SHORT
25+
OUTPUT_STRIP_TRAILING_WHITESPACE
26+
RESULT_VARIABLE GIT_DESCRIBE_RETURN_VALUE)
27+
2528
if(NOT GIT_DESCRIBE_RETURN_VALUE EQUAL 0)
2629
#Git describe failed, usually this means we
2730
#aren't in a git repo -- so don't set a VCS

vpr/src/route/router_lookahead_extended_map.cpp

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -604,26 +604,25 @@ float ExtendedMapLookahead::get_expected_cost(
604604
}
605605
}
606606

607-
#ifndef VTR_ENABLE_CAPNPROTO
608-
609-
void ExtendedMapLookahead::read(const std::string& file) {
610-
VPR_THROW(VPR_ERROR_ROUTE, "MapLookahead::read not implemented");
611-
}
612-
void ExtendedMapLookahead::write(const std::string& file) const {
613-
VPR_THROW(VPR_ERROR_ROUTE, "MapLookahead::write not implemented");
614-
}
615-
616-
#else
617-
618607
void ExtendedMapLookahead::read(const std::string& file) {
608+
#ifndef VTR_ENABLE_CAPNPROTO
619609
cost_map_.read(file);
620610

621611
this->src_opin_delays = util::compute_router_src_opin_lookahead(is_flat_);
622612

623613
this->chan_ipins_delays = util::compute_router_chan_ipin_lookahead();
614+
#else // VTR_ENABLE_CAPNPROTO
615+
(void)file;
616+
VPR_THROW(VPR_ERROR_ROUTE, "MapLookahead::read not implemented");
617+
#endif // VTR_ENABLE_CAPNPROTO
624618
}
619+
625620
void ExtendedMapLookahead::write(const std::string& file) const {
621+
#ifndef VTR_ENABLE_CAPNPROTO
626622
cost_map_.write(file);
623+
#else // VTR_ENABLE_CAPNPROTO
624+
(void)file;
625+
VPR_THROW(VPR_ERROR_ROUTE, "MapLookahead::write not implemented");
626+
#endif // VTR_ENABLE_CAPNPROTO
627627
}
628628

629-
#endif

0 commit comments

Comments
 (0)