Commit cb4a4a2e authored by Jesse Mapel's avatar Jesse Mapel Committed by jlaura
Browse files

Updated cmake and build recipe (#242)

* Updated build config

* Updated build recipe

* Cleaned up build deps
parent 468e8f22
Loading
Loading
Loading
Loading
+30 −22
Original line number Diff line number Diff line
@@ -7,13 +7,10 @@
# Specify the required version of CMake.
# cmake 3.10 required for ctest/gtest integration
cmake_minimum_required(VERSION 3.10)
project(ale VERSION 0.0.1 DESCRIPTION "Abstraction Library for Ephemerides ")
project(ale VERSION 0.3.0 DESCRIPTION "Abstraction Library for Ephemerides ")

# include what we need
include(GNUInstallDirs)
include(cmake/gtest.cmake)
include(GoogleTest)
include(CTest)

set(CMAKE_CXX_STANDARD 11)

@@ -39,16 +36,26 @@ target_include_directories(ale
                           PUBLIC
                           ${ALE_INCLUDE_DIRS})

# Setup for GoogleTest
 target_link_libraries(ale
                       PRIVATE
                       ${GSL_LIBRARIES}
                       ${PYTHON_LIBRARY})

# Optional build tests
option (BUILD_TESTS "Build tests" ON)
if(BUILD_TESTS)
  include(cmake/gtest.cmake)
  include(GoogleTest)
  include(CTest)

  find_package (Threads)

  target_link_libraries(ale
                        PRIVATE
                        ${GSL_LIBRARIES}
                        ${PYTHON_LIBRARY}
                        PUBLIC
                        gtest ${CMAKE_THREAD_LIBS_INIT})

# Setup for ctest
  enable_testing()
  add_subdirectory(tests/ctests)

@@ -59,6 +66,7 @@ if(COVERAGE)
      target_compile_options(ale PRIVATE --coverage -O0)
      target_link_libraries(ale PRIVATE --coverage -O0)
  endif()
endif()

# Install commands
install(TARGETS ale LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+1 −1
Original line number Diff line number Diff line
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_BUILD_TYPE=Release ..
cmake -DCMAKE_INSTALL_PREFIX=$PREFIX -DBUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release ..
make install
+2 −15
Original line number Diff line number Diff line
@@ -26,30 +26,17 @@ requirements:
  build:
  - cmake>=3.10
  - eigen
#  - eigen=3.3.3
  - gsl
#  - gsl==2.2.1
  - numpy
  - openblas
#  - openblas==0.2.19
  - python
#  - python==3.6
  - python-dateutil
  - pvl
  - spiceypy
  run:
  - cmake>=3.10
  - eigen
#  - eigen=3.3.3
  - gsl
#  - gsl==2.2.1
  - netowrkx
  - numpy
  - openblas
#  - openblas==0.2.19
  - python
#  - python==3.6
  - python-dateutil
  - pvl
  - pysis
  - spiceypy

# Add the tests eventually