forked from ocaml/dune
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Call the C++ compiler with -std=c++11 when using OCaml >= 5.0 (ocaml#…
…10962) * Call the C++ compiler with -std=c++11 when using OCaml >= 5.0 Signed-off-by: Etienne Marais <dev@maiste.fr>
- Loading branch information
1 parent
e4380ff
commit f19d564
Showing
7 changed files
with
56 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- Call the C++ compiler with `-std=c++11` when using OCaml >= 5.0 | ||
(#10962, @kit-ty-kate) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
open Import | ||
|
||
type phase = | ||
| Compile | ||
| Compile of Ocaml.Version.t | ||
| Link | ||
|
||
(** The detected compiler *) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
-std=c++11 is given on OCaml 5.0 | ||
================================ | ||
|
||
$ cat >dune-project <<EOF | ||
> (lang dune 3.14) | ||
> EOF | ||
|
||
$ cat >dune <<EOF | ||
> ;; will fail if :standard doesn't have -std=c++11 on OCaml >= 5.0 | ||
> (executable | ||
> (name cpp11) | ||
> (foreign_stubs | ||
> (language cxx) | ||
> (names cpp11) | ||
> (flags -std=c++98 :standard))) | ||
> EOF | ||
|
||
$ (dune build ./cpp11.exe 2>/dev/null) && _build/default/cpp11.exe | ||
Hi from C++11 |