Skip to content

Commit

Permalink
Fix error when building static library (#599)
Browse files Browse the repository at this point in the history
  • Loading branch information
OPerepadia authored Jun 28, 2023
1 parent 208259c commit dd7c7f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ else()
add_definitions(-Wpedantic)
endif()

#set(CMAKE_POSITION_INDEPENDENT_CODE ON)

#---- project configuration ----
option(BTCPP_SHARED_LIBS "Build shared libraries" ON)
option(BTCPP_BUILD_TOOLS "Build commandline tools" ON)
Expand Down Expand Up @@ -154,6 +152,7 @@ if (BTCPP_SHARED_LIBS)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
add_library(${BTCPP_LIBRARY} SHARED ${BT_SOURCE})
else()
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_library(${BTCPP_LIBRARY} STATIC ${BT_SOURCE})
endif()

Expand Down
2 changes: 1 addition & 1 deletion include/behaviortree_cpp/scripting/operators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct ExprBase
virtual Any evaluate(Environment& env) const = 0;
};

std::string ErrorNotInit(const char* side, const char* op_str)
inline std::string ErrorNotInit(const char* side, const char* op_str)
{
return StrCat("The ", side, " operand of the operator [", op_str,
"] is not initialized");
Expand Down

0 comments on commit dd7c7f2

Please sign in to comment.