Passing nearly all build flags to an external project in CMake -


Is there a short way for external projects to pass almost all the flags? Basically, I have a project using external project_ad to download and compile an external project. On a special platform, I want to modify most build flags like CMAKE_OBJCOPY, CMAKE_OBJDUMP, CMAKE_RANLIB, etc. the wanted. Now, when I do this for the parent project which adds the external project, I would like to pass these options to the external project. Of course, I can do this by setting the CMAKE_ARGS option in external project_ad, but there are some flags to make the copy. In fact, I am looking for an option which copies all the flags and then overwrites me some As a last note, since I use ExternalProject_Add to download an archive, I hesitate to use the add_subdirectory, which can encode all the flags Will, because I can not give you a URL.

You can list all the flags required in the cmake toolchain file and ExternalProject_Add Only one option can pass: CMAKE_TOOLCHAIN_FILE .

  & gt; Cat CMakeLists.txt cmake_minimum_required (version 2.8) project (Foo) message ("SOME_ARG1: $ {SOME_ARG1}") Message ("SOME_ARG2: $ {SOME_ARG2}") & gt; Cat MyToolchain.cmake set (SOME_ARG1 "arg1") set (SOME_ARG2 "arg2") & gt; Semi-H-B_bild / Nullchain ... - Detects CSF Compiler ABI information - SOME_ARG1 has been done: SOME_ARG2: - Configured & gt; CMK-H-B_builds / toolchain -DCMAKE_TOOLCHAIN_FILE = MyToolchain.cmake ... - The CEF compiler has detected ABI information - SOME_ARG1: arg1 SOME_ARG2: arg2 - configured    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -