New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BLD: cmake additions
#1604
BLD: cmake additions
#1604
Conversation
|
@barracuda156 I think this should work alright? |
Closes ERGO-Codegh-1549 Co-authored-by: ogmundur <ogmundur@users.noreply.github.com>
8281bdf
to
781b2f4
Compare
|
@HaoZeke I can pull your branch and try now. |
|
@HaoZeke It is interesting. Configure works fine: But flag is not passed, and build fails: |
|
Relevant part of configure log: |
|
@barracuda156 could you try applying this patch? diff --git i/src/CMakeLists.txt w/src/CMakeLists.txt
index e197c117b..3a898b16c 100644
--- i/src/CMakeLists.txt
+++ w/src/CMakeLists.txt
@@ -817,6 +817,13 @@ find_package(Threads)
if(Threads_FOUND)
include(CheckAtomic)
+if(HAVE_CXX_ATOMICS64_WITH_LIB)
+ if(FAST_BUILD)
+ target_link_libraries(highs PUBLIC atomic)
+ else()
+ target_link_libraries(libhighs PUBLIC atomic)
+ endif()
+endif()
endif()Using |
|
@HaoZeke @jajhall And CMakeCache has: So I guess something goes wrong with the logic of when the flag is added and when not. Configure check results look correct, but flag is not added. |
|
@HaoZeke CMake refuses to accept this patch: |
Oh damn, it should be: if(Threads_FOUND)
include(CheckAtomic)
if(HAVE_CXX_ATOMICS64_WITH_LIB)
if(FAST_BUILD)
target_link_libraries(highs atomic)
else()
target_link_libraries(libhighs atomic)
endif()
endif()
endif()(removing the PUBLIC keyword since it wasn't used for ZLIB) |
|
Yes, now it works: |
Awesome, thanks for confirming. Opened #1605 to finally close this out. |
Closes #1549. Also modifies the
libatomiccheck as discussed in #1603 (comment).