mirror of
https://github.com/curl/curl.git
synced 2026-07-26 03:57:16 +03:00
cmake: show CMake platform/compiler flags
To better understand which is active in which build job. Closes #14417
This commit is contained in:
parent
dcc5209520
commit
6712bd6006
1 changed files with 28 additions and 0 deletions
|
|
@ -54,6 +54,34 @@ include(CheckCCompilerFlag)
|
|||
|
||||
project(CURL C)
|
||||
|
||||
set(_flags)
|
||||
if(APPLE)
|
||||
set(_flags "${_flags} APPLE")
|
||||
endif()
|
||||
if(UNIX)
|
||||
set(_flags "${_flags} UNIX")
|
||||
endif()
|
||||
if(WIN32)
|
||||
set(_flags "${_flags} WIN32")
|
||||
endif()
|
||||
if(CYGWIN)
|
||||
set(_flags "${_flags} CYGWIN")
|
||||
endif()
|
||||
if(MSYS)
|
||||
set(_flags "${_flags} MSYS")
|
||||
endif()
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
set(_flags "${_flags} GCC")
|
||||
endif()
|
||||
if(MINGW)
|
||||
set(_flags "${_flags} MINGW")
|
||||
endif()
|
||||
if(MSVC)
|
||||
set(_flags "${_flags} MSVC")
|
||||
endif()
|
||||
message(STATUS "CMake platform flags:${_flags}")
|
||||
set(_flags)
|
||||
|
||||
file(STRINGS ${CURL_SOURCE_DIR}/include/curl/curlver.h _curl_version_h_contents REGEX "#define LIBCURL_VERSION( |_NUM )")
|
||||
string(REGEX MATCH "#define LIBCURL_VERSION \"[^\"]*"
|
||||
CURL_VERSION ${_curl_version_h_contents})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue