boostorg / compute

A C++ GPU Computing Library for OpenCL
http://boostorg.github.io/compute/
Boost Software License 1.0
1.56k stars 332 forks source link

Fail in compiling test_program.cpp when using bjam to build this project #843

Open yuxianch opened 5 years ago

yuxianch commented 5 years ago

Hi all, I noticed that there are CMakeLists.txt and Jamfile.v2 under compute/test directory. When I tried to use bjam to build, I got errors when running tests. For example, when compiling test_program.cpp, I saw errors like this:

test_program.cpp:136:27: error: unknown type name 'BOOST_COMPUTE_TEST_DATA_PATH'
    std::string file_path(BOOST_COMPUTE_TEST_DATA_PATH);
                          ^
test_program.cpp:136:26: warning: parentheses were disambiguated as a function
      declaration [-Wvexing-parse]
    std::string file_path(BOOST_COMPUTE_TEST_DATA_PATH);
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

However, "BOOST_COMPUTE_TEST_DATA_PATH" is defined in CMakeLists.txt. So, this test should be compiled successfully if I use cmake to build this project, but why does Jamfile.v2 exist in this project? Should Jamfile.v2 be updated?