我使用CMake创建了一个shell脚本,如下所示:
class B extends React.Component {
componentDidUpdate() {
const { rowClickedInAComponent } = this.props;
if ( rowClickedInAComponent ) {
functionToBeCalled();
}
}
render() {
}
}
const mapStateToProps = (state) => ({
rowClickedInAComponent: rowClickedInAComponent
// boolean here, you could pass any info such as which row was clicked
});
export default connect(mapStateToProps)(ListingPage);
我希望用户能够立即执行该脚本。为此,最好从CMake中更改该文件的权限。
CMake中是否有类似file(WRITE somescript.sh "echo foo!")
的内容?
答案 0 :(得分:1)
from l in list
group l by l.ID into c
select c.FirstOrDefault(i => i.STATUS == "ACT") ?? c.First()
的问题是当目标目录等于源目录并且文件本身没有改变时(CMake似乎比较时间戳),现有文件不会被覆盖。但是没关系,我找到了一个适合所有人阅读的工作解决方案:
install
${CMAKE_BINARY_DIR}/tmp
file (COPY ${CMAKE_BINARY_DIR}/tmp/somescript.sh DESTINATION ${CMAKE_BINARY_DIR} FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)
答案 1 :(得分:0)
您可以在istall命令中执行此操作。使用此标签:
p + geom_rect(data=df[1,],
aes(xmin = as.Date("2017-01-15"), xmax = as.Date("2017-01-20"),
ymin = -Inf, ymax = Inf),
fill = "blue", alpha=.3)
答案 2 :(得分:0)
如果你想复制一个二进制文件,我会使用 USE_SOURCE_PERMISSIONS