From 979453c610ac4c74ea02148efcb0c25e0058e85f Mon Sep 17 00:00:00 2001 From: Radovan Bast Date: Sun, 6 Oct 2019 15:54:17 +0200 Subject: [PATCH 1/3] fc_blas and fc_lapack tests need also C and CXX support --- test/fc_blas/cmake/autocmake.yml | 5 ++++- test/fc_lapack/cmake/autocmake.yml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/test/fc_blas/cmake/autocmake.yml b/test/fc_blas/cmake/autocmake.yml index 816f8d4..7ee9980 100644 --- a/test/fc_blas/cmake/autocmake.yml +++ b/test/fc_blas/cmake/autocmake.yml @@ -1,6 +1,9 @@ name: example min_cmake_version: 2.8 -language: Fortran +language: + - Fortran + - C + - CXX default_build_type: debug modules: - fc: diff --git a/test/fc_lapack/cmake/autocmake.yml b/test/fc_lapack/cmake/autocmake.yml index dc32316..c9c3f32 100644 --- a/test/fc_lapack/cmake/autocmake.yml +++ b/test/fc_lapack/cmake/autocmake.yml @@ -1,6 +1,9 @@ name: example min_cmake_version: 2.8 -language: Fortran +language: + - Fortran + - C + - CXX default_build_type: debug modules: - fc: From d2890239d0b7f5fef41c7101d77ff18740bfbfbc Mon Sep 17 00:00:00 2001 From: Radovan Bast Date: Sun, 6 Oct 2019 15:54:48 +0200 Subject: [PATCH 2/3] fix path to include file --- modules/math/accelerate.cmake | 4 ++-- modules/math/cblas.cmake | 4 ++-- modules/math/lapacke.cmake | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/math/accelerate.cmake b/modules/math/accelerate.cmake index a195b7f..967871e 100644 --- a/modules/math/accelerate.cmake +++ b/modules/math/accelerate.cmake @@ -23,8 +23,8 @@ option(ENABLE_ACCELERATE "Find and link to ACCELERATE" OFF) if(ENABLE_ACCELERATE) - include(find_libraries) - include(find_include_files) + include(${CMAKE_CURRENT_LIST_DIR}/../find/find_libraries.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/../find/find_include_files.cmake) set(ACCELERATE_FOUND FALSE) set(ACCELERATE_LIBRARIES "NOTFOUND") diff --git a/modules/math/cblas.cmake b/modules/math/cblas.cmake index 91bd0e7..2c023bf 100644 --- a/modules/math/cblas.cmake +++ b/modules/math/cblas.cmake @@ -23,8 +23,8 @@ option(ENABLE_CBLAS "Find and link to CBLAS" OFF) if(ENABLE_CBLAS) - include(find_libraries) - include(find_include_files) + include(${CMAKE_CURRENT_LIST_DIR}/../find/find_libraries.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/../find/find_include_files.cmake) set(CBLAS_FOUND FALSE) set(CBLAS_LIBRARIES "NOTFOUND") diff --git a/modules/math/lapacke.cmake b/modules/math/lapacke.cmake index d5320c4..8612111 100644 --- a/modules/math/lapacke.cmake +++ b/modules/math/lapacke.cmake @@ -23,8 +23,8 @@ option(ENABLE_LAPACKE "Find and link to LAPACKE" OFF) if(ENABLE_LAPACKE) - include(find_libraries) - include(find_include_files) + include(${CMAKE_CURRENT_LIST_DIR}/find_libraries.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/find_include_files.cmake) set(LAPACKE_FOUND FALSE) set(LAPACKE_LIBRARIES "NOTFOUND") From 8c0222a87f5b55c0ebbeff2e62bdb2eff6a85908 Mon Sep 17 00:00:00 2001 From: Radovan Bast Date: Sun, 6 Oct 2019 15:55:12 +0200 Subject: [PATCH 3/3] rm boost module and tests; closes #258 closes #260 --- .travis.yml | 11 +- modules/boost/boost.cmake | 192 --------------------- modules/boost/boost_build.cmake | 13 -- modules/boost/boost_cleanup.cmake | 11 -- modules/boost/boost_configure.cmake | 15 -- modules/boost/boost_headers.cmake | 11 -- modules/boost/boost_install.cmake | 13 -- modules/boost/boost_unpack.cmake | 11 -- modules/boost/boost_userconfig.cmake | 18 -- test/boost_header_only/cmake/autocmake.yml | 16 -- test/boost_header_only/src/CMakeLists.txt | 1 - test/boost_header_only/src/example.cpp | 17 -- test/boost_libs/cmake/autocmake.yml | 23 --- test/boost_libs/src/CMakeLists.txt | 8 - test/boost_libs/src/example.cpp | 45 ----- test/test.py | 9 - 16 files changed, 3 insertions(+), 411 deletions(-) delete mode 100644 modules/boost/boost.cmake delete mode 100644 modules/boost/boost_build.cmake delete mode 100644 modules/boost/boost_cleanup.cmake delete mode 100644 modules/boost/boost_configure.cmake delete mode 100644 modules/boost/boost_headers.cmake delete mode 100644 modules/boost/boost_install.cmake delete mode 100644 modules/boost/boost_unpack.cmake delete mode 100644 modules/boost/boost_userconfig.cmake delete mode 100644 test/boost_header_only/cmake/autocmake.yml delete mode 100644 test/boost_header_only/src/CMakeLists.txt delete mode 100644 test/boost_header_only/src/example.cpp delete mode 100644 test/boost_libs/cmake/autocmake.yml delete mode 100644 test/boost_libs/src/CMakeLists.txt delete mode 100644 test/boost_libs/src/example.cpp diff --git a/.travis.yml b/.travis.yml index 0bdc44f..adb6549 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,8 +25,6 @@ matrix: - libopenmpi-dev # python library, development version - libpython2.7 - # boost - - libboost-all-dev - os: linux python: 3.5 @@ -49,11 +47,9 @@ matrix: - libopenmpi-dev # python library, development version - libpython2.7 - # boost - - libboost-all-dev - os: osx - osx_image: xcode7.3 + osx_image: xcode11 compiler: gcc env: - SOURCES=homebrew @@ -61,8 +57,7 @@ matrix: install: - | if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then - brew install cmake boost python open-mpi - brew reinstall gcc + brew update &> /dev/null pip install virtualenv elif [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then pip install --user virtualenv @@ -78,7 +73,7 @@ install: script: # pycodestyle tests - pycodestyle --ignore E501 update.py - - pycodestyle --ignore E501,E265,E741 autocmake + - pycodestyle --ignore E501,E265,E741 autocmake --exclude autocmake/external/docopt.py # unit tests - py.test -vv autocmake/* - py.test -vv test/test.py diff --git a/modules/boost/boost.cmake b/modules/boost/boost.cmake deleted file mode 100644 index e7ada50..0000000 --- a/modules/boost/boost.cmake +++ /dev/null @@ -1,192 +0,0 @@ -# (c) https://github.com/dev-cafe/autocmake/blob/master/AUTHORS.md -# licensed under BSD-3: https://github.com/dev-cafe/autocmake/blob/master/LICENSE - -#.rst: -# -# Detect, build, and link Boost libraries. -# This modules downloads the .zip archive from SourceForge at -# Autocmake update time. -# Note that the build-up commands are not Windows-compatible! -# -# Your autocmake.yml should look like this:: -# -# - boost: -# - major: 1 -# - minor: 59 -# - patch: 0 -# - components: "chrono;timer;system" -# - source: "https://github.com/dev-cafe/autocmake/raw/master/modules/boost/boost.cmake" -# -# Cross-dependencies between required components are not checked for. -# For example, Boost.Timer depends on Boost.Chrono and Boost.System thus you -# should ask explicitly for all three. -# If the self-build of Boost components is triggered the `BUILD_CUSTOM_BOOST` variable is set -# to `TRUE`. The CMake target `custom_boost` is also added. -# You should use these two to ensure the right dependencies between your targets -# and the Boost headers/libraries, in case the self-build is triggered. -# For example:: -# -# if(BUILD_CUSTOM_BOOST) -# add_dependencies(your_target custom_boost) -# endif() -# -# will ensure that `your_target` is built after `custom_boost` if and only if the self-build -# of Boost took place. This is an important step to avoid race conditions when building -# on multiple processes. -# -# Dependencies:: -# -# mpi - Only if the Boost.MPI library is a needed component -# python_libs - Only if the Boost.Python library is a needed component -# -# Variables used:: -# -# BOOST_MINIMUM_REQUIRED - Minimum required version of Boost -# BOOST_COMPONENTS_REQUIRED - Components (compiled Boost libraries) required -# PROJECT_SOURCE_DIR -# PROJECT_BINARY_DIR -# CMAKE_BUILD_TYPE -# MPI_FOUND -# BUILD_CUSTOM_BOOST -# -# autocmake.yml configuration:: -# -# url_root: https://github.com/dev-cafe/autocmake/raw/master/ -# major: 1 -# minor: 48 -# patch: 0 -# components: "" -# fetch: -# - "%(url_root)modules/boost/boost_unpack.cmake" -# - "%(url_root)modules/boost/boost_userconfig.cmake" -# - "%(url_root)modules/boost/boost_configure.cmake" -# - "%(url_root)modules/boost/boost_build.cmake" -# - "%(url_root)modules/boost/boost_install.cmake" -# - "%(url_root)modules/boost/boost_headers.cmake" -# - "%(url_root)modules/boost/boost_cleanup.cmake" -# - "http://sourceforge.net/projects/boost/files/boost/%(major).%(minor).%(patch)/boost_%(major)_%(minor)_%(patch).zip" -# docopt: -# - "--boost-headers= Include directories for Boost [default: '']." -# - "--boost-libraries= Library directories for Boost [default: '']." -# - "--build-boost= Deactivate Boost detection and build on-the-fly [default: OFF]." -# define: -# - "'-DBOOST_INCLUDEDIR=\"{0}\"'.format(arguments['--boost-headers'])" -# - "'-DBOOST_LIBRARYDIR=\"{0}\"'.format(arguments['--boost-libraries'])" -# - "'-DFORCE_CUSTOM_BOOST={0}'.format(arguments['--build-boost'])" -# - "'-DBOOST_MINIMUM_REQUIRED=\"%(major).%(minor).%(patch)\"'" -# - "'-DBOOST_COMPONENTS_REQUIRED=\"%(components)\"'" - -# FIXME Maintainer should be able to choose between fail (end-user has to satisfy dependency -# on its own) and soft-fail (self-build of Boost) -# Underscore-separated version number -string(REGEX REPLACE "\\." "_" BOOSTVER ${BOOST_MINIMUM_REQUIRED}) - -# Where the Boost .zip archive is located -set(BOOST_ARCHIVE_LOCATION ${PROJECT_SOURCE_DIR}/cmake/downloaded) - -set(BOOST_ARCHIVE boost_${BOOSTVER}.zip) - -# FIXME These are possibly not always good settings -set(Boost_USE_STATIC_LIBS ON) -set(Boost_USE_MULTITHREADED ON) -set(Boost_USE_STATIC_RUNTIME OFF) -set(Boost_DEBUG OFF) -set(Boost_DETAILED_FAILURE_MESSAGE OFF) - -set(BUILD_CUSTOM_BOOST FALSE) -if(FORCE_CUSTOM_BOOST) - set(BUILD_CUSTOM_BOOST TRUE) - message(STATUS "Force automatic build of Boost") - # Just to avoid unused variable warning from CMake - set(BOOST_INCLUDEDIR "") - set(BOOST_LIBRARYDIR "") -else() - # Read from cache, needed for rebuilds - set(BOOST_INCLUDEDIR ${Boost_INCLUDE_DIR}) - set(BOOST_LIBRARYDIR ${Boost_LIBRARY_DIR}) - find_package(Boost ${BOOST_MINIMUM_REQUIRED} COMPONENTS "${BOOST_COMPONENTS_REQUIRED}") - if(NOT Boost_FOUND) - set(BUILD_CUSTOM_BOOST TRUE) - endif() -endif() - -if(BUILD_CUSTOM_BOOST) - ## Preliminary work - # 0. Root directory for the custom build - set(CUSTOM_BOOST_LOCATION ${PROJECT_BINARY_DIR}/boost) - file(MAKE_DIRECTORY ${CUSTOM_BOOST_LOCATION}) - # 1. Where Boost will be built - set(BOOST_BUILD_DIR ${CUSTOM_BOOST_LOCATION}/boost_${BOOSTVER}) - # 2. Select toolset according to compilers specified by the user - set(toolset "") - if(CMAKE_CXX_COMPILER_ID MATCHES Intel) - set(toolset "intel-linux") - elseif(CMAKE_CXX_COMPILER_ID MATCHES Clang) - set(toolset "clang") - else() - if(CMAKE_SYSTEM_NAME MATCHES Darwin) - set(toolset "darwin") - else() - set(toolset "gcc") - endif() - endif() - string(TOLOWER ${CMAKE_BUILD_TYPE} type) - - # CMAKE_CURRENT_LIST_DIR is undefined in CMake 2.8.2 - # see https://public.kitware.com/Bug/print_bug_page.php?bug_id=11675 - # workaround: create CMAKE_CURRENT_LIST_DIR - get_filename_component(CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) - include(${CMAKE_CURRENT_LIST_DIR}/boost_unpack.cmake) - include(${CMAKE_CURRENT_LIST_DIR}/boost_userconfig.cmake) - - if(NOT "${BOOST_COMPONENTS_REQUIRED}" STREQUAL "") - # Non-empty list. Compiled libraries needed - # Transform the ;-separated list to a ,-separated list (digested by the Boost build toolchain!) - string(REPLACE ";" "," b2_needed_components "${BOOST_COMPONENTS_REQUIRED}") - # Replace unit_test_framework (used by CMake's find_package) with test (understood by Boost build toolchain) - string(REPLACE "unit_test_framework" "test" b2_needed_components "${b2_needed_components}") - set(select_libraries "--with-libraries=${b2_needed_components}") - string(REPLACE ";" ", " printout "${BOOST_COMPONENTS_REQUIRED}") - message(STATUS " Libraries to be built: ${printout}") - message(STATUS " Toolset to be used: ${toolset}") - include(${CMAKE_CURRENT_LIST_DIR}/boost_configure.cmake) - include(${CMAKE_CURRENT_LIST_DIR}/boost_build.cmake) - include(${CMAKE_CURRENT_LIST_DIR}/boost_install.cmake) - else() - # Empty list. Header-only libraries needed - # Just unpack to known location - message(STATUS " No libraries required, installing headers") - include(${CMAKE_CURRENT_LIST_DIR}/boost_headers.cmake) - endif() - - include(${CMAKE_CURRENT_LIST_DIR}/boost_cleanup.cmake) - add_custom_target(custom_boost DEPENDS ${CUSTOM_BOOST_LOCATION}/boost.cleanedup) - # 4. Set all variables related to Boost that find_package would have set - set(Boost_FOUND TRUE) - string(REGEX REPLACE "\\." "0" Boost_VERSION ${BOOST_MINIMUM_REQUIRED}) - math(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000") - math(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000") - math(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100") - set(Boost_LIB_VERSION ${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}) - set(Boost_INCLUDE_DIR ${CUSTOM_BOOST_LOCATION}/include CACHE PATH "Boost include directory" FORCE) - set(Boost_LIBRARY_DIR ${CUSTOM_BOOST_LOCATION}/lib CACHE PATH "Boost library directory" FORCE) - - foreach(_component ${BOOST_COMPONENTS_REQUIRED}) - string(TOUPPER ${_component} _COMP) - set(Boost_${_COMP}_FOUND TRUE) - set(Boost_${_COMP}_LIBRARY libboost_${_component}.a) - set(Boost_${_COMP}_LIBRARY_DEBUG ${Boost_LIBRARY_DIR}/${Boost_${_COMP}_LIBRARY} CACHE FILEPATH "Boost ${_component} library (debug)" FORCE) - set(Boost_${_COMP}_LIBRARY_RELEASE ${Boost_LIBRARY_DIR}/${Boost_${_COMP}_LIBRARY} CACHE FILEPATH "Boost ${_component} library (release)" FORCE) - list(APPEND Boost_LIBRARIES ${Boost_${_COMP}_LIBRARY}) - endforeach() - - set(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR}) - set(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIR}) - if(CMAKE_SYSTEM_NAME MATCHES Linux) - list(APPEND Boost_LIBRARIES rt) - endif() -endif() - -include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) - -link_directories(${Boost_LIBRARY_DIRS}) diff --git a/modules/boost/boost_build.cmake b/modules/boost/boost_build.cmake deleted file mode 100644 index bb3ef9a..0000000 --- a/modules/boost/boost_build.cmake +++ /dev/null @@ -1,13 +0,0 @@ -# (c) https://github.com/dev-cafe/autocmake/blob/master/AUTHORS.md -# licensed under BSD-3: https://github.com/dev-cafe/autocmake/blob/master/LICENSE - -# Build Boost -# This is not Windows-friendly! -add_custom_command( - OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.built - COMMAND ./b2 toolset=${toolset} variant=${type} link=static cxxflags=-fPIC - threading=multi --user-config=user-config.jam 1> ${CUSTOM_BOOST_LOCATION}/boost.built.log 2> ${CUSTOM_BOOST_LOCATION}/boost.built.err - COMMAND ${CMAKE_COMMAND} -E touch ${CUSTOM_BOOST_LOCATION}/boost.built - WORKING_DIRECTORY ${BOOST_BUILD_DIR} - DEPENDS ${CUSTOM_BOOST_LOCATION}/boost.configured - COMMENT "Building Boost") diff --git a/modules/boost/boost_cleanup.cmake b/modules/boost/boost_cleanup.cmake deleted file mode 100644 index ed165a7..0000000 --- a/modules/boost/boost_cleanup.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# (c) https://github.com/dev-cafe/autocmake/blob/master/AUTHORS.md -# licensed under BSD-3: https://github.com/dev-cafe/autocmake/blob/master/LICENSE - -# Clean-up -add_custom_command( - OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.cleanedup - COMMAND ${CMAKE_COMMAND} -E remove_directory ${BOOST_BUILD_DIR} - COMMAND ${CMAKE_COMMAND} -E touch ${CUSTOM_BOOST_LOCATION}/boost.cleanedup - WORKING_DIRECTORY ${CUSTOM_BOOST_LOCATION} - DEPENDS ${CUSTOM_BOOST_LOCATION}/boost.installed - COMMENT "Clean-up Boost") diff --git a/modules/boost/boost_configure.cmake b/modules/boost/boost_configure.cmake deleted file mode 100644 index 7f3a2cc..0000000 --- a/modules/boost/boost_configure.cmake +++ /dev/null @@ -1,15 +0,0 @@ -# (c) https://github.com/dev-cafe/autocmake/blob/master/AUTHORS.md -# licensed under BSD-3: https://github.com/dev-cafe/autocmake/blob/master/LICENSE - -# Run bootstrap.sh to configure the build. We will install in ${PROJECT_BINARY_DIR}/boost -# This is not Windows-friendly! -add_custom_command( - OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.configured - COMMAND ./bootstrap.sh --with-toolset=${toolset} - ${select_libraries} - --with-python=${PYTHON_EXECUTABLE} - --prefix=${CUSTOM_BOOST_LOCATION} 1> ${CUSTOM_BOOST_LOCATION}/boost.configured.log 2> ${CUSTOM_BOOST_LOCATION}/boost.configured.err - COMMAND ${CMAKE_COMMAND} -E touch ${CUSTOM_BOOST_LOCATION}/boost.configured - WORKING_DIRECTORY ${BOOST_BUILD_DIR} - DEPENDS ${CUSTOM_BOOST_LOCATION}/boost.user-config - COMMENT "Configuring Boost") diff --git a/modules/boost/boost_headers.cmake b/modules/boost/boost_headers.cmake deleted file mode 100644 index d33c351..0000000 --- a/modules/boost/boost_headers.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# (c) https://github.com/dev-cafe/autocmake/blob/master/AUTHORS.md -# licensed under BSD-3: https://github.com/dev-cafe/autocmake/blob/master/LICENSE - -# Install Boost -add_custom_command( - OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.installed - COMMAND ${CMAKE_COMMAND} -E copy_directory ${BOOST_BUILD_DIR}/boost ${CUSTOM_BOOST_LOCATION}/include/boost - COMMAND ${CMAKE_COMMAND} -E touch ${CUSTOM_BOOST_LOCATION}/boost.installed - WORKING_DIRECTORY ${BOOST_BUILD_DIR} - DEPENDS ${CUSTOM_BOOST_LOCATION}/boost.user-config - COMMENT "Installing Boost headers") diff --git a/modules/boost/boost_install.cmake b/modules/boost/boost_install.cmake deleted file mode 100644 index 1788321..0000000 --- a/modules/boost/boost_install.cmake +++ /dev/null @@ -1,13 +0,0 @@ -# (c) https://github.com/dev-cafe/autocmake/blob/master/AUTHORS.md -# licensed under BSD-3: https://github.com/dev-cafe/autocmake/blob/master/LICENSE - -# Install Boost -# This is not Windows-friendly! -add_custom_command( - OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.installed - COMMAND ./b2 install toolset=${toolset} variant=${type} link=static - threading=multi --user-config=user-config.jam 1> ${CUSTOM_BOOST_LOCATION}/boost.installed.log 2> ${CUSTOM_BOOST_LOCATION}/boost.installed.err - COMMAND ${CMAKE_COMMAND} -E touch ${CUSTOM_BOOST_LOCATION}/boost.installed - WORKING_DIRECTORY ${BOOST_BUILD_DIR} - DEPENDS ${CUSTOM_BOOST_LOCATION}/boost.built - COMMENT "Installing Boost headers and libs") diff --git a/modules/boost/boost_unpack.cmake b/modules/boost/boost_unpack.cmake deleted file mode 100644 index 9ccd600..0000000 --- a/modules/boost/boost_unpack.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# (c) https://github.com/dev-cafe/autocmake/blob/master/AUTHORS.md -# licensed under BSD-3: https://github.com/dev-cafe/autocmake/blob/master/LICENSE - -# Unpack Boost -add_custom_command( - OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.unpacked - COMMAND ${CMAKE_COMMAND} -E tar xzf ${BOOST_ARCHIVE_LOCATION}/${BOOST_ARCHIVE} - COMMAND ${CMAKE_COMMAND} -E touch boost.unpacked - DEPENDS ${BOOST_ARCHIVE_LOCATION}/${BOOST_ARCHIVE} - WORKING_DIRECTORY ${CUSTOM_BOOST_LOCATION} - COMMENT "Unpacking Boost") diff --git a/modules/boost/boost_userconfig.cmake b/modules/boost/boost_userconfig.cmake deleted file mode 100644 index 875dcd5..0000000 --- a/modules/boost/boost_userconfig.cmake +++ /dev/null @@ -1,18 +0,0 @@ -# (c) https://github.com/dev-cafe/autocmake/blob/master/AUTHORS.md -# licensed under BSD-3: https://github.com/dev-cafe/autocmake/blob/master/LICENSE - -# To get boost to compile MPI we need to append "using mpi ;" to the end of the -# user-config.jam file. MPI_SENT will be the command we append -set(MPI_SENT "") -if(ENABLE_MPI AND MPI_FOUND) - set(MPI_SENT "using mpi \;") -endif() -file(WRITE ${CUSTOM_BOOST_LOCATION}/user-config.jam ${MPI_SENT}) -# Write user-config.jam -add_custom_command( - OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.user-config - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CUSTOM_BOOST_LOCATION}/user-config.jam ${BOOST_BUILD_DIR}/user-config.jam - COMMAND ${CMAKE_COMMAND} -E touch boost.user-config - DEPENDS ${CUSTOM_BOOST_LOCATION}/boost.unpacked - WORKING_DIRECTORY ${CUSTOM_BOOST_LOCATION} - COMMENT "Generating user-config.jam") diff --git a/test/boost_header_only/cmake/autocmake.yml b/test/boost_header_only/cmake/autocmake.yml deleted file mode 100644 index b96b88c..0000000 --- a/test/boost_header_only/cmake/autocmake.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: example -min_cmake_version: 2.8 -language: CXX -default_build_type: debug -modules: -- cxx: - - source: ../../../modules/cxx.cmake -- boost: - - major: 1 - - minor: 48 - - patch: 0 - - source: ../../../modules/boost/boost.cmake -- default_build_paths: - - source: ../../../modules/default_build_paths.cmake -- src: - - source: ../../../modules/src.cmake diff --git a/test/boost_header_only/src/CMakeLists.txt b/test/boost_header_only/src/CMakeLists.txt deleted file mode 100644 index 2d487d5..0000000 --- a/test/boost_header_only/src/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_executable(example example.cpp) diff --git a/test/boost_header_only/src/example.cpp b/test/boost_header_only/src/example.cpp deleted file mode 100644 index ccc360f..0000000 --- a/test/boost_header_only/src/example.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include -#include - -int main() -{ - std::cout << "Boost version: " - << BOOST_VERSION / 100000 - << "." - << BOOST_VERSION / 100 % 1000 - << "." - << BOOST_VERSION % 100 - << std::endl; - - std::cout << "PASSED" << std::endl; - - return 0; -} diff --git a/test/boost_libs/cmake/autocmake.yml b/test/boost_libs/cmake/autocmake.yml deleted file mode 100644 index 1eb5510..0000000 --- a/test/boost_libs/cmake/autocmake.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: example -min_cmake_version: 2.8 -language: CXX -default_build_type: debug -modules: -- cxx: - - source: ../../../modules/cxx.cmake -- mpi: - - source: ../../../modules/mpi.cmake -- python_interpreter: - - source: ../../../modules/python_interpreter.cmake -- python_libs: - - source: ../../../modules/python_libs.cmake -- boost: - - major: 1 - - minor: 59 - - patch: 0 - - components: 'mpi;serialization;python' - - source: ../../../modules/boost/boost.cmake -- default_build_paths: - - source: ../../../modules/default_build_paths.cmake -- src: - - source: ../../../modules/src.cmake diff --git a/test/boost_libs/src/CMakeLists.txt b/test/boost_libs/src/CMakeLists.txt deleted file mode 100644 index 791ed78..0000000 --- a/test/boost_libs/src/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -add_executable(example example.cpp) - -if(BUILD_CUSTOM_BOOST) - add_dependencies(example custom_boost) -endif() - -target_link_libraries(example ${Boost_MPI_LIBRARY} ${Boost_SERIALIZATION_LIBRARY} ${MPI_CXX_LIBRARIES} - ${Boost_PYTHON_LIBRARY} ${PYTHON_LIBRARIES}) diff --git a/test/boost_libs/src/example.cpp b/test/boost_libs/src/example.cpp deleted file mode 100644 index b5fe3cc..0000000 --- a/test/boost_libs/src/example.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include - -#include -#include -#include -#include - -int main() -{ - using namespace boost::python; - namespace mpi = boost::mpi; - - std::cout << "Boost version: " - << BOOST_VERSION / 100000 - << "." - << BOOST_VERSION / 100 % 1000 - << "." - << BOOST_VERSION % 100 - << std::endl; - - try { - Py_Initialize(); - - object main_module(( - handle<>(borrowed(PyImport_AddModule("__main__"))))); - - object main_namespace = main_module.attr("__dict__"); - - handle<> ignored(( PyRun_String( "print \"Hello, World\"", - Py_file_input, - main_namespace.ptr(), - main_namespace.ptr() ) )); - } catch( error_already_set ) { - PyErr_Print(); - } - - mpi::environment env; - mpi::communicator world; - std::cout << "I am process " << world.rank() << " of " << world.size() - << "." << std::endl; - - std::cout << "PASSED" << std::endl; - - return 0; -} diff --git a/test/test.py b/test/test.py index ef93831..d451f27 100644 --- a/test/test.py +++ b/test/test.py @@ -149,12 +149,3 @@ def test_python_libs_custom(): configure_build_and_exe( 'python_libs_custom', 'python setup --cxx=g++ --python={0}'.format(python_executable)) - - -def test_boost_header_only(): - configure_build_and_exe('boost_header_only', 'python setup --cxx=g++') - - -@skip_on_osx -def test_boost_libs(): - configure_build_and_exe('boost_libs', 'python setup --cxx=g++ --mpi')