Sign in
fuchsia
/
third_party
/
github.com
/
Kitware
/
CMake
/
60a131efd53060b1f95936a0b6160e3b7af994f3
/
.
/
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"
)