Skip to content

Commit

Permalink
Modernize cmake build system
Browse files Browse the repository at this point in the history
Provide VexCL::OpenCL, VexCL::Compute, VexCL::CUDA, VexCL::JIT imported
targets, so that users may just

    add_executable(myprogram myprogram.cpp)
    target_link_libraries(myprogram VexCL::OpenCL)

to build a program using the corresponding VexCL backend.
Also stop polluting global cmake namespace with things like
add_definitions(), include_directories(), etc.
  • Loading branch information
ddemidov committed Apr 18, 2017
1 parent 6c6e633 commit 19ee965
Show file tree
Hide file tree
Showing 11 changed files with 339 additions and 179 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Expand Up @@ -11,7 +11,7 @@ before_build:
#- type msiexec.log
build_script:
- mkdir build && cd build
- cmake -G"Visual Studio 14 Win64" ..
- cmake -G"Visual Studio 14 Win64" -DVEXCL_BUILD_EXAMPLES=ON -DVEXCL_BUILD_TESTS=ON ..
- cmake --build . --config Release
test_script:
- ctest --output-on-failure
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -41,7 +41,7 @@ before_install:
- . .travis/install_boost.sh;
script:
- mkdir -p build && cd build
- cmake -DTEST_COVERAGE=ON -DVEXCL_BACKEND=${VEXCL_BACKEND} ..
- cmake -DTEST_COVERAGE=ON -DVEXCL_BUILD_TESTS=ON -DVEXCL_BUILD_EXAMPLES=ON -DVEXCL_BACKEND=${VEXCL_BACKEND} ..
- make
- export CPATH=${CPATH}:${BOOST_ROOT}
- ./examples/devlist && ctest --output-on-failure
Expand Down

0 comments on commit 19ee965

Please sign in to comment.