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

Build fails without bison & flex #27

Open
smr99 opened this issue Sep 13, 2015 · 1 comment
Open

Build fails without bison & flex #27

smr99 opened this issue Sep 13, 2015 · 1 comment

Comments

@smr99
Copy link
Contributor

smr99 commented Sep 13, 2015

If either one is missing, the configure step fails such as this:

-- Looking for include file pwd.h - found
-- Could NOT find BISON (missing: BISON_EXECUTABLE)
-- Found FLEX: /usr/bin/flex (found version "2.5.39")
CMake Error at Testing/CMakeLists.txt:45 (GET_PROPERTY):
get_property could not find TARGET minccalc. Perhaps it has not yet been
created.

The issue is that progs/CMakeLists.txt will simply omit building minccalc if bison or flex is not found. However, Testing/CMakeLists.txt is not so flexible and fails trying to get properties of "minccalc".

So you could make Testing flexible enough to omit testing minccalc if the latter is not built. Alternatively, you could simply require bison/flex and remove the conditional in progs/CMakeLists.

@andrewjanke
Copy link
Member

the logic of the autoconf build was as such:

if flex is found, build the .l and .y targets.

if flex isn't found, use the prebuilt .c versions that were built during
the make dist target but not in the git repository.

can we replicate this behavior with cmake and cpack?

a
On 13/09/2015 11:37 am, "Steven M. Robbins" notifications@github.com
wrote:

If either one is missing, the configure step fails such as this:

-- Looking for include file pwd.h - found
-- Could NOT find BISON (missing: BISON_EXECUTABLE)
-- Found FLEX: /usr/bin/flex (found version "2.5.39")

CMake Error at Testing/CMakeLists.txt:45 (GET_PROPERTY):
get_property could not find TARGET minccalc. Perhaps it has not yet been
created.

The issue is that progs/CMakeLists.txt will simply omit building minccalc
if bison or flex is not found. However, Testing/CMakeLists.txt is not so
flexible and fails trying to get properties of "minccalc".

So you could make Testing flexible enough to omit testing minccalc if the
latter is not built. Alternatively, you could simply require bison/flex and
remove the conditional in progs/CMakeLists.


Reply to this email directly or view it on GitHub
#27.

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

No branches or pull requests

2 participants