aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ci/run.ps15
-rw-r--r--docs/markdown/Reference-manual.md2
-rw-r--r--docs/markdown/Reference-tables.md2
-rw-r--r--mesonbuild/backend/backends.py18
-rw-r--r--mesonbuild/backend/ninjabackend.py2
-rw-r--r--mesonbuild/backend/vs2010backend.py2
-rw-r--r--mesonbuild/cmake/interpreter.py22
-rw-r--r--mesonbuild/dependencies/dev.py3
-rw-r--r--mesonbuild/optinterpreter.py10
-rw-r--r--test cases/cmake/17 include path order/main.cpp10
-rw-r--r--test cases/cmake/17 include path order/meson.build9
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/CMakeLists.txt34
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/cmMod.cpp11
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incA/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incB/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incC/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incD/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incE/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incF/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incG/cmMod.hpp14
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incH/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incI/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incJ/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incL/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incM/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incN/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incO/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incP/cmMod.hpp4
-rw-r--r--test cases/common/43 options/meson.build4
-rw-r--r--test cases/common/43 options/meson_options.txt5
-rw-r--r--test cases/common/93 selfbuilt custom/checkarg.cpp6
-rw-r--r--test cases/common/93 selfbuilt custom/meson.build11
32 files changed, 199 insertions, 27 deletions
diff --git a/ci/run.ps1 b/ci/run.ps1
index ac5a959..9811feb 100644
--- a/ci/run.ps1
+++ b/ci/run.ps1
@@ -9,6 +9,9 @@ $env:Path = ($env:Path.Split(';') | Where-Object { $_ -notmatch 'mingw|Strawberr
# Rust puts its shared stdlib in a secret place, but it is needed to run tests.
$env:Path += ";$HOME/.rustup/toolchains/stable-x86_64-pc-windows-msvc/bin"
+# Set the CI env var for the meson test framework
+$env:CI = '1'
+
# download and install prerequisites
function DownloadFile([String] $Source, [String] $Destination) {
$retries = 10
@@ -32,7 +35,7 @@ function DownloadFile([String] $Source, [String] $Destination) {
if ($env:backend -eq 'ninja') { $dmd = $true } else { $dmd = $false }
-DownloadFile -Source https://github.com/mesonbuild/cidata/releases/download/ci1/ci_data.zip -Destination $env:AGENT_WORKFOLDER\ci_data.zip
+DownloadFile -Source https://github.com/mesonbuild/cidata/releases/download/ci2/ci_data.zip -Destination $env:AGENT_WORKFOLDER\ci_data.zip
echo "Extracting ci_data.zip"
Expand-Archive $env:AGENT_WORKFOLDER\ci_data.zip -DestinationPath $env:AGENT_WORKFOLDER\ci_data
& "$env:AGENT_WORKFOLDER\ci_data\install.ps1" -Arch $env:arch -Compiler $env:compiler -Boost $true -DMD $dmd
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index b3792e7..5156b5b 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -1076,7 +1076,7 @@ The following keyword arguments are supported:
- `install_mode`: the file mode in symbolic format and optionally
the owner/uid and group/gid for the installed files. *(Added 0.47.0)*
- `strip_directory`: install directory contents. `strip_directory=false` by default.
- If `strip_directory=false` only last component of source path is used.
+ If `strip_directory=true` only the last component of the source path is used.
Since 0.45.0
For a given directory `foo`:
diff --git a/docs/markdown/Reference-tables.md b/docs/markdown/Reference-tables.md
index f8d690c..dfae339 100644
--- a/docs/markdown/Reference-tables.md
+++ b/docs/markdown/Reference-tables.md
@@ -266,7 +266,7 @@ These are the values that can be passed to `dependency` function's
## Compiler and Linker selection variables
| Language | Compiler | Linker | Note |
-|:-------------:|----------|-----------|---------------------------------------------|
+|---------------|----------|-----------|---------------------------------------------|
| C | CC | CC_LD | |
| C++ | CXX | CXX_LD | |
| D | DC | DC_LD | Before 0.54 D_LD* |
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 687b122..afd8487 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -817,9 +817,9 @@ class Backend:
if delta > 0.001:
raise MesonException('Clock skew detected. File {} has a time stamp {:.4f}s in the future.'.format(absf, delta))
- def exe_object_to_cmd_array(self, exe):
- if isinstance(exe, build.BuildTarget):
- if exe.for_machine is not MachineChoice.BUILD:
+ def build_target_to_cmd_array(self, bt):
+ if isinstance(bt, build.BuildTarget):
+ if isinstance(bt, build.Executable) and bt.for_machine is not MachineChoice.BUILD:
if (self.environment.is_cross_build() and
self.environment.exe_wrapper is None and
self.environment.need_exe_wrapper()):
@@ -827,12 +827,12 @@ class Backend:
Cannot use target {} as a generator because it is built for the
host machine and no exe wrapper is defined or needs_exe_wrapper is
true. You might want to set `native: true` instead to build it for
- the build machine.'''.format(exe.name))
+ the build machine.'''.format(bt.name))
raise MesonException(s)
- exe_arr = [os.path.join(self.environment.get_build_dir(), self.get_target_filename(exe))]
+ arr = [os.path.join(self.environment.get_build_dir(), self.get_target_filename(bt))]
else:
- exe_arr = exe.get_command()
- return exe_arr
+ arr = bt.get_command()
+ return arr
def replace_extra_args(self, args, genlist):
final_args = []
@@ -960,8 +960,8 @@ class Backend:
# Evaluate the command list
cmd = []
for i in target.command:
- if isinstance(i, build.Executable):
- cmd += self.exe_object_to_cmd_array(i)
+ if isinstance(i, build.BuildTarget):
+ cmd += self.build_target_to_cmd_array(i)
continue
elif isinstance(i, build.CustomTarget):
# GIR scanner will attempt to execute this binary but
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 13b7bc6..03ccd19 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -1771,7 +1771,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
generator = genlist.get_generator()
subdir = genlist.subdir
exe = generator.get_exe()
- exe_arr = self.exe_object_to_cmd_array(exe)
+ exe_arr = self.build_target_to_cmd_array(exe)
infilelist = genlist.get_inputs()
outfilelist = genlist.get_outputs()
extra_dependencies = self.get_custom_target_depend_files(genlist)
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index f0f8502..9a7ebf2 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -119,7 +119,7 @@ class Vs2010Backend(backends.Backend):
infilelist = genlist.get_inputs()
outfilelist = genlist.get_outputs()
source_dir = os.path.join(down, self.build_to_src, genlist.subdir)
- exe_arr = self.exe_object_to_cmd_array(exe)
+ exe_arr = self.build_target_to_cmd_array(exe)
idgroup = ET.SubElement(parent_node, 'ItemGroup')
for i in range(len(infilelist)):
if len(infilelist) == len(outfilelist):
diff --git a/mesonbuild/cmake/interpreter.py b/mesonbuild/cmake/interpreter.py
index 2e33be6..f2f635c 100644
--- a/mesonbuild/cmake/interpreter.py
+++ b/mesonbuild/cmake/interpreter.py
@@ -22,7 +22,7 @@ from .executor import CMakeExecutor
from .traceparser import CMakeTraceParser, CMakeGeneratorTarget
from .. import mlog
from ..environment import Environment
-from ..mesonlib import MachineChoice, version_compare
+from ..mesonlib import MachineChoice, OrderedSet, version_compare
from ..compilers.compilers import lang_suffixes, header_suffixes, obj_suffixes, lib_suffixes, is_header
from enum import Enum
from functools import lru_cache
@@ -441,8 +441,8 @@ class ConverterTarget:
return x
build_dir_rel = os.path.relpath(self.build_dir, os.path.join(self.env.get_build_dir(), subdir))
- self.includes = list(set([rel_path(x, True, False) for x in set(self.includes)] + [build_dir_rel]))
- self.sys_includes = list(set([rel_path(x, True, False) for x in set(self.sys_includes)]))
+ self.includes = list(OrderedSet([rel_path(x, True, False) for x in OrderedSet(self.includes)] + [build_dir_rel]))
+ self.sys_includes = list(OrderedSet([rel_path(x, True, False) for x in OrderedSet(self.sys_includes)]))
self.sources = [rel_path(x, False, False) for x in self.sources]
self.generated = [rel_path(x, False, True) for x in self.generated]
@@ -507,7 +507,7 @@ class ConverterTarget:
self._append_objlib_sources(i)
else:
self.includes += i.includes
- self.includes = list(set(self.includes))
+ self.includes = list(OrderedSet(self.includes))
self.object_libs += [i]
break
@@ -518,9 +518,9 @@ class ConverterTarget:
self.includes += tgt.includes
self.sources += tgt.sources
self.generated += tgt.generated
- self.sources = list(set(self.sources))
- self.generated = list(set(self.generated))
- self.includes = list(set(self.includes))
+ self.sources = list(OrderedSet(self.sources))
+ self.generated = list(OrderedSet(self.generated))
+ self.includes = list(OrderedSet(self.includes))
# Inherit compiler arguments since they may be required for building
for lang, opts in tgt.compile_opts.items():
@@ -546,7 +546,7 @@ class ConverterTarget:
to_process += [x for x in i.depends if x not in processed]
else:
new_deps += [i]
- self.depends = list(set(new_deps))
+ self.depends = list(OrderedSet(new_deps))
def cleanup_dependencies(self):
# Clear the dependencies from targets that where moved from
@@ -720,7 +720,7 @@ class ConverterCustomTarget:
to_process += [x for x in i.depends if x not in processed]
else:
new_deps += [i]
- self.depends = list(set(new_deps))
+ self.depends = list(OrderedSet(new_deps))
def get_ref(self, fname: str) -> T.Optional[CustomTargetReference]:
fname = os.path.basename(fname)
@@ -863,7 +863,7 @@ class CMakeInterpreter:
cmake_files = self.fileapi.get_cmake_sources()
self.bs_files = [x.file for x in cmake_files if not x.is_cmake and not x.is_temp]
self.bs_files = [os.path.relpath(x, self.env.get_source_dir()) for x in self.bs_files]
- self.bs_files = list(set(self.bs_files))
+ self.bs_files = list(OrderedSet(self.bs_files))
# Load the codemodel configurations
self.codemodel_configs = self.fileapi.get_cmake_configurations()
@@ -888,7 +888,7 @@ class CMakeInterpreter:
src_dir = bs_reply.src_dir
self.bs_files = [x.file for x in bs_reply.build_files if not x.is_cmake and not x.is_temp]
self.bs_files = [os.path.relpath(os.path.join(src_dir, x), self.env.get_source_dir()) for x in self.bs_files]
- self.bs_files = list(set(self.bs_files))
+ self.bs_files = list(OrderedSet(self.bs_files))
self.codemodel_configs = cm_reply.configs
def analyse(self) -> None:
diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py
index b6ac331..67d7e65 100644
--- a/mesonbuild/dependencies/dev.py
+++ b/mesonbuild/dependencies/dev.py
@@ -406,6 +406,9 @@ class LLVMDependencyCMake(CMakeDependency):
# Extract extra include directories and definitions
inc_dirs = self.traceparser.get_cmake_var('PACKAGE_INCLUDE_DIRS')
defs = self.traceparser.get_cmake_var('PACKAGE_DEFINITIONS')
+ # LLVM explicitly uses space-separated variables rather than semicolon lists
+ if len(defs) == 1:
+ defs = defs[0].split(' ')
temp = ['-I' + x for x in inc_dirs] + defs
self.compile_args += [x for x in temp if x not in self.compile_args]
if not self._add_sub_dependency(threads_factory(env, self.for_machine, {})):
diff --git a/mesonbuild/optinterpreter.py b/mesonbuild/optinterpreter.py
index 2695a26..c13cc5d 100644
--- a/mesonbuild/optinterpreter.py
+++ b/mesonbuild/optinterpreter.py
@@ -166,6 +166,16 @@ class OptionInterpreter:
return arg.value
elif isinstance(arg, mparser.ArrayNode):
return [self.reduce_single(curarg) for curarg in arg.args.arguments]
+ elif isinstance(arg, mparser.UMinusNode):
+ res = self.reduce_single(arg.value)
+ if not isinstance(res, (int, float)):
+ raise OptionException('Token after "-" is not a number')
+ return -res
+ elif isinstance(arg, mparser.NotNode):
+ res = self.reduce_single(arg.value)
+ if not isinstance(res, bool):
+ raise OptionException('Token after "not" is not a a boolean')
+ return not res
else:
raise OptionException('Arguments may only be string, int, bool, or array of those.')
diff --git a/test cases/cmake/17 include path order/main.cpp b/test cases/cmake/17 include path order/main.cpp
new file mode 100644
index 0000000..9507961
--- /dev/null
+++ b/test cases/cmake/17 include path order/main.cpp
@@ -0,0 +1,10 @@
+#include <iostream>
+#include <cmMod.hpp>
+
+using namespace std;
+
+int main(void) {
+ cmModClass obj("Hello");
+ cout << obj.getStr() << endl;
+ return 0;
+}
diff --git a/test cases/cmake/17 include path order/meson.build b/test cases/cmake/17 include path order/meson.build
new file mode 100644
index 0000000..cf3ec96
--- /dev/null
+++ b/test cases/cmake/17 include path order/meson.build
@@ -0,0 +1,9 @@
+project('include_path_order', ['c', 'cpp'])
+
+cm = import('cmake')
+
+sub_pro = cm.subproject('cmMod')
+sub_dep = sub_pro.dependency('cmModLib++')
+
+exe1 = executable('main', ['main.cpp'], dependencies: [sub_dep])
+test('test1', exe1)
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/CMakeLists.txt b/test cases/cmake/17 include path order/subprojects/cmMod/CMakeLists.txt
new file mode 100644
index 0000000..9a252df
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/CMakeLists.txt
@@ -0,0 +1,34 @@
+cmake_minimum_required(VERSION 3.5)
+
+project(cmMod)
+set (CMAKE_CXX_STANDARD 14)
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+
+ # The one and only correct include dir
+ ${CMAKE_CURRENT_SOURCE_DIR}/incG
+
+ # All of these are traps
+ ${CMAKE_CURRENT_SOURCE_DIR}/incL
+ ${CMAKE_CURRENT_SOURCE_DIR}/incM
+ ${CMAKE_CURRENT_SOURCE_DIR}/incO
+ ${CMAKE_CURRENT_SOURCE_DIR}/incF
+ ${CMAKE_CURRENT_SOURCE_DIR}/incI
+ ${CMAKE_CURRENT_SOURCE_DIR}/incE
+ ${CMAKE_CURRENT_SOURCE_DIR}/incD
+ ${CMAKE_CURRENT_SOURCE_DIR}/incH
+ ${CMAKE_CURRENT_SOURCE_DIR}/incN
+ ${CMAKE_CURRENT_SOURCE_DIR}/incA
+ ${CMAKE_CURRENT_SOURCE_DIR}/incB
+ ${CMAKE_CURRENT_SOURCE_DIR}/incJ
+ ${CMAKE_CURRENT_SOURCE_DIR}/incP
+ ${CMAKE_CURRENT_SOURCE_DIR}/incC
+ ${CMAKE_CURRENT_SOURCE_DIR}/incK
+)
+
+add_definitions("-DDO_NOTHING_JUST_A_FLAG=1")
+
+add_library(cmModLib++ SHARED cmMod.cpp)
+include(GenerateExportHeader)
+generate_export_header(cmModLib++)
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/cmMod.cpp b/test cases/cmake/17 include path order/subprojects/cmMod/cmMod.cpp
new file mode 100644
index 0000000..d3141d5
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/cmMod.cpp
@@ -0,0 +1,11 @@
+#include "cmMod.hpp"
+
+using namespace std;
+
+cmModClass::cmModClass(string foo) {
+ str = foo + " World";
+}
+
+string cmModClass::getStr() const {
+ return str;
+}
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incA/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incA/cmMod.hpp
new file mode 100644
index 0000000..6228a31
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incA/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (A)
+#pragma once
+
+#error "cmMod.hpp in incA must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incB/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incB/cmMod.hpp
new file mode 100644
index 0000000..60bf14c
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incB/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (B)
+#pragma once
+
+#error "cmMod.hpp in incB must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incC/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incC/cmMod.hpp
new file mode 100644
index 0000000..3229e07
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incC/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (C)
+#pragma once
+
+#error "cmMod.hpp in incC must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incD/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incD/cmMod.hpp
new file mode 100644
index 0000000..b958093
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incD/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (D)
+#pragma once
+
+#error "cmMod.hpp in incD must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incE/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incE/cmMod.hpp
new file mode 100644
index 0000000..aea5b6d
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incE/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (E)
+#pragma once
+
+#error "cmMod.hpp in incE must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incF/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incF/cmMod.hpp
new file mode 100644
index 0000000..1e1e2cb
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incF/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (F)
+#pragma once
+
+#error "cmMod.hpp in incF must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incG/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incG/cmMod.hpp
new file mode 100644
index 0000000..0e6dc04
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incG/cmMod.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include "cmmodlib++_export.h"
+#include <string>
+
+class CMMODLIB___EXPORT cmModClass {
+private:
+ std::string str;
+
+public:
+ cmModClass(std::string foo);
+
+ std::string getStr() const;
+};
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incH/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incH/cmMod.hpp
new file mode 100644
index 0000000..263e701
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incH/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (H)
+#pragma once
+
+#error "cmMod.hpp in incH must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incI/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incI/cmMod.hpp
new file mode 100644
index 0000000..a44a89a
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incI/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (I)
+#pragma once
+
+#error "cmMod.hpp in incI must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incJ/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incJ/cmMod.hpp
new file mode 100644
index 0000000..118a809
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incJ/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (J)
+#pragma once
+
+#error "cmMod.hpp in incJ must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incL/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incL/cmMod.hpp
new file mode 100644
index 0000000..8294104
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incL/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (L)
+#pragma once
+
+#error "cmMod.hpp in incL must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incM/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incM/cmMod.hpp
new file mode 100644
index 0000000..031c5e9
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incM/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (M)
+#pragma once
+
+#error "cmMod.hpp in incM must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incN/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incN/cmMod.hpp
new file mode 100644
index 0000000..9dba6da
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incN/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (N)
+#pragma once
+
+#error "cmMod.hpp in incN must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incO/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incO/cmMod.hpp
new file mode 100644
index 0000000..233add9
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incO/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (O)
+#pragma once
+
+#error "cmMod.hpp in incO must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incP/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incP/cmMod.hpp
new file mode 100644
index 0000000..9578745
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incP/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (P)
+#pragma once
+
+#error "cmMod.hpp in incP must not be included"
diff --git a/test cases/common/43 options/meson.build b/test cases/common/43 options/meson.build
index c6cf9c8..08c5cca 100644
--- a/test cases/common/43 options/meson.build
+++ b/test cases/common/43 options/meson.build
@@ -30,4 +30,8 @@ if get_option('integer_opt') != 3
error('Incorrect value in integer option.')
endif
+if get_option('neg_int_opt') != -3
+ error('Incorrect value in negative integer option.')
+endif
+
assert(get_option('wrap_mode') == 'default', 'Wrap mode option is broken.')
diff --git a/test cases/common/43 options/meson_options.txt b/test cases/common/43 options/meson_options.txt
index 4e1c8d8..c5986ba 100644
--- a/test cases/common/43 options/meson_options.txt
+++ b/test cases/common/43 options/meson_options.txt
@@ -1,6 +1,7 @@
option('testoption', type : 'string', value : 'optval', description : 'An option to do something')
-option('other_one', type : 'boolean', value : false)
+option('other_one', type : 'boolean', value : not (not (not (not false))))
option('combo_opt', type : 'combo', choices : ['one', 'two', 'combo'], value : 'combo')
option('array_opt', type : 'array', choices : ['one', 'two', 'three'], value : ['one', 'two'])
option('free_array_opt', type : 'array')
-option('integer_opt', type : 'integer', min : 0, max : 5, value : 3)
+option('integer_opt', type : 'integer', min : 0, max : -(-5), value : 3)
+option('neg_int_opt', type : 'integer', min : -5, max : 5, value : -3)
diff --git a/test cases/common/93 selfbuilt custom/checkarg.cpp b/test cases/common/93 selfbuilt custom/checkarg.cpp
new file mode 100644
index 0000000..99092ee
--- /dev/null
+++ b/test cases/common/93 selfbuilt custom/checkarg.cpp
@@ -0,0 +1,6 @@
+#include <cassert>
+
+int main(int argc, char *[]) {
+ assert(argc == 2);
+ return 0;
+}
diff --git a/test cases/common/93 selfbuilt custom/meson.build b/test cases/common/93 selfbuilt custom/meson.build
index e5da27e..fc5d916 100644
--- a/test cases/common/93 selfbuilt custom/meson.build
+++ b/test cases/common/93 selfbuilt custom/meson.build
@@ -14,3 +14,14 @@ hfile = custom_target('datah',
main = executable('mainprog', 'mainprog.cpp', hfile)
test('maintest', main)
+
+lib = library('libtool', 'tool.cpp')
+
+checkarg = executable('checkarg', 'checkarg.cpp')
+
+ctlib = custom_target('ctlib',
+ output : 'ctlib.out',
+ capture : true,
+ command : [checkarg, lib],
+ build_by_default : true,
+)