TedStudley / mc-mini

Simple Stokes+Advection/Diffusion solver.
0 stars 4 forks source link

Update the Build System to use CMake (with Doxygen and GTest support) #6

Closed TedStudley closed 9 years ago

TedStudley commented 9 years ago

Figure out how to port over the CMakeLists.txt from my other project to be used in this codebase. Will likely involve changing the directory structure here slightly.

hlokavarapu commented 9 years ago

On a 64 bit ubuntu machine, the FindEigen3.cmake fails to find my Eigen library which is located at /usr/lib. The error message complains about a missing macro file. My temporary fix was setting the enviroment variable EIGEN3_INCLUDE_DIR and removing the find_package line in CMakeLists.txt (root dir). That worked. As per the testing, I wasn't able to verify that google test was being built. Can you verify this?

TedStudley commented 9 years ago

From what you say about a macro file, it seems as though the actual failure could be happening at FindEigen3.cmake#L33, where CMake attempts to verify the version number in a specific Eigen file. The macro that checks that file is only called if Eigen3 has already been found, so that file really should be present... Can you check to make sure the file exists in your Eigen3 installation, and figure out what the version specified in it is, too?

For testing, you need to run make check after running CMake to build/run the test suite. This will take a little while the first time, since the command will automatically pull down and compile the Google Test library. I think it does this because best practice seems to be for each project to have its own copy of the library for some reason.

hlokavarapu commented 9 years ago

As you suspected, the problem is the missing macro file. My current version of Eigen is 3.2.6. I think we have found a bug that Eigen would be interested to know of.

TedStudley commented 9 years ago

Very weird. How did you originally install Eigen? Maybe there was an error which caused you to miss some files somewhere. I have the same version on my machine, but the Macros.h file is present for me.

I'd suggest grabbing a fresh copy of Eigen from their repository. Since it's header-only, it should be trivial to replace the old version. Just delete the Eigen root directory, then move the newly downloaded Eigen directory into the place where it used to be.

TedStudley commented 9 years ago

Build system replaced in commit edf342e. Closing issue.