You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I'm trying to add Criterion from the latest tag v2.4.1 to my sample CMake based project. Probably I'm doing something similar to what is described in that closed Criterion issue, but I just switched from FetchContent to ExternalProject after looking at the related discussion on CMake discourse from the same person junglie85.
Unfortunately, I get the following stacktrace on making my project:
...
[ 75%] Performing update step for 'Criterion'
[ 75%] No patch step for 'Criterion'
[ 76%] No configure step for 'Criterion'
[ 76%] Performing build step for 'Criterion'
The Meson build system
Version: 0.53.2
Source dir: /home/dstrebkov/cpp_projects/cpp-unit-testing-frameworks-demo/cmake-build/Criterion-src
Build dir: /home/dstrebkov/cpp_projects/cpp-unit-testing-frameworks-demo/cmake-build/Criterion-src/build
Build type: native build
Project name: criterion
Project version: 2.4.1
C compiler for the host machine: cc (gcc 9.4.0 "cc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0")
C linker for the host machine: cc ld.bfd 2.34
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program python3 found: YES (/home/linuxbrew/.linuxbrew/bin/python3)
Program git found: YES (/usr/bin/git)
C++ compiler for the host machine: c++ (gcc 9.4.0 "c++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0")
C++ linker for the host machine: c++ ld.bfd 2.34
Compiler for C supports arguments -Wno-unused-parameter -Wunused-parameter: YES
Compiler for C supports arguments -Wno-unused-value -Wunused-value: YES
Compiler for C supports arguments -fvisibility=hidden: YES
Compiler for C supports arguments -fexceptions: YES
Compiler for C supports arguments /SAFESEH:NO: NO
Compiler for C supports arguments /source-charset:utf-8: NO
Checking for function "clock_gettime" : YES
Checking for function "fopencookie" : YES
Checking for function "funopen" : NO
Checking for function "getcwd" : YES
Checking for function "isatty" : YES
Checking for function "nl_langinfo" : YES
Checking for function "open_memstream" : YES
Checking for function "strtok_r" : YES
Checking for function "strtok_s" : NO
Header <time.h> has symbol "CLOCK_MONOTONIC_RAW" : YES
Checking for function "GetCurrentDirectory" : NO
Checking for function "PathIsRelative" : NO
Has header "synchapi.h" : NO
Program gettext found: YES (/usr/bin/gettext)
Run-time dependency threads found: YES
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Found CMake: /home/dstrebkov/Installations/cmake-3.24.3-linux-x86_64/bin/cmake (3.24.3)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/mesonbuild/mesonmain.py", line 129, in run
return options.run_func(options)
File "/usr/lib/python3/dist-packages/mesonbuild/msetup.py", line 245, in run
app.generate()
File "/usr/lib/python3/dist-packages/mesonbuild/msetup.py", line 159, in generate
self._generate(env)
File "/usr/lib/python3/dist-packages/mesonbuild/msetup.py", line 192, in _generate
intr.run()
File "/usr/lib/python3/dist-packages/mesonbuild/interpreter.py", line 4167, in run
super().run()
File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 412, in run
self.evaluate_codeblock(self.ast, start=1)
File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 436, in evaluate_codeblock
raise e
File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 430, in evaluate_codeblock
self.evaluate_statement(cur)
File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 443, in evaluate_statement
return self.assignment(cur)
File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 1064, in assignment
value = self.evaluate_statement(node.value)
File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 441, in evaluate_statement
return self.function_call(cur)
File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 788, in function_call
return func(node, posargs, kwargs)
File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 285, in wrapped
return f(*wrapped_args, **wrapped_kwargs)
File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 285, in wrapped
return f(*wrapped_args, **wrapped_kwargs)
File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 285, in wrapped
return f(*wrapped_args, **wrapped_kwargs)
[Previous line repeated 2 more times]
File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 155, in wrapped
ret = f(*wrapped_args, **wrapped_kwargs)
File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 174, in wrapped
return f(*wrapped_args, **wrapped_kwargs)
File "/usr/lib/python3/dist-packages/mesonbuild/interpreter.py", line 3236, in func_dependency
d = self.dependency_impl(name, display_name, kwargs)
File "/usr/lib/python3/dist-packages/mesonbuild/interpreter.py", line 3283, in dependency_impl
dep = dependencies.find_external_dependency(name, self.environment, kwargs)
File "/usr/lib/python3/dist-packages/mesonbuild/dependencies/base.py", line 2234, in find_external_dependency
d = c()
File "/usr/lib/python3/dist-packages/mesonbuild/dependencies/base.py", line 1104, in __init__
CMakeDependency.class_cmakeinfo[self.for_machine] = self._get_cmake_info()
File "/usr/lib/python3/dist-packages/mesonbuild/dependencies/base.py", line 1198, in _get_cmake_info
'cmake_root': temp_parser.get_cmake_var('MESON_CMAKE_ROOT')[0],
IndexError: list index out of range
make[2]: *** [factorial_criterion/test/CMakeFiles/Criterion.dir/build.make:89: factorial_criterion/test/Criterion-prefix/src/Criterion-stamp/Criterion-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:1319: factorial_criterion/test/CMakeFiles/Criterion.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
At the same time, if I just cd to the checked out folder Criterion-src in terminal and execute meson build from there, that issue does not appear and the build process proceeds.
Also tried to manually set MESON_CMAKE_ROOT in BUILD_COMMAND to look like that:
... but with no luck - the stacktrace looks the same.
Could you please let me know if I could get it working somehow? Or it would be better for me to switch to some history tag of Criterion that was created before framework's migration to Meson build system?
Thanks a lot!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm trying to add Criterion from the latest tag
v2.4.1
to my sample CMake based project. Probably I'm doing something similar to what is described in that closed Criterion issue, but I just switched fromFetchContent
toExternalProject
after looking at the related discussion on CMake discourse from the same person junglie85.My call to
ExternalProject_Add()
looks like that:Unfortunately, I get the following stacktrace on making my project:
At the same time, if I just
cd
to the checked out folderCriterion-src
in terminal and executemeson build
from there, that issue does not appear and the build process proceeds.Also tried to manually set
MESON_CMAKE_ROOT
inBUILD_COMMAND
to look like that:... but with no luck - the stacktrace looks the same.
Could you please let me know if I could get it working somehow? Or it would be better for me to switch to some history tag of Criterion that was created before framework's migration to Meson build system?
Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions