One of the libraries I'm using is giving a cmake warning for the developers of it. I'm trying to suppress that warning in my ExternalProject_Add
with -Wno-dev
I tried setting it at:
CMAKE_ARGS
CMAKE_CACHE_ARGS
CMAKE_CACHE_DEFAULT_ARGS
This is the yaml-cpp.txt.in:
cmake_minimum_required(VERSION 3.5)
project(yaml-cpp-download NONE)
include(ExternalProject)
ExternalProject_Add(tinyxml2
GIT_REPOSITORY "[email protected]:jbeder/yaml-cpp.git"
GIT_TAG "yaml-cpp-0.5.3"
SOURCE_DIR "${CMAKE_BINARY_DIR}/yaml-cpp-src"
BINARY_DIR "${CMAKE_BINARY_DIR}/yaml-cpp-build"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
CMAKE_ARGS -Wno-dev
)
And I use it my main CMakeLists.txt
like this:
macro(Libraries arg)
configure_file(CMakeDownloadPackages/${arg}.txt.in
${arg}-download/CMakeLists.txt)
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/${arg}-download)
execute_process(COMMAND ${CMAKE_COMMAND} --build .
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/${arg}-download)
add_subdirectory(${CMAKE_BINARY_DIR}/${arg}-src
${CMAKE_BINARY_DIR}/${arg}-build)
endmacro()
Libraries(yaml-cpp)
So, far I haven't had any success suppressing the warning. How can I suppress developer cmake warnings through ExternalProject_Add?
ExternalProject_Add
for download only. But actual using of external project (yaml-cpp
in your case) is performed viaadd_subdirectory
approach. So you need to search decisions, suitable foradd_subdirectory
approach,ExternalProject_Add
parameters are unrelated in that case. – Warm