conan-io / conan-vs-extension

Conan Extension for Visual Studio
https://marketplace.visualstudio.com/items?itemName=conan-io.conan-vs-extension
MIT License
59 stars 34 forks source link

Does conan install support calling external scripts at command line? #211

Closed sandybhat16 closed 6 months ago

sandybhat16 commented 6 months ago

Hi,

I am using cmake file to install boost. It also builds during the install. However, for building I want to use the bootstrapping script of boost and the b2 library from the boost src folder to build it, hence I want to call an external script to build. Is this possible?

Part of my Cmake file:

SET(Boost_Package_name "boost")
SET(Boost_Version "1.71.0")
SET(Boost_Header_Only "False")

SET(ARCH "x86")
SET(Remote_Server "conancenter")
SET(Debug_Output_Folder "${CMAKE_CURRENT_SOURCE_DIR}\\..\\generated\\Debug\\")
SET(Release_Output_Folder "${CMAKE_CURRENT_SOURCE_DIR}\\..\\generated\\Release\\")

execute_process(COMMAND conan install --requires=${Boost_Package_name}/${Boost_Version} -o ${Boost_Package_name}*:header_only=${Boost_Header_Only} -s arch=${ARCH} -s build_type=Debug -r ${Remote_Server} -g CMakeDeps -of ${Debug_Output_Folder} -b missing
            OUTPUT_QUIET
        )

External script that I want to invoke from the downloaded boost src folder:

bootstrap.bat

b2 --build-dir=build\x86\debug   address-model=32 threading=multi --stagedir=.\bin\x86\debug   --toolset=msvc -j 8 link=static runtime-link=shared --variant=debug
b2 --build-dir=build\x86\release address-model=32 threading=multi --stagedir=.\bin\x86\release --toolset=msvc -j 8 link=static runtime-link=shared --variant=release
sandybhat16 commented 6 months ago

Wrong place to ask the question