Skip to content

Commit

Permalink
Merge pull request #2515 from AlexandreSinger/feature-remove-warnings
Browse files Browse the repository at this point in the history
Fixed a Couple Simple Warnings
  • Loading branch information
vaughnbetz authored Mar 23, 2024
2 parents c1c1e3d + b2697ff commit 23535b0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
19 changes: 11 additions & 8 deletions libs/libvtrutil/cmake/modules/configure_version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
#Figure out the git revision
find_package(Git QUIET)
if(GIT_FOUND)
exec_program(${GIT_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}
ARGS describe --always --long --dirty
OUTPUT_VARIABLE VTR_VCS_REVISION
RETURN_VALUE GIT_DESCRIBE_RETURN_VALUE)
execute_process(COMMAND ${GIT_EXECUTABLE} describe --always --long --dirty
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE VTR_VCS_REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE GIT_DESCRIBE_RETURN_VALUE)

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

#Call again with exclude to get the revision excluding any tags
#(i.e. just the commit ID and dirty flag)
exec_program(${GIT_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}
ARGS describe --always --long --dirty --exclude '*'
OUTPUT_VARIABLE VTR_VCS_REVISION_SHORT
RETURN_VALUE GIT_DESCRIBE_RETURN_VALUE)
execute_process(COMMAND ${GIT_EXECUTABLE} describe --always --long --dirty --exclude '*'
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE VTR_VCS_REVISION_SHORT
OUTPUT_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE GIT_DESCRIBE_RETURN_VALUE)

if(NOT GIT_DESCRIBE_RETURN_VALUE EQUAL 0)
#Git describe failed, usually this means we
#aren't in a git repo -- so don't set a VCS
Expand Down
23 changes: 11 additions & 12 deletions vpr/src/route/router_lookahead_extended_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -604,26 +604,25 @@ float ExtendedMapLookahead::get_expected_cost(
}
}

#ifndef VTR_ENABLE_CAPNPROTO

void ExtendedMapLookahead::read(const std::string& file) {
VPR_THROW(VPR_ERROR_ROUTE, "MapLookahead::read not implemented");
}
void ExtendedMapLookahead::write(const std::string& file) const {
VPR_THROW(VPR_ERROR_ROUTE, "MapLookahead::write not implemented");
}

#else

void ExtendedMapLookahead::read(const std::string& file) {
#ifndef VTR_ENABLE_CAPNPROTO
cost_map_.read(file);

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

this->chan_ipins_delays = util::compute_router_chan_ipin_lookahead();
#else // VTR_ENABLE_CAPNPROTO
(void)file;
VPR_THROW(VPR_ERROR_ROUTE, "MapLookahead::read not implemented");
#endif // VTR_ENABLE_CAPNPROTO
}

void ExtendedMapLookahead::write(const std::string& file) const {
#ifndef VTR_ENABLE_CAPNPROTO
cost_map_.write(file);
#else // VTR_ENABLE_CAPNPROTO
(void)file;
VPR_THROW(VPR_ERROR_ROUTE, "MapLookahead::write not implemented");
#endif // VTR_ENABLE_CAPNPROTO
}

#endif

0 comments on commit 23535b0

Please sign in to comment.