Trying to create a swift project in CLion however I keep running into this problem when trying to build the project.
Here's what I get in the console output of the IDE after I have manually written the add_custom_target part that is shown in the official tutorial here
/opt/CLion/bin/cmake/bin/cmake --build /home/korisnik/.CLion2016.2/system/cmake/generated/Test2-ab88a6d4/ab88a6d4/Debug --target Test2 -- -j 4
<unknown>:0: error: cannot open file '/opt/swift-3.0-RELEASE-ubuntu15.10/usr/lib/swift/CoreFoundation/module.modulemap': Permission denied
Can't parse Package.swift manifest file because it contains invalid format. Fix Package.swift file format and try again.
CMakeFiles/Test2.dir/build.make:57: recipe for target 'CMakeFiles/Test2' failed
make: *** [CMakeFiles/Test2] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/Test2.dir/all' failed
make: *** [CMakeFiles/Test2.dir/all] Error 2
CMakeFiles/Makefile2:74: recipe for target 'CMakeFiles/Test2.dir/rule' failed
make: *** [CMakeFiles/Test2.dir/rule] Error 2
Makefile:118: recipe for target 'Test2' failed
make: *** [Test2] Error 2
In case you need to know I am working on Ubuntu 16.04 LTS. If this happens to be what is causing the problem, please let me know if there is any other way I can develop swift.