diff --git a/.appveyor.yml b/.appveyor.yml index 13b227920240fca5f181065c198917054e69f84b..2fda45c1e886f2c5bc3b2ecc783fe1576b78528a 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -14,7 +14,7 @@ install: - conda config --set always_yes yes --set changeps1 no - conda update -q conda - conda install conda-build anaconda-client - - conda env create -n ale python=3.7.3 + - conda env create -n ale - conda env update -f environment.yml -n ale - conda activate ale @@ -24,7 +24,7 @@ before_build: build_script: - python ..\setup.py install - - cmake -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -G "Visual Studio 15 2017 Win64" -DALE_BUILD_TESTS=OFF .. + - cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -G "Visual Studio 15 2017 Win64" -DALE_BUILD_TESTS=OFF .. - cmake --build . --target ALL_BUILD --config Release artifacts: diff --git a/.travis.yml b/.travis.yml index 8b4bddddc164277290e79d9ea8cf5a680a20e27a..26de9b5d613ab227d2b3125234931fb84e6e3f4b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,7 @@ install: - bash miniconda.sh -b -p $HOME/miniconda - export PATH="$HOME/miniconda/bin:$PATH" - conda config --set always_yes yes - - conda env create -n ale python=3.7.3 + - conda env create -n ale - conda env update -f environment.yml -n ale - source activate ale - conda install pytest @@ -50,7 +50,7 @@ script: - python setup.py install # install to use python lib in c code - mkdir -p build - cd build - - cmake -DCOVERAGE=ON .. + - cmake -DCMAKE_BUILD_TYPE=RELEASE -DCOVERAGE=ON .. - cmake --build . - ctest -VV diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c5ab7e8d3cfddb7c3993535454aab49f40348e4..3b8006589fc5784db0f406f53b41847555ceaf8c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,9 +5,9 @@ # CMake initialization # Specify the required version of CMake. -# cmake 3.10 required for ctest/gtest integration -cmake_minimum_required(VERSION 3.10) -project(ale VERSION 0.8.1 DESCRIPTION "Abstraction Library for Ephemerides ") +# cmake 3.15 required for findPython virtualenv configuration +cmake_minimum_required(VERSION 3.15) +project(ale VERSION 0.8.2 DESCRIPTION "Abstraction Library for Ephemerides ") # include what we need include(GNUInstallDirs) @@ -15,8 +15,8 @@ include(GNUInstallDirs) set(CMAKE_CXX_STANDARD 11) option(ALE_BUILD_LOAD "If the C++ Python load interface should be built." ON) -option(ALE_USE_EXTERNAL_JSON "If an external nlohmann JSON library should be used" OFF) -option(ALE_USE_EXTERNAL_EIGEN "If an external EIGEN library should be used" OFF) +option(ALE_USE_EXTERNAL_JSON "If an external nlohmann JSON library should be used" ON) +option(ALE_USE_EXTERNAL_EIGEN "If an external EIGEN library should be used" ON) # Third Party Dependencies if(ALE_USE_EXTERNAL_JSON) @@ -38,8 +38,10 @@ endif() if(ALE_BUILD_LOAD) # If there is an Anaconda environment activated, search that for Python first if(EXISTS $ENV{CONDA_PREFIX}) - message("Searching $ENV{CONDA_PREFIX} for Python libraries") - set(Python_ROOT_DIR $ENV{CONDA_PREFIX}) + message("Searching Anaconda environment at $ENV{CONDA_PREFIX} for Python libraries") + set(Python_FIND_VIRTUALENV FIRST) + set(Python_FIND_REGISTRY LAST) + set(Python_FIND_FRAMEWORK LAST) set(Python_FIND_STRATEGY LOCATION) endif() find_package(Python REQUIRED COMPONENTS Development) diff --git a/cmake/config.cmake.in b/cmake/config.cmake.in index 82500f671dc75d3a5ba697e83f1d8ed754d09f25..c223d95f1b1151f594611a979ae3b82b13f2560d 100644 --- a/cmake/config.cmake.in +++ b/cmake/config.cmake.in @@ -3,6 +3,5 @@ set(${CMAKE_FIND_PACKAGE_NAME}_CONFIG ${CMAKE_CURRENT_LIST_FILE}) find_package_handle_standard_args(@PROJECT_NAME@ CONFIG_MODE) if(NOT TARGET @PROJECT_NAME@::ale) - find_package(nlohmann_json REQUIRED) include("${CMAKE_CURRENT_LIST_DIR}/aleTargets.cmake") endif() diff --git a/environment.yml b/environment.yml index 9d26978891cc106f820dbd7e7ba6b0a13dcc0edc..712eaef3da825cc03ec45566c1e7f15f710e4a0b 100644 --- a/environment.yml +++ b/environment.yml @@ -4,7 +4,7 @@ channels: - default dependencies: - - cmake>=3.10 + - cmake>=3.15 - pytest - eigen - jupyter diff --git a/recipe/bld.bat b/recipe/bld.bat index 21e7e72e136359a8b0740224d606a9ec0d6734ae..f39eff7a3e84051ab072bbac3ecac283fa202cb3 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -4,6 +4,7 @@ cd build cmake -GNinja ^ -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON ^ -DALE_BUILD_TESTS=OFF ^ + -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_INSTALL_PREFIX="%PREFIX%" ^ -DCMAKE_INSTALL_LIBDIR="%LIBRARY_LIB%" ^ -DCMAKE_INSTALL_INCLUDEDIR="%LIBRARY_INC%" ^ diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 40808ab6458fc97801fff5f71c6178e64a325bf0..84193481ace4ddece0bb433bffeb86ef6822f4c1 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -15,7 +15,7 @@ build: requirements: build: - - cmake>=3.10 + - cmake>=3.15 - eigen host: - pip diff --git a/setup.py b/setup.py index bb71daa4ca20bf30b102f3d37ee0d4dd3e18fc6a..5b1c1ee722baec15f093b44f514b223b5f60e626 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ import sys from setuptools import setup, find_packages NAME = "Ale" -VERSION = "0.8.1" +VERSION = "0.8.2" # To install the library, run the following #