From 8867fb7999e35c6713c46af64becfd1a08146a6a Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 12 Oct 2021 23:21:11 -0400 Subject: interpreter: Make compiler options per-subproject --- docs/markdown/Builtin-options.md | 6 ++++++ docs/markdown/snippets/per-project-compiler-options.md | 9 +++++++++ 2 files changed, 15 insertions(+) create mode 100644 docs/markdown/snippets/per-project-compiler-options.md (limited to 'docs') diff --git a/docs/markdown/Builtin-options.md b/docs/markdown/Builtin-options.md index c8e98dd..a7a6a89 100644 --- a/docs/markdown/Builtin-options.md +++ b/docs/markdown/Builtin-options.md @@ -220,6 +220,12 @@ Since *0.54.0* The `_thread_count` option can be used to control the value passed to `-s PTHREAD_POOL_SIZE` when using emcc. No other c/c++ compiler supports this option. +Since *0.63.0* all compiler options can be set per subproject, see +[here](#specifying-options-per-subproject) for details on how the default value +is inherited from main project. This is useful for example when the main project +requires C++11 but a subproject requires C++14. The `cpp_std` value from +subproject's `default_options` is now respected. + ## Specifying options per machine Since *0.51.0*, some options are specified per machine rather than diff --git a/docs/markdown/snippets/per-project-compiler-options.md b/docs/markdown/snippets/per-project-compiler-options.md new file mode 100644 index 0000000..1ccd9b8 --- /dev/null +++ b/docs/markdown/snippets/per-project-compiler-options.md @@ -0,0 +1,9 @@ +## Compiler options can be set per subproject + +All compiler options can now be set per subproject. See +[here](Build-options.md#specifying-options-per-subproject) for details on how +the default value is inherited from main project. + +This is useful for example when the main project requires C++11 but a subproject +requires C++14. The `cpp_std` value from subproject's `default_options` is now +respected. -- cgit v1.1