I know that KDevelop 4 was able to import CMake projects (hand written CMakeLists.txt not generated by KDevelop) ... but now after I installed ubuntu 18.04 it seems this is not possible anymore (the Project > Open/Import Project
dialog simply refuse take CMakeLists.txt
when I click on it )? Or I miss something?
I tried to run cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS
as described here but it refuse with error message:
prokop@s2-041:~/git/SimpleSimulationEngine/cpp/Build$ cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS
Parse error in command line argument: -DCMAKE_EXPORT_COMPILE_COMMANDS
Should be: VAR:type=value
CMake Error: No cmake script provided.
CMake Error: Problem processing arguments. Aborting.
EDIT
OK, so according to the advice below I run
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
and now it generate compile_commands.json
but I still cannot open it with KDevelope ... the Import Project dialog still shows everything gray and inactive (see screenshots below). Not sure if it matters that I run KDevelop under xubuntu 18.04 LTS
(not Kubuntu) and Gnome-Flashback Desktop environment
.