Skip to content

Commit

Permalink
use new conan provider file
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Basler committed Jun 1, 2024
1 parent 23a3e4a commit 0914836
Show file tree
Hide file tree
Showing 4 changed files with 650 additions and 942 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/windows_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores
- name: cmake
run: cmake -S . -B build -DLIBCMAES_BUILD_PYTHON=On -DLIBCMAES_BUILD_TESTS=On -DLIBCMAES_USE_OPENMP=On -DLIBCMAES_USE_CONAN=On -DCMAKE_BUILD_TYPE=Release
run: cmake -S . -B build -DLIBCMAES_BUILD_PYTHON=On -DLIBCMAES_BUILD_TESTS=On -DLIBCMAES_USE_OPENMP=On -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=cmake/conan_provider.cmake -DCMAKE_BUILD_TYPE=Release
- name: compile
run: cd build && cmake --build . -j${{ steps.cpu-cores.outputs.count }} --config Release
- name: Run ctest
Expand Down
32 changes: 0 additions & 32 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,38 +80,6 @@ if(LIBCMAES_BUILD_PYTHON)
endif()


if(LIBCMAES_USE_CONAN)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})
include(conan)
set(ConanPkgList eigen/3.4.0)
set(ConanOptions "")
if(LIBCMAES_BUILD_PYTHON)
set(ConanPkgList ${ConanPkgList}
boost/1.78.0
)
set(ConanOptions ${ConanOptions}
boost:without_python=False
boost:python_version=${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}
boost:python_executable=${Python3_EXECUTABLE})
endif(LIBCMAES_BUILD_PYTHON)

if(LIBCMAES_BUILD_TESTS)
set(ConanPkgList ${ConanPkgList} gflags/2.2.2)
endif(LIBCMAES_BUILD_TESTS)

conan_cmake_configure(REQUIRES ${ConanPkgList}
GENERATORS cmake_find_package
OPTIONS ${ConanOptions})


conan_cmake_autodetect(settings)

conan_cmake_install(PATH_OR_REFERENCE .
BUILD missing
REMOTE conancenter
SETTINGS ${settings})
endif()

find_package (Eigen3 3.0.0 REQUIRED)

if (LIBCMAES_USE_OPENMP)
Expand Down
Loading

0 comments on commit 0914836

Please sign in to comment.