File tree Expand file tree Collapse file tree 2 files changed +26
-4
lines changed Expand file tree Collapse file tree 2 files changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -536,9 +536,9 @@ jobs:
536536 cat ~/.conan2/profiles/default
537537 # sed -i '' 's/compiler.cppstd=.*$/compiler.cppstd=20/' ~/.conan/profiles/default
538538
539- if [[ "${ENABLE_CONAN}" == "ON" ]]; then
540- conan install .. --output-folder=. --build=missing --settings compiler.cppstd=20 --settings build_type=${BUILD_TYPE}
541- fi
539+ # if [[ "${ENABLE_CONAN}" == "ON" ]]; then
540+ # conan install .. --output-folder=. --build=missing --settings compiler.cppstd=20 --settings build_type=${BUILD_TYPE}
541+ # fi
542542
543543 ccache --zero-stats
544544 cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
Original file line number Diff line number Diff line change @@ -14,7 +14,29 @@ option(ENABLE_NODE_BINDINGS "Build NodeJs bindings" OFF)
1414option (ENABLE_CLANG_TIDY "Enables clang-tidy checks" OFF )
1515
1616if (ENABLE_CONAN)
17- set (CMAKE_TOOLCHAIN_FILE "./conan_toolchain.cmake" )
17+ message (STATUS "Installing Conan packages. It may take a while..." )
18+ find_program (CONAN_EXECUTABLE NAMES conan)
19+
20+ if (NOT CONAN_EXECUTABLE)
21+ message (FATAL_ERROR "Conan not found! Please install Conan 2.x and try again." )
22+ else ()
23+ set (CMAKE_TOOLCHAIN_FILE "./conan_toolchain.cmake" )
24+
25+ # message(STATUS "Conan install stdout: ${CONAN_EXECUTABLE} install .. --output-folder=. --build=missing --settings compiler.cppstd=20 --settings build_type=${CMAKE_BUILD_TYPE}")
26+ execute_process (
27+ COMMAND ${CONAN_EXECUTABLE} install .. --output -folder =. --build =missing --settings compiler.cppstd=20 --settings build_type =${CMAKE_BUILD_TYPE}
28+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
29+ OUTPUT_VARIABLE conan_stdout
30+ ERROR_VARIABLE conan_stderr
31+ RESULT_VARIABLE conan_install_result
32+ )
33+ # message(STATUS "Conan install stdout: ${conan_stdout} ${CMAKE_BUILD_TYPE}")
34+ # message(STATUS "Conan install stderr: ${conan_stderr}")
35+
36+ if (NOT conan_install_result EQUAL 0)
37+ message (FATAL_ERROR "Conan install failed." )
38+ endif ()
39+ endif ()
1840endif ()
1941
2042set (CMAKE_CXX_STANDARD 20)
You can’t perform that action at this time.
0 commit comments