If your users use
./configure --prefix=/home/user/opt/
Or for cmake projects
cmake -D CMAKE_INSTALL_PREFIX:PATH=/home/user/opt/ ../source/
This will install the program in that prefix (instead of the default /usr/local/) and your users should then be able to run the program like this:
/home/user/opt/bin/program
If you want them to be able to run the programs by simply using the name (without full path) you need add /home/user/opt/bin
to the path environment variable, edit the users .profile and add the following line:
export PATH=/home/user/opt/bin:$PATH
Note that programs installed in this way will be private to the specific user, but it's a way to do it