Sign in
cmake
/
cmake
/
76f08a107b344daff524974868ab30353bd9b255
/
.
/
Tests
/
RunCMake
/
add_custom_command
/
generate-once.cmake
blob: 2a8e8433ebb3ccea02fed49bf9cc4626b9d162a1 [
file
] [
log
] [
blame
]
if
(
$
{
CMAKE_ARGC
}
LESS
4
)
message
(
FATAL_ERROR
"Too few arguments"
)
endif
()
set
(
output
"${CMAKE_ARGV3}"
)
if
(
EXISTS $
{
output
})
message
(
FATAL_ERROR
"${output} already exists"
)
endif
()
file
(
WRITE $
{
output
}
"int main() { return 0; }\n"
)