Bug#16395606 SCRIPTS MISSING EXECUTE BIT

Add execute bit for scripts:
 - in build directory
 - in install directory
This commit is contained in:
Tor Didriksen 2013-04-10 16:43:09 +02:00
parent aea3d4b851
commit 39a2d148e6

View File

@ -1,4 +1,4 @@
# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -52,12 +52,20 @@ FOREACH(file ${all_files})
ENDIF()
SET(target "${CMAKE_CURRENT_BINARY_DIR}/${target}")
CONFIGURE_FILE(${file} ${target} COPYONLY)
IF (UNIX AND NOT ${name} MATCHES "README")
EXECUTE_PROCESS(COMMAND chmod +x ${target})
ENDIF()
IF (ext MATCHES ".bat")
IF(WIN32)
INSTALL(FILES ${target} DESTINATION ${prefix}sql-bench COMPONENT SqlBench)
INSTALL(PROGRAMS ${target}
DESTINATION ${prefix}sql-bench COMPONENT SqlBench)
ENDIF()
ELSEIF(name MATCHES "README")
INSTALL(FILES ${target}
DESTINATION ${prefix}sql-bench COMPONENT SqlBench)
ELSE()
INSTALL(FILES ${target} DESTINATION ${prefix}sql-bench COMPONENT SqlBench)
INSTALL(PROGRAMS ${target}
DESTINATION ${prefix}sql-bench COMPONENT SqlBench)
ENDIF()
ENDIF()
ENDFOREACH()