Skip to content

Commit

Permalink
Allow build to proceed if gtest is missing (#638)
Browse files Browse the repository at this point in the history
* Allow build to proceed if gtest is missing

* Commit changes file
  • Loading branch information
rkday committed May 19, 2023
1 parent 953b2b8 commit 1126a8b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 14 deletions.
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

0 comments on commit 1126a8b

Please sign in to comment.