diff options
author | fireice-uk <fireice-uk@users.noreply.github.com> | 2017-11-01 15:42:00 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-01 15:42:00 +0000 |
commit | a9f8933775153d33b5e618f36a6ef716c7719082 (patch) | |
tree | 5f56dcf2c097889b52aef937b6f46c4f345b8a59 | |
parent | 69e6013cee02299e4732b02a83025e7011b12f5e (diff) | |
parent | 56706805b4a4910151c4e0eab8bef7d7d0bf4d8d (diff) | |
download | xmr-stak-a9f8933775153d33b5e618f36a6ef716c7719082.zip xmr-stak-a9f8933775153d33b5e618f36a6ef716c7719082.tar.gz |
Merge pull request #84 from psychocrypt/fix-OSXCompile
fix OSX compile
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 595631d..09b7c13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -358,6 +358,8 @@ endif() include_directories(BEFORE .) +set (CMAKE_POSITION_INDEPENDENT_CODE TRUE) + if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") # remove warnings that f_open() is not save and f_open_s should be used add_definitions(-D_CRT_SECURE_NO_DEPRECATE) @@ -429,9 +431,7 @@ if(CUDA_FOUND) ) endif() target_link_libraries(xmrstak_cuda_backend ${CUDA_LIBRARIES}) - if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - target_link_libraries(xmrstak_cuda_backend xmr-stak-backend) - endif() + target_link_libraries(xmrstak_cuda_backend xmr-stak-backend) endif() # compile AMD backend @@ -444,9 +444,7 @@ if(OpenCL_FOUND) ${OPENCLSRCFILES} ) target_link_libraries(xmrstak_opencl_backend ${OpenCL_LIBRARY} ) - if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - target_link_libraries(xmrstak_opencl_backend xmr-stak-backend) - endif() + target_link_libraries(xmrstak_opencl_backend xmr-stak-backend) endif() # compile final binary |