Skip to content
Snippets Groups Projects
Commit 95e8bbd6 authored by Radek Hušek's avatar Radek Hušek Committed by Radek Hušek
Browse files

Add REQUIRE construct & new options

Add REQUIRE to define dependencies among compile
time options. Also defines new options USE_TWO_CUTS
and EXPLICIT_NORMAL_EDGES which are unused by now.
parent a27797e1
No related branches found
No related tags found
No related merge requests found
...@@ -5,12 +5,18 @@ BOOL_OPTION(SAVE_MEMORY, 1) ...@@ -5,12 +5,18 @@ BOOL_OPTION(SAVE_MEMORY, 1)
BOOL_OPTION(OPTIMIZED_MAPPINGS, 1) BOOL_OPTION(OPTIMIZED_MAPPINGS, 1)
#ifndef MAX_EDGES
#define MAX_EDGES 48
#endif
BOOL_OPTION(OPTIMIZE_COMBINE, 0) BOOL_OPTION(OPTIMIZE_COMBINE, 0)
BOOL_OPTION(USE_NEXT_FORB, 1) BOOL_OPTION(USE_NEXT_FORB, 1)
#ifndef MAX_EDGES BOOL_OPTION(EXPLICIT_NOMAL_EDGES, 0)
#define MAX_EDGES 48 REQUIRES(EXPLICIT_NORMAL_EDGES, USE_NEXT_FORB)
#endif
BOOL_OPTION(USE_TWO_CUTS, 0)
REQUIRES(USE_TWO_CUTS, USE_NEXT_FORB && EXPLICIT_NOMAL_EDGES)
...@@ -14,6 +14,10 @@ sed -re 's/BOOL_OPTION\((.*), *(.*)\)/#ifndef \1\ ...@@ -14,6 +14,10 @@ sed -re 's/BOOL_OPTION\((.*), *(.*)\)/#ifndef \1\
#else\ #else\
#pragma message "\1 off"\ #pragma message "\1 off"\
#endif\ #endif\
/;
s/REQUIRES\((.*), (.*)\)/#if (\1) \&\& !(\2)\
#error "\1 requires \2"\
#endif\
/' /'
cat <<EOF cat <<EOF
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment