[CMake] CMAKE_EXPORT_COMPILE_COMMANDS don't work in CMakeLists.txt
Wagner, David
david.wagner at intel.com
Wed Dec 7 05:13:50 EST 2016
On 05/12/2016 12:31, Fabrício Ceolin wrote:
> Hi,
>
> I am trying to put
> set(CMAKE_EXPORT_COMPILE_COMMANDS ,1) inside a toolchain file but the command
> has no effect there. I've tried to put it in CMakeLists.txt too using the
> previosly set and add_definitions(-DCMAKE_EXPORT_COMPILE_COMMANDS=1) without
> success.
"set(CMAKE_EXPORT_COMPILE_COMMANDS 1)" inside the CMakeLists.txt works for me
but note that you have an extra comma before the "1" value. CMake only uses
commas for lists. It probably also works in the toolchain file. I don't see how
using add_definitions() would work because it is only used in the compiler's
command line.
W
--
David Wagner
complex != complicated
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris,
92196 Meudon Cedex, France
Registration Number: 302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
More information about the CMake
mailing list