Disable test_* generation with FetchContent #1580
-
I'm using CMake FetchContent to pull in jsoncpp, but now my Debug output folder also contains Thanks, Miha |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
set options before FetchContent. Example (diasabled everything except static library compilation and strict iso ) option(JSONCPP_WITH_TESTS "Compile and (for jsoncpp_check) run JsonCpp test executables" OFF) option(BUILD_SHARED_LIBS "Build jsoncpp_lib as a shared library." OFF) #using TAG 89e2973 cause newer version tries to use string_view and does not work FetchContent_MakeAvailable(jsoncpp_library) |
Beta Was this translation helpful? Give feedback.
set options before FetchContent. Example (diasabled everything except static library compilation and strict iso )
option(JSONCPP_WITH_TESTS "Compile and (for jsoncpp_check) run JsonCpp test executables" OFF)
option(JSONCPP_WITH_POST_BUILD_UNITTEST "Automatically run unit-tests as a post build step" OFF)
option(JSONCPP_WITH_WARNING_AS_ERROR "Force compilation to fail if a warning occurs" OFF)
option(JSONCPP_WITH_STRICT_ISO "Issue all the warnings demanded by strict ISO C and ISO C++" ON)
option(JSONCPP_WITH_PKGCONFIG_SUPPORT "Generate and install .pc files" OFF)
option(JSONCPP_WITH_CMAKE_PACKAGE "Generate and install cmake package files" OFF)
option(JSONCPP_WITH_EXAMPLE "Compile JsonCpp ex…