[MacPorts] #50271: CMake Portgroup: activate CMAKE_EXPORT_COMPILE_COMMANDS

MacPorts noreply at macports.org
Sat Jan 9 11:33:06 PST 2016


#50271: CMake Portgroup: activate CMAKE_EXPORT_COMPILE_COMMANDS
-------------------------+--------------------------------
 Reporter:  rjvbertin@…  |      Owner:  macports-tickets@…
     Type:  enhancement  |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:  2.3.4
 Keywords:               |       Port:  cmake
-------------------------+--------------------------------
 This is an enhancement suggestion complementary to the one filed under
 ticked #50246 .

 CMake has the option to generate an additional file in the build
 directory, that contains the compile commands.This file is of little
 interest for building a port (it is comparable to the .CC_OPTIONS file)
 but its creation comes at negligible cost.
 It is however of considerable interest when the build directory is used
 with certain IDEs : KDevelop5 uses it to obtain the project contents. When
 absent, it will invoke a default cmake command with just enough arguments
 to interfere with the proper settings determined by the port.

 My suggestion is thus to add `-DCMAKE_EXPORT_COMPILE_COMMANDS=on` to the
 list of cmake arguments, and to add a `touch
 ${build.dir}/compile_commands.json` to the post-configure block that also
 creates the cmake invocation file.

-- 
Ticket URL: <https://trac.macports.org/ticket/50271>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list