Found a better way to remove -fPIC flag for Windows build.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-07-12 10:19:21 +02:00
parent 61aa266737
commit 592e3c3ffe
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
2 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,6 @@ steps:
image: deukhoofd/windowsbuilder image: deukhoofd/windowsbuilder
commands: commands:
- cmake -DCMAKE_BUILD_TYPE=Release . -B build-release-windows -D CMAKE_C_COMPILER=/home/wclang/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-clang -D CMAKE_CXX_COMPILER=/home/wclang/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-clang++ -DWINDOWS=ON -DSTATICC=ON - cmake -DCMAKE_BUILD_TYPE=Release . -B build-release-windows -D CMAKE_C_COMPILER=/home/wclang/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-clang -D CMAKE_CXX_COMPILER=/home/wclang/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-clang++ -DWINDOWS=ON -DSTATICC=ON
- sed -i 's/-fPIC//g' build-release-windows/CMakeFiles/Arbutils.dir/flags.make
- cmake --build build-release-windows --target all -- -j 4 - cmake --build build-release-windows --target all -- -j 4
- export WINEARCH=win64 - export WINEARCH=win64
- wine build-release-windows/ArbutilsTests.exe -s - wine build-release-windows/ArbutilsTests.exe -s

View File

@ -7,6 +7,7 @@ find_package(Threads)
if (WINDOWS) if (WINDOWS)
ADD_DEFINITIONS(-D WINDOWS=1) ADD_DEFINITIONS(-D WINDOWS=1)
set(CMAKE_POSITION_INDEPENDENT_CODE 0)
endif (WINDOWS) endif (WINDOWS)
file(GLOB_RECURSE SRC_FILES "src/*.cpp" "src/*.hpp" "CInterface/*.cpp") file(GLOB_RECURSE SRC_FILES "src/*.cpp" "src/*.hpp" "CInterface/*.cpp")