diff options
author | Wohlstand <admin@wohlnet.ru> | 2019-09-23 12:33:43 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2019-09-23 12:33:43 +0300 |
commit | 8749ddc3da9574c2406a7dfd2fd6a4639148beef (patch) | |
tree | 6a9c4efffeca6941d4a6e4f5ad76eb9eb81896ed /utils/gen_adldata | |
parent | 62a018a1338b807d325d44a512499cf31563ab26 (diff) | |
download | libADLMIDI-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/gen_adldata')
-rw-r--r-- | utils/gen_adldata/CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/gen_adldata/CMakeLists.txt b/utils/gen_adldata/CMakeLists.txt index 56662e7..bd52283 100644 --- a/utils/gen_adldata/CMakeLists.txt +++ b/utils/gen_adldata/CMakeLists.txt @@ -51,6 +51,10 @@ else() target_link_libraries(gen_adldata PRIVATE pthread m) endif() +if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) + set_property(TARGET gen_adldata APPEND_STRING PROPERTY LINK_FLAGS " -no-pie") +endif() + if(WITH_GENADLDATA_COMMENTS) target_compile_options(gen_adldata PUBLIC "-DADLDATA_WITH_COMMENTS") endif() |