CMake ExternalProject_Add ignore cmake dependency
One of the libraries I use gives developers its warning. I am trying to suppress this warning in ExternalProject_Add
with-Wno-dev
I tried to set it to:
-
CMAKE_ARGS
-
CMAKE_CACHE_ARGS
-
CMAKE_CACHE_DEFAULT_ARGS
This is yaml-cpp.txt.in:
cmake_minimum_required(VERSION 3.5)
project(yaml-cpp-download NONE)
include(ExternalProject)
ExternalProject_Add(tinyxml2
GIT_REPOSITORY "git@github.com: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 as my main one 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 had time to suppress the warning. How can I suppress developer cmake warnings via ExternalProject_Add?
+3
source to share
No one has answered this question yet
Check out similar questions: