Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow build to proceed if gtest is missing #638

Merged
merged 2 commits into from
May 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Bugs fixed in 3.7.1
=======================

- Correctly open the control socket
- The SIPp binary can now be built even when the `gtest` checkout is missing
- rtpstream files are now also found next to the scenario. If it is not found there, it will be treated as a relative path as usual.

Features added in 3.7.0
===========================

Expand Down
35 changes: 21 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,20 +124,27 @@ endif(USE_SCTP)
link_directories("/usr/local/lib")
add_executable(sipp ${all_SRCS} "${PROJECT_SOURCE_DIR}/src/sipp.cpp")
target_compile_features(sipp PUBLIC cxx_auto_type cxx_range_for)
add_executable(sipp_unittest EXCLUDE_FROM_ALL
${all_SRCS}
"${PROJECT_SOURCE_DIR}/src/sipp_unittest.cpp"
"${PROJECT_SOURCE_DIR}/gtest/googletest/src/gtest-all.cc"
"${PROJECT_SOURCE_DIR}/gtest/googlemock/src/gmock-all.cc"
)
target_compile_features(sipp_unittest PUBLIC cxx_auto_type cxx_range_for)
target_compile_definitions(sipp_unittest PUBLIC "-DGTEST")
target_include_directories(sipp_unittest SYSTEM PUBLIC
${PROJECT_SOURCE_DIR}/gtest/googletest
${PROJECT_SOURCE_DIR}/gtest/googlemock
${PROJECT_SOURCE_DIR}/gtest/googletest/include
${PROJECT_SOURCE_DIR}/gtest/googlemock/include
)

if(EXISTS ${PROJECT_SOURCE_DIR}/gtest/googletest)
add_executable(sipp_unittest EXCLUDE_FROM_ALL
${all_SRCS}
"${PROJECT_SOURCE_DIR}/src/sipp_unittest.cpp"
"${PROJECT_SOURCE_DIR}/gtest/googletest/src/gtest-all.cc"
"${PROJECT_SOURCE_DIR}/gtest/googlemock/src/gmock-all.cc"
)
target_compile_features(sipp_unittest PUBLIC cxx_auto_type cxx_range_for)
target_compile_definitions(sipp_unittest PUBLIC "-DGTEST")
target_include_directories(sipp_unittest SYSTEM PUBLIC
${PROJECT_SOURCE_DIR}/gtest/googletest
${PROJECT_SOURCE_DIR}/gtest/googlemock
${PROJECT_SOURCE_DIR}/gtest/googletest/include
${PROJECT_SOURCE_DIR}/gtest/googlemock/include
)
else()
add_executable(sipp_unittest EXCLUDE_FROM_ALL
${all_SRCS}
"${PROJECT_SOURCE_DIR}/src/sipp_unittest.cpp")
endif()

# add version
find_package(Git)
Expand Down