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 for a different unittest path #21

Closed
rombert opened this issue Mar 4, 2014 · 10 comments
Closed

Allow for a different unittest path #21

rombert opened this issue Mar 4, 2014 · 10 comments

Comments

@rombert
Copy link

rombert commented Mar 4, 2014

I've had to make the following change to the Makefile on OpenSUSE 13.1 to convince make-test to run:

diff --git a/Makefile b/Makefile
index 384cfe1..37afa37 100644
--- a/Makefile
+++ b/Makefile
@@ -66,7 +66,7 @@ COPTS:=$(PLATFORM_COPTS) $(CXX_COPTS) $(GLOBAL_COPTS) $(PLATFORM_WARNINGS) \
 # TODO: consider re-adding in production -fno-exceptions

 INCLUDES+=-I /usr/include/i386-linux-gnu/c++/4.8/ -I$(JAVA_HOME)/$(HEADERS) -I$(JAVA_HOME)/$(HEADERS)/$(UNAME) 
-TEST_INCLUDES=$(INCLUDES) -I/usr/include/unittest++
+TEST_INCLUDES=$(INCLUDES) -I/usr/include/unittest-cpp

 # LDFLAGS+=-Wl,--export-dynamic-symbol=Agent_OnLoad
@RichardWarburton
Copy link
Member

Thanks for filing the issue. IIRC using pkgconfig to lookup unittest++ didn't work out so well for me, so is there a particular way you would like to have the include set? Eg: would you want to set an environment variable which overrides the unittest include?

@rombert
Copy link
Author

rombert commented Mar 4, 2014

I have little knowledge of Makefiles and pkgconfig, but a environment variable override sounds fine.

@ceeaspb ceeaspb mentioned this issue Jul 17, 2014
@RichardWarburton RichardWarburton added bug and removed bug labels Jul 18, 2014
@Pyrolistical
Copy link

Same issue on Mac, I hacked the CMakeLists.txt to use my own unittest++

See #1 for more details

@RichardWarburton
Copy link
Member

@rombert can you confirm that the move to cmake has fixed this issue on your distro?

@Pyrolistical what changes did you make to CMakeLists.txt in order to get things to work on a mac?

#1 links to a method for pulling down external source dependencies and building them using cmake - though I've never done this before. This seems like a more general solution.

@Pyrolistical
Copy link

@RichardWarburton I've added my hack to CMakeLists.txt in #1

@rombert
Copy link
Author

rombert commented Nov 25, 2014

@RichardWarburton - for some reason this still does not work.

$ cmake CMakeLists.txt 
-- checking for module 'unittest++'
--   package 'unittest++' not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:341 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPkgConfig.cmake:395 (_pkg_check_modules_internal)
  CMakeLists.txt:33 (pkg_check_modules)


-- using GCC
-- Configuring incomplete, errors occurred!

Is there any way I can help debug this? For the record, the headers live in /usr/include/unittest-cpp and the .a file is in /usr/lib64 .

@RichardWarburton
Copy link
Member

@rombert have you tried deleting CMakeCache.txt and re-running cmake CMakeLists.txt?

@rombert
Copy link
Author

rombert commented Jan 15, 2015

@RichardWarburton - thanks, but that still did not help.

@RichardWarburton
Copy link
Member

@rombert I've added parameters for this for you. For example on ubuntu you would write the following to manually set UnitTest++:

UNITTEST_INCLUDE_DIRS="/usr/include/unittest++/" UNITTEST_LIBRARIES="UnitTest++" cmake CMakeLists.txt

If nothing appears to be different, try cleaning the cache - rm -rf CMakeCache.txt CMakeFiles/

@rombert
Copy link
Author

rombert commented Jan 20, 2015

UNITTEST_INCLUDE_DIRS="/usr/include/unittest-cpp" UNITTEST_LIBRARIES="UnitTest++" cmake CMakeLists.txt 

worked for me, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants