Commit 8cfddc687465843205705f62451ec696c4ca16bf
1 parent
d29f3b00
Proper library paths for gtest
Showing
2 changed files
with
2 additions
and
4 deletions
CMakeLists.txt
| @@ -108,7 +108,7 @@ if (tests) | @@ -108,7 +108,7 @@ if (tests) | ||
| 108 | add_executable(test_redox test/test.cpp) | 108 | add_executable(test_redox test/test.cpp) |
| 109 | 109 | ||
| 110 | target_include_directories(test_redox PUBLIC ${GTEST_INCLUDE_DIRS}) | 110 | target_include_directories(test_redox PUBLIC ${GTEST_INCLUDE_DIRS}) |
| 111 | - target_link_libraries(test_redox redox gtest) | 111 | + target_link_libraries(test_redox redox ${GTEST_BOTH_LIBRARIES}) |
| 112 | 112 | ||
| 113 | # So that we can run 'make test' | 113 | # So that we can run 'make test' |
| 114 | add_test(test_redox test_redox) | 114 | add_test(test_redox test_redox) |
| @@ -149,7 +149,7 @@ if (examples) | @@ -149,7 +149,7 @@ if (examples) | ||
| 149 | 149 | ||
| 150 | add_executable(binary_data_publish examples/binary_data_publish.cpp) | 150 | add_executable(binary_data_publish examples/binary_data_publish.cpp) |
| 151 | target_link_libraries(binary_data_publish redox) | 151 | target_link_libraries(binary_data_publish redox) |
| 152 | - | 152 | + |
| 153 | add_executable(pub_sub examples/pub_sub.cpp) | 153 | add_executable(pub_sub examples/pub_sub.cpp) |
| 154 | target_link_libraries(pub_sub redox) | 154 | target_link_libraries(pub_sub redox) |
| 155 | 155 |
make-ci.sh
| @@ -26,7 +26,5 @@ sudo cp -r googletest/googletest/include/gtest /usr/local/include | @@ -26,7 +26,5 @@ sudo cp -r googletest/googletest/include/gtest /usr/local/include | ||
| 26 | # Make redox | 26 | # Make redox |
| 27 | cmake -Dexamples=ON -Dlib=ON -Dstatic_lib=ON -Dtests=ON .. | 27 | cmake -Dexamples=ON -Dlib=ON -Dstatic_lib=ON -Dtests=ON .. |
| 28 | time make VERBOSE=1 | 28 | time make VERBOSE=1 |
| 29 | -ldd ./test_redox | ||
| 30 | -ls -al /usr/local/lib | ||
| 31 | ./test_redox | 29 | ./test_redox |
| 32 | cd .. | 30 | cd .. |