dpilger26 / NumCpp

C++ implementation of the Python Numpy library
https://dpilger26.github.io/NumCpp
MIT License
3.59k stars 554 forks source link

Installation of Numcpp ignores -DNUMCPP_NO_USE_BOOST=ON #211

Closed kapton-marvel closed 7 months ago

kapton-marvel commented 7 months ago

Describe the bug When trying to use cmake to install NumCPP with the following commands

mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/Users/username/libraries/NumCpp -DNUMCPP_NO_USE_BOOST=ON
make install

The library is built and installed in the library directory, then testing the numcpp eigen example the follow error is produced.

/Users/username/ibraries/NumCpp/include/NumCpp/DateTime/DateTime.hpp:41:10 'boost/date_time/posix_time/posix_time.hpp' file not found

Adding the library boost in the same library directory allows for successful compilation without rebuilding.

It seems the flag is ignored.

To Reproduce Steps to reproduce the behaviour :

mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/Users/username/libraries/NumCpp -DNUMCPP_NO_USE_BOOST=ON
make install

Add Numcpp installation folder to header search path with recursive search within Xcode.

Expected behavior The example program to build without boost.

Screenshots

image

Additional context Numcpp v2.12.1 Xcode v15 boost v1.84 macOS 14.4.1 M2 processor

dpilger26 commented 7 months ago

NUMCPP_NO_USE_BOOST is a compiler definition that you would need to pass to your build tool for your project. It has nothing to do with installation of the NumCpp library.

kapton-marvel commented 7 months ago

Thank you, I've added -DNUMCPP_NO_USE_BOOST=ON to the Other C++ Flags within Xcode, and it compiles successfully.

And much faster than with boost!