diff --git a/CMake/CurlSymbolHiding.cmake b/CMake/CurlSymbolHiding.cmake index 7668bb8357..f507e45766 100644 --- a/CMake/CurlSymbolHiding.cmake +++ b/CMake/CurlSymbolHiding.cmake @@ -60,6 +60,7 @@ if(CURL_HIDDEN_SYMBOLS) endif() else() if(MSVC) + # Note: This option is prone to export non-curl extra symbols. set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) endif() endif() diff --git a/CMakeLists.txt b/CMakeLists.txt index 784c1dc7c2..dc700046d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -203,8 +203,11 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE") # Required for sendmmsg() endif() -option(ENABLE_DEBUG "Enable curl debug features" OFF) -option(ENABLE_CURLDEBUG "Enable TrackMemory feature" ${ENABLE_DEBUG}) +option(ENABLE_DEBUG "Enable curl debug features (for developing curl itself)" OFF) +if(ENABLE_DEBUG) + message(WARNING "This curl build is Debug-enabled, do not use in production.") +endif() +option(ENABLE_CURLDEBUG "Enable TrackMemory debug feature" ${ENABLE_DEBUG}) if(MSVC) set(ENABLE_CURLDEBUG OFF) # FIXME: TrackMemory + MSVC fails test 558 and 1330. Tested with static build, Debug mode. diff --git a/docs/INSTALL-CMAKE.md b/docs/INSTALL-CMAKE.md index 3aa3ab5e55..a74e1930ea 100644 --- a/docs/INSTALL-CMAKE.md +++ b/docs/INSTALL-CMAKE.md @@ -162,9 +162,9 @@ assumes that CMake generates `Makefile`: - `CURL_TARGET_WINDOWS_VERSION`: Minimum target Windows version as hex string. - `CURL_TEST_BUNDLES`: Bundle `libtest` and `unittest` tests into single binaries. Default: `OFF` - `CURL_WERROR`: Turn compiler warnings into errors. Default: `OFF` -- `ENABLE_CURLDEBUG`: Enable TrackMemory feature: Default: =`ENABLE_DEBUG` +- `ENABLE_CURLDEBUG`: Enable TrackMemory debug feature: Default: =`ENABLE_DEBUG` - `ENABLE_CURL_MANUAL`: Build the man page for curl and enable its `-M`/`--manual` option. Default: `ON` -- `ENABLE_DEBUG`: Enable curl debug features. Default: `OFF` +- `ENABLE_DEBUG`: Enable curl debug features (for developing curl itself). Default: `OFF` - `IMPORT_LIB_SUFFIX`: Import library suffix. Default: `_imp` - `LIBCURL_OUTPUT_NAME`: Basename of the curl library. Default: `libcurl` - `PICKY_COMPILER`: Enable picky compiler options. Default: `ON`