CMake add_custom_command not being run
Posted
by Jonathan Sternberg
on Stack Overflow
See other posts from Stack Overflow
or by Jonathan Sternberg
Published on 2010-05-30T00:50:21Z
Indexed on
2010/05/30
0:52 UTC
Read the original article
Hit count: 473
cmake
I'm trying to use add_custom_command to generate a file during the build. The command never seemed to be run, so I made this test file.
cmake_minimum_required( VERSION 2.6 )
add_custom_command(
OUTPUT hello.txt
COMMAND touch hello.txt
DEPENDS hello.txt
)
I tried running:
cmake .
make
And hello.txt was not generated. What have I done wrong?
© Stack Overflow or respective owner