I tried this out: file(GENERATE INPUT ${CMAKE_CURRENT_SOURCE_DIR}/script.sh OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/script.sh)
but CMake failed with this error message: "file Incorrect arguments to GENERATE subcommand." If I reverse the order of the options INPUT and OUTPUT it works just fine. file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/script.sh) INPUT ${CMAKE_CURRENT_SOURCE_DIR}/script.sh) The CMake documentation doesn't mention that the order matters: http://www.cmake.org/cmake/help/v3.1/command/file.html#command:file Why does the order of the options in file(GENERATE) matter? cheers, Erik Sjölund -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers