I use CLion for developing a C++ program on an Apple Silicon MacBook (M1 MAX CPU more specifically). This program is built with CMake and targeting x86_64 architecture, and I set `CMAKE_OSX_ARCHITECTURES` to `x86_64` so that CLion can compile and debug the project correctly. However, when I use the "Profile` button to profile my program, CLion reported error like "Cannot attach the profiler. Make sure that source application is built for target architecture."
I am not sure how I can use profiler to profile my application in this case. Could anyone shed some light on this? Thanks.
1) M1 MAX CPU
2) macOS 13.0.1
3) Apple Clang 14.0.0
4) CLion 2022.3 release candidate Apple Silicon version (I tried CLion 2022.2.4 Intel version as well, reporting the same error)