Commit f39e9dc2 authored by Salko Jr, Robert's avatar Salko Jr, Robert
Browse files

Update build to use Cmake

Update so it is a one step process.  Cannot use pip install anymore.
parent 3b425dfd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -6,3 +6,4 @@ MCFR
*.png
SubKit/wasp/build
doc/sphinxdoc
build
+15 −7
Original line number Diff line number Diff line
before_script:
  - pwd

tests:
   type: test
   tags:
      - smbuilder
   variables:
      BLD_NAME: "ctfDeckBuilder_tests"
      BLD_DIR: "/tmp/$BLD_NAME"
      - subkit_tests
   artifacts:
      paths:
        - LastTestsFailed.log
        - LastTest.log
        - CTestCostData.txt
      expire_in: 1 week
      when: always
   script:
      - pwd
      - SRC_DIR=`pwd`
      - mkdir -p build
      - cd build
      - rm -rf *
      - $SRC_DIR/config.sh $SRC_DIR
      - make -j4
      - cd tests
      - ./test_driver.sh

.travis.yml

0 → 100644
+25 −0
Original line number Diff line number Diff line
before_script:
  - pwd

tests:
   type: test
   tags:
      - subkit_tests
   variables:
      BLD_NAME: "SubKit_tests"
      BLD_DIR: "/tmp/$BLD_NAME"
  artifacts:
    paths:
      - LastTestsFailed.log
      - LastTest.log
      - CTestCostData.txt
    expire_in: 1 week
    when: always
  script:
      - SRC_DIR=`pwd`
      - mkdir -p $BLD_DIR
      - cd $BLD_DIR
      - $SRC_DIR/config.sh $SRC_DIR
      - make -j4 -i |& tee make.out
      - cd tests
      - ./test_driver.sh

CMakeLists.txt

0 → 100644
+27 −0
Original line number Diff line number Diff line
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11 FATAL_ERROR)
project(SubKit)

file(COPY SubKit doc tests LICENSE MANIFEST.in README.md DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
add_subdirectory(wasp)

find_package(PythonInterp 2.7 REQUIRED )
find_package(PythonLibs 2.7 REQUIRED )
find_program(PYTHON "python")

if (PYTHON)
    set(SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in")
    set(SETUP_PY    "${CMAKE_CURRENT_BINARY_DIR}/setup.py")
    set(DEPS        "${CMAKE_CURRENT_SOURCE_DIR}/SubKit/__init__.py")
    set(OUTPUT      "${CMAKE_CURRENT_BINARY_DIR}/build/timestamp")

    configure_file(${SETUP_PY_IN} ${SETUP_PY})

    add_custom_command(OUTPUT ${OUTPUT}
                       COMMAND ${PYTHON} ${SETUP_PY} build
                       COMMAND ${CMAKE_COMMAND} -E touch ${OUTPUT}
                       DEPENDS ${DEPS})

    add_custom_target(target ALL DEPENDS ${OUTPUT})

    install(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} install)")
endif()
+2 −2
Original line number Diff line number Diff line
SMBuilder
=========
SubKit
======

See [here](doc/index.rst) for information on this package.
Loading