Skip to content

Commit

Permalink
feat(windows): add TEST_API for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyewww committed Feb 5, 2024
1 parent f0d0ac1 commit 8828368
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions paddle/common/flags_native.cc
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,9 @@ T GetFromEnv(const std::string& name, const T& default_val) {
}
}

#define INSTANTIATE_GET_FROM_ENV(type) \
template type GetFromEnv(const std::string& name, const type& default_val)
#define INSTANTIATE_GET_FROM_ENV(type) \
template TEST_API type GetFromEnv(const std::string& name, \
const type& default_val)

INSTANTIATE_GET_FROM_ENV(bool);
INSTANTIATE_GET_FROM_ENV(int32_t);
Expand Down
6 changes: 3 additions & 3 deletions test/cpp/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
if(NOT WITH_GFLAGS)
paddle_test(flags_native_test SRCS flags_native_test.cc)
endif()
# if(NOT WITH_GFLAGS)
# paddle_test(flags_native_test SRCS flags_native_test.cc)
# endif()

add_subdirectory(string)

Expand Down

0 comments on commit 8828368

Please sign in to comment.