This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
4
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-cflags.t/bin/dune
vendored
Normal file
4
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-cflags.t/bin/dune
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
(env
|
||||
(default
|
||||
(c_flags "in bin")
|
||||
(cxx_flags "in bin")))
|
||||
4
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-cflags.t/dune
vendored
Normal file
4
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-cflags.t/dune
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
(env
|
||||
(default
|
||||
(c_flags ":standard + in .")
|
||||
(cxx_flags ":standard + in .")))
|
||||
1
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-cflags.t/dune-project
vendored
Normal file
1
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-cflags.t/dune-project
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
(lang dune 1.7)
|
||||
26
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-cflags.t/run.t
vendored
Normal file
26
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-cflags.t/run.t
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
$ alias dune_printenv="dune printenv --profile default --field c_flags --field cxx_flags"
|
||||
|
||||
$ dune_printenv .
|
||||
(c_flags (":standard + in ."))
|
||||
(cxx_flags (":standard + in ."))
|
||||
|
||||
$ dune_printenv src
|
||||
(c_flags
|
||||
(":standard + in ." ":standard + in src"))
|
||||
(cxx_flags
|
||||
(":standard + in ." ":standard + in src"))
|
||||
|
||||
$ dune_printenv bin
|
||||
(c_flags ("in bin"))
|
||||
(cxx_flags ("in bin"))
|
||||
|
||||
$ dune_printenv run
|
||||
(c_flags (-DTEST_C))
|
||||
(cxx_flags (-DTEST_CPP))
|
||||
|
||||
$ dune exec --profile default ./run/foo.exe
|
||||
TEST_C defined.
|
||||
|
||||
$ dune exec --profile default ./run/bar.exe
|
||||
TEST_CPP defined.
|
||||
|
||||
11
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-cflags.t/run/bar.cpp
vendored
Normal file
11
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-cflags.t/run/bar.cpp
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char ** argv){
|
||||
#ifdef TEST_CPP
|
||||
printf("TEST_CPP defined.\n");
|
||||
return 0;
|
||||
#else
|
||||
printf("TEST_CPP not defined.\n");
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
15
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-cflags.t/run/dune
vendored
Normal file
15
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-cflags.t/run/dune
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
(env
|
||||
(default
|
||||
(c_flags "-DTEST_C")
|
||||
(cxx_flags "-DTEST_CPP")))
|
||||
|
||||
(rule
|
||||
(targets foo.exe)
|
||||
(deps foo.c)
|
||||
(action (run %{cc} -o %{targets} %{deps})))
|
||||
|
||||
(rule
|
||||
(targets bar.exe)
|
||||
(deps bar.cpp)
|
||||
(action (run %{cxx} -o %{targets} %{deps})))
|
||||
|
||||
11
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-cflags.t/run/foo.c
vendored
Normal file
11
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-cflags.t/run/foo.c
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char ** argv){
|
||||
#ifdef TEST_C
|
||||
printf("TEST_C defined.\n");
|
||||
return 0;
|
||||
#else
|
||||
printf("TEST_C not defined.\n");
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
4
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-cflags.t/src/dune
vendored
Normal file
4
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-cflags.t/src/dune
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
(env
|
||||
(default
|
||||
(c_flags :standard ":standard + in src")
|
||||
(cxx_flags :standard ":standard + in src")))
|
||||
Loading…
Add table
Add a link
Reference in a new issue