@@ -8,32 +8,31 @@ name = "features_with_dependency"
8
8
source-dir = " app"
9
9
main = " main.f90"
10
10
11
- # Enable cpp preprocessing on the main program
12
- [preprocess .cpp ]
13
-
14
11
[dependencies ]
15
12
# Base dependencies (none for this demo - features will add them)
16
13
17
14
[features ]
18
15
# Feature that enables debug mode in the dependency
19
16
with_feat_debug.dependencies.features_demo = { path = " ../features_demo" , features = [" debug" ] }
20
- with_feat_debug.preprocess.cpp.macros = " WITH_DEBUG_DEPENDENCY"
17
+ with_feat_debug.preprocess.cpp.macros = [ " WITH_DEMO " , " WITH_DEBUG_DEPENDENCY" ]
21
18
22
19
# Feature that enables release mode in the dependency
23
20
with_feat_release.dependencies.features_demo = { path = " ../features_demo" , features = [" release" ] }
24
- with_feat_release.preprocess.cpp.macros = " WITH_RELEASE_DEPENDENCY"
21
+ with_feat_release.preprocess.cpp.macros = [ " WITH_DEMO " , " WITH_RELEASE_DEPENDENCY" ]
25
22
26
23
# Feature that enables multiple dependency features
27
24
with_feat_multi.dependencies.features_demo = { path = " ../features_demo" , features = [" debug" , " mpi" ] }
28
- with_feat_multi.preprocess.cpp.macros = " WITH_MULTI_DEPENDENCY"
25
+ with_feat_multi.preprocess.cpp.macros = [ " WITH_DEMO " , " WITH_MULTI_DEPENDENCY" ]
29
26
30
27
# Feature for platform-specific dependency features
31
28
linux_specific.linux.dependencies.features_demo = { path = " ../features_demo" , features = [" linux" ] }
32
- linux_specific.preprocess.cpp.macros = " LINUX_FEATURES"
29
+ linux_specific.preprocess.cpp.macros = [ " WITH_DEMO " , " LINUX_FEATURES" ]
33
30
34
31
# Feature combining compiler and dependency features
35
32
gfortran_optimized.gfortran.dependencies.features_demo = { path = " ../features_demo" , features = [" release" , " gfortran" ] }
36
33
gfortran_optimized.gfortran.flags = " -O3 -march=native"
34
+ gfortran_optimized.preprocess.cpp.macros = [" WITH_DEMO" ]
35
+
37
36
38
37
[profiles ]
39
38
debug_dep = [" with_feat_debug" ]
0 commit comments