Repository navigation
Closed
Labels
category:bugSomething isn't working
Milestone
Description
Describe the bug
With cmake or make and a semicolon` doesn't understand the error and continues.
test/build on master [!+?] via △ v3.20.5 on ☁️
❯ make all ; echo done
Consolidate compiler generated dependencies of target test.x
[ 50%] Building CXX object CMakeFiles/test.x.dir/test.cpp.o
/tmp/test/test.cpp: In function ‘int main(int, char**)’:
/tmp/test/test.cpp:3:3: error: invalid use of ‘this’ in non-member function
3 | this is an error
| ^~~~
make[2]: *** [CMakeFiles/test.x.dir/build.make:76: CMakeFiles/test.x.dir/test.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/test.x.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
done
How to reproduce
CMakeLists.txt:
project(test LANGUAGES CXX)
cmake_minimum_required(VERSION 3.18)
add_executable(test.x test.cpp)test.cpp
int main(int argc, char *argv[])
{
this is an error
return 0;
}cmake -H. -Bbuild
cmake --build build --target all;echo done
/tmp/test/test.cpp: In function ‘int main(int, char**)’:
/tmp/test/test.cpp:3:3: error: invalid use of ‘this’ in non-member function
3 | this is an error
| ^~~~
gmake[2]: *** [CMakeFiles/test.x.dir/build.make:76: CMakeFiles/test.x.dir/test.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/test.x.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
done
Expected behavior
Shouldn't reach the done
Screenshots
No response
Configuration
❯ version | transpose key value | to md --pretty
| key | value |
|---|---|
| version | 0.65.0 |
| branch | master |
| commit_hash | |
| build_os | linux-x86_64 |
| build_target | x86_64-unknown-linux-gnu |
| rust_version | rustc 1.62.0 (a8314ef7d 2022-06-27) |
| rust_channel | stable-x86_64-unknown-linux-gnu |
| cargo_version | cargo 1.62.0 (a748cf5a3 2022-06-08) |
| pkg_version | 0.65.0 |
| build_time | 2022-07-12 15:42:33 +03:00 |
| build_rust_channel | release |
| features | default, trash, which, zip |
| installed_plugins |
Additional context
No response
Metadata
Metadata
Assignees
Labels
category:bugSomething isn't working
Activity
fdncred commentedon Jul 12, 2022
I've seen this reported a few times. It wouldn't surprise me if there were another issue or 10 like this now.
apmanol commentedon Jul 12, 2022
I did some history research and only related was #1619 or #4139
It's
bashclassic usage&&