mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-04-30 04:33:53 +00:00
fixup! CMake updates from @slurps-mad-rips
This commit is contained in:
parent
a08e25ea7b
commit
0cc8806ec5
@ -46,7 +46,7 @@ list(APPEND force-libcxx "CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME")
|
|||||||
list(APPEND build-docs "CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME")
|
list(APPEND build-docs "CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME")
|
||||||
list(APPEND build-docs "NOT CMAKE_VERSION VERSION_LESS 3.11")
|
list(APPEND build-docs "NOT CMAKE_VERSION VERSION_LESS 3.11")
|
||||||
list(APPEND build-docs "Doxygen_FOUND")
|
list(APPEND build-docs "Doxygen_FOUND")
|
||||||
list(APPEND build-docs "EXISTS docs")
|
list(APPEND build-docs "EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/docs")
|
||||||
|
|
||||||
option(CLI11_WARNINGS_AS_ERRORS "Turn all warnings into errors (for CI)")
|
option(CLI11_WARNINGS_AS_ERRORS "Turn all warnings into errors (for CI)")
|
||||||
option(CLI11_SINGLE_FILE "Generate a single header file")
|
option(CLI11_SINGLE_FILE "Generate a single header file")
|
||||||
@ -64,7 +64,7 @@ cmake_dependent_option(CLI11_BUILD_TESTS
|
|||||||
|
|
||||||
cmake_dependent_option(CLI11_BUILD_EXAMPLES
|
cmake_dependent_option(CLI11_BUILD_EXAMPLES
|
||||||
"Build CLI11 examples" ON
|
"Build CLI11 examples" ON
|
||||||
"CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME;EXISTS examples" OFF)
|
"CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME;EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/examples" OFF)
|
||||||
|
|
||||||
cmake_dependent_option(CLI11_BUILD_EXAMPLES_JSON
|
cmake_dependent_option(CLI11_BUILD_EXAMPLES_JSON
|
||||||
"Build CLI11 json example" OFF
|
"Build CLI11 json example" OFF
|
||||||
@ -267,7 +267,7 @@ if(CLI11_BUILD_DOCS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# From a build system, this might not be included.
|
# From a build system, this might not be included.
|
||||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND EXISTS book)
|
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/book")
|
||||||
add_subdirectory(book)
|
add_subdirectory(book)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -12,10 +12,12 @@ function(add_cli_exe T)
|
|||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
if(CLI11_BUILD_EXAMPLES_JSON)
|
if(CLI11_BUILD_EXAMPLES_JSON)
|
||||||
|
message(STATUS "Using nlohmann/json")
|
||||||
FetchContent_Declare(json
|
FetchContent_Declare(json
|
||||||
GIT_REPOSITORY https://github.com/nlohmann/json.git
|
URL https://github.com/nlohmann/json/releases/download/v3.7.3/include.zip
|
||||||
GIT_SHALLOW 1
|
URL_HASH "SHA256=87b5884741427220d3a33df1363ae0e8b898099fbc59f1c451113f6732891014"
|
||||||
GIT_TAG v3.7.3)
|
)
|
||||||
|
|
||||||
FetchContent_GetProperties(json)
|
FetchContent_GetProperties(json)
|
||||||
if (NOT json_POPULATED)
|
if (NOT json_POPULATED)
|
||||||
FetchContent_Populate(json)
|
FetchContent_Populate(json)
|
||||||
|
@ -6,6 +6,7 @@ endif()
|
|||||||
list(APPEND CMAKE_MODULE_PATH "${CLI11_SOURCE_DIR}/cmake")
|
list(APPEND CMAKE_MODULE_PATH "${CLI11_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
if(CLI11_SANITIZERS)
|
if(CLI11_SANITIZERS)
|
||||||
|
message(STATUS "Using arsenm/sanitizers-cmake")
|
||||||
FetchContent_Declare(sanitizers
|
FetchContent_Declare(sanitizers
|
||||||
GIT_REPOSITORY https://github.com/arsenm/sanitizers-cmake.git
|
GIT_REPOSITORY https://github.com/arsenm/sanitizers-cmake.git
|
||||||
GIT_SHALLOW 1
|
GIT_SHALLOW 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user