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

Found CppAD version '' but at least version '20200000.1' is required #62

Closed
sampotter opened this issue Oct 8, 2020 · 5 comments
Closed
Labels

Comments

@sampotter
Copy link

sampotter commented Oct 8, 2020

Attempting to install CppAD and CppADCodeGen using CMake 3.18.4 on macOS 10.15.6 and running into some issues.

First, I clone the master branch of CppAD, and run:

cd CppAD
mkdir build
cd build
cmake ..
make
sudo make install

Everything runs fine, no issues.

Next, I clone the master branch of CppADCodeGen, and run:

cp CppADCodeGen
mkdir build
cd build
cmake ..

and get the error:

CMake Error at cmake/FindCppAD.cmake:99 (MESSAGE):
  Found CppAD version '' but at least version '20200000.1' is required
Call Stack (most recent call first):
  CMakeLists.txt:42 (FIND_PACKAGE)

Following the instructions here I run grep '^SET(cppad_version' CMakeLists.txt and get:

SET(cppad_version "20200905")

Evidently the version is high enough but it isn't getting pulled in by FindCppAD.cmake.

Let me know if I made some mistake in the above. I would expect this approach to "just work"... Thanks.

@joaoleal
Copy link
Owner

joaoleal commented Oct 9, 2020

Hello,

That version has a different version format since it does not have the X in "YYYYMMDD.X".
CppADCodeGen uses regular expressions to extract the version information from the installed file (CMakeLists.txt is not installed):
/usr/local/include/cppad/configure.hpp

I'll update the regular expressions to be more flexible.

@joaoleal joaoleal added the bug label Oct 9, 2020
@joaoleal
Copy link
Owner

joaoleal commented Oct 9, 2020

Note that this issue would not happen with the CppAD releases since they follow the format "YYYYMMDD.X".

@sampotter
Copy link
Author

Thanks. Makes sense. I figured it was something like this. Please update when you've fixed this issue. I'll try with the releases in the meantime.

@joaoleal
Copy link
Owner

joaoleal commented Oct 9, 2020

It is in master and develop branches.

@sampotter
Copy link
Author

That fixes the problem, thanks.

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

No branches or pull requests

2 participants