aboutsummaryrefslogtreecommitdiff
path: root/utils/dumpbank
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2019-09-23 12:33:43 +0300
committerWohlstand <admin@wohlnet.ru>2019-09-23 12:33:43 +0300
commit8749ddc3da9574c2406a7dfd2fd6a4639148beef (patch)
tree6a9c4efffeca6941d4a6e4f5ad76eb9eb81896ed /utils/dumpbank
parent62a018a1338b807d325d44a512499cf31563ab26 (diff)
downloadlibADLMIDI-8749ddc3da9574c2406a7dfd2fd6a4639148beef.tar.gz
libADLMIDI-8749ddc3da9574c2406a7dfd2fd6a4639148beef.tar.bz2
libADLMIDI-8749ddc3da9574c2406a7dfd2fd6a4639148beef.zip
Set "-no-pie" to all executables built by GCC
Otherwise, this happens: https://stackoverflow.com/questions/46551213/gcc-7-2-compiles-shared-library-instead-of-executable
Diffstat (limited to 'utils/dumpbank')
-rw-r--r--utils/dumpbank/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/dumpbank/CMakeLists.txt b/utils/dumpbank/CMakeLists.txt
index 1b84efe..1630ea5 100644
--- a/utils/dumpbank/CMakeLists.txt
+++ b/utils/dumpbank/CMakeLists.txt
@@ -1,5 +1,9 @@
add_executable(adldumpbank dumpbank.cpp)
+if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+ set_property(TARGET adldumpbank APPEND_STRING PROPERTY LINK_FLAGS " -no-pie")
+endif()
+
install(TARGETS adldumpbank
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")