When I compile my test application in CLion with gcc 6.2, it outputs
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.9' not found
Which is obvious, since I am using gcc 4.8 as system compiler, and gcc 6.2 resides in my home folder, and compiled program is using my system libs.
Obvious solution here is to use LD_PRELOAD
, which is working fine, when I am running my compiled app via console.
The question: What shall I put into CMakeList.txt in CLion, so, when I click "Run" in CLion - my compiled app executes as "LD_PRELOAD=something ./myApp" instead of just "./myApp"