BIC-MNI / minc-tools

Basic minc-tools from former minc repository
Other
30 stars 25 forks source link

Build fails without bison & flex #27

Open smr99 opened 9 years ago

smr99 commented 9 years ago

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 commented 9 years ago

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 https://github.com/BIC-MNI/minc-tools/issues/27.