-
Notifications
You must be signed in to change notification settings - Fork 259
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
CURL_STATICLIB redundant? #66
Comments
Aha, wait, from http://curl.haxx.se/docs/faq.html I'm taking
This is probably the reason why it's added. However, nothing tells CMake to actually link against CURL statically. For example, the
|
This is a tricky one. As I recall, back when I started with cmake, I added this as default because I observed no ill effects, and determining if the curl library was static or not was difficult across platforms. On Linux platforms, for example, checking the file suffix may be sufficient, but on Windows '.lib' may either be a static library or the import library for a .dll. A brief web search shows lots of suggestions for how to determine if a target library is static or not, but no heuristic that is bullet-proof. The solution to this may be more a question of policy. For example, this requirement may need to be documented and highlighted for developers who may be compiling netcdf themselves. I'll probably remove this flag and leave it up to the down-stream developer to pass. I'll also document this. I'm going to close this issue out now but will leave a note when it's been resolved shortly. |
libcurl's comment on the necessity of this preprocessor flag is listed in the section
I'm sure this is because of the same problem that you describe: On Windows, it's hard to tell if you're dealing with a dynamic or static library. It is probably safe to wrap that flag into |
I wondered what the preprocessor setting
-DCURL_STATICLIB=1
was about, butonly turns up the setting in
CMakeLists.txt
. It seems redundant.The text was updated successfully, but these errors were encountered: