Re: [CMake] Alternative locations for boost in cmake

2019-10-25 Thread Mahmood Naderan via CMake
>you have a "case discrepancy" between:
>BOOST_INCLUDE_DIR
>and>Boost_LIBRARY_DIRS


Yes. Thank you
Boost_LIBRARY_DIRandBoost_INCLUDE_DIR


Are correct. The cmake is now fine.


Regards,
Mahmood 

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Alternative locations for boost in cmake

2019-10-25 Thread Mateusz Loskot
On Fri, 25 Oct 2019 at 09:54, Mahmood Naderan  wrote:
>
> Even with the latest 3.15.4, I get the same error
>
>   Could NOT find Boost (missing: Boost_INCLUDE_DIR system filesystem timer
>   chrono) (Required is at least version "1.58")

You can try `-DBoost_DEBUG=ON that may give more clues what is happening

In some situations (environment, toolset, Boost build layout, etc.)
FindBoost.cmake,
which by the way is a **guesser** not a rock solid configuration file
like pkg-config that never fails,
may need some extra hints.
Here is copy of suggestions from project I maintain
https://github.com/boostorg/gil/blob/develop/CONTRIBUTING.md#using-cmake

```
TIP: If CMake is failing to find Boost libraries, especially built
with --layout=versioned, you can try a few hacks:

-DBoost_ARCHITECTURE=-x64 to help CMake find Boost 1.66 and above add
an architecture tag to the library file names in versioned build The
option added in CMake 3.13.0.

-DBoost_COMPILER=-gcc5 or -DBoost_COMPILER=-vc141 to help CMake
earlier than 3.13 match your compiler with toolset used in the Boost
library file names (i.e. libboost_unit_test_framework-gcc5-mt-x64-1_69
and not -gcc55-). Fixed in CMake 3.13.0.

if CMake is still failing to find Boost, you may try -DBoost_DEBUG=ON
to get detailed diagnostics output from FindBoost.cmake module.
```

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Alternative locations for boost in cmake

2019-10-25 Thread Eric Noulard
Le ven. 25 oct. 2019 à 09:55, Mahmood Naderan via CMake  a
écrit :

> Even with the latest 3.15.4, I get the same error
>
>
> $ cmake --version
> cmake version 3.15.4
>
> CMake suite maintained and supported by Kitware (kitware.com/cmake).
> $ cmake -DBoost_NO_SYSTEM_PATHS=ON
> -DBOOST_INCLUDE_DIR=/storage/users/mnaderan/boost_1_65_1/build/include/
> -DBoost_LIBRARY_DIRS=/storage/users/mnaderan/boost_1_65_1/build/lib/
> -DBoost_ADDITIONAL_VERSIONS=1.65.1 ..
>


could you try:
$ cmake -DBoost_NO_SYSTEM_PATHS=ON
-DBOOST_ROOT=/storage/users/mnaderan/boost_1_65_1
-DBoost_ADDITIONAL_VERSIONS=1.65.1

you have a "case discrepancy" between:
BOOST_INCLUDE_DIR
and
Boost_LIBRARY_DIRS

and the error says:

"missing: Boost_INCLUDE_DIR"

FindBoost should be case tolerant for backward compat' issue but may be
this does not work when specifying hint var in mixed case (wild guess).

-- 
Eric
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Alternative locations for boost in cmake

2019-10-25 Thread Mahmood Naderan via CMake
Even with the latest 3.15.4, I get the same error

$ cmake --version
cmake version 3.15.4

CMake suite maintained and supported by Kitware (kitware.com/cmake).
$ cmake -DBoost_NO_SYSTEM_PATHS=ON 
-DBOOST_INCLUDE_DIR=/storage/users/mnaderan/boost_1_65_1/build/include/ 
-DBoost_LIBRARY_DIRS=/storage/users/mnaderan/boost_1_65_1/build/lib/ 
-DBoost_ADDITIONAL_VERSIONS=1.65.1 ..
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda-10.0 (found suitable version "10.0", minimum 
required is "7.5")
-- Could NOT find Boost
CMake Error at 
/storage/users/mnaderan/tools/cmake-3.15.4/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137
 (message):
  Could NOT find Boost (missing: Boost_INCLUDE_DIR system filesystem timer
  chrono) (Required is at least version "1.58")
Call Stack (most recent call first):
  
/storage/users/mnaderan/tools/cmake-3.15.4/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378
 (_FPHSA_FAILURE_MESSAGE)
  
/storage/users/mnaderan/tools/cmake-3.15.4/share/cmake-3.15/Modules/FindBoost.cmake:2161
 (find_package_handle_standard_args)
  cmake/FindBoost.cmake:6 (FIND_PACKAGE)
  CMakeLists.txt:47 (include)


-- Configuring incomplete, errors occurred!



Regards,
Mahmood 

On Thursday, October 24, 2019, 10:52:37 PM GMT+3:30, Mateusz Loskot 
 wrote:  
 
 You are using very old CMake 3.9 which has no idea about Boost 1.65
https://github.com/Kitware/CMake/blob/v3.9.0/Modules/FindBoost.cmake#L769

Rule #1: Use latest version of CMake, ALWAYS!

There is absolutely no reason or excuse to not to use the latest as there are
- deb packages available https://apt.kitware.com/
- generic installer for any Linux and Windows

Updating CMake is easy-peasy for us lazy programmers with a bit of scripting:
https://github.com/mloskot/wsl-config/blob/master/scripts/install-cmake-latest.sh
https://github.com/mloskot/wsl-config/blob/master/scripts/install-cmake-latest.ps1

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
  -- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Alternative locations for boost in cmake

2019-10-24 Thread Mateusz Loskot
On Thu, 24 Oct 2019 at 20:44, Mahmood Naderan  wrote:
>
> Thank you. I tried this command:
>
> cmake -DBoost_NO_SYSTEM_PATHS=ON 
> -DBOOST_INCLUDE_DIR=/storage/users/mnaderan/boost_1_65_1/build/include/ 
> -DBoost_LIBRARY_DIRS=/storage/users/mnaderan/boost_1_65_1/build/lib/ 
> -DBoost_ADDITIONAL_VERSIONS=1.65.1 ..
>
> The paths are correct as you can see below:
>
> $ ls /storage/users/mnaderan/boost_1_65_1/build/lib/
> libboost_atomic.a  libboost_math_tr1l.so.1.65.1
> libboost_atomic.so libboost_math_tr1.so

>
> However, the cmake command fails with the following error message
>
> -- Could NOT find Boost
> CMake Warning at 
> /storage/users/mnaderan/tools/cmake-3.9.0/share/cmake-3.9/Modules/FindBoost.cmake:769
>  (message):
>   Imported targets not available for Boost version

You are using very old CMake 3.9 which has no idea about Boost 1.65
https://github.com/Kitware/CMake/blob/v3.9.0/Modules/FindBoost.cmake#L769

Rule #1: Use latest version of CMake, ALWAYS!

There is absolutely no reason or excuse to not to use the latest as there are
- deb packages available https://apt.kitware.com/
- generic installer for any Linux and Windows

Updating CMake is easy-peasy for us lazy programmers with a bit of scripting:
https://github.com/mloskot/wsl-config/blob/master/scripts/install-cmake-latest.sh
https://github.com/mloskot/wsl-config/blob/master/scripts/install-cmake-latest.ps1

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Alternative locations for boost in cmake

2019-10-24 Thread Mahmood Naderan via CMake
Thank you. I tried this command:
cmake -DBoost_NO_SYSTEM_PATHS=ON 
-DBOOST_INCLUDE_DIR=/storage/users/mnaderan/boost_1_65_1/build/include/ 
-DBoost_LIBRARY_DIRS=/storage/users/mnaderan/boost_1_65_1/build/lib/ 
-DBoost_ADDITIONAL_VERSIONS=1.65.1 ..

The paths are correct as you can see below:

$ ls /storage/users/mnaderan/boost_1_65_1/build/lib/
libboost_atomic.a  libboost_math_tr1l.so.1.65.1
libboost_atomic.so libboost_math_tr1.so
...


$ ls /storage/users/mnaderan/boost_1_65_1/build/include/boost/
accumulators  geometry   preprocessor.hpp
algorithm geometry.hpp   process
align get_pointer.hpp    process.hpp
...


I didn't paste all files though.

However, the cmake command fails with the following error message
-- Could NOT find Boost
CMake Warning at 
/storage/users/mnaderan/tools/cmake-3.9.0/share/cmake-3.9/Modules/FindBoost.cmake:769
 (message):
  Imported targets not available for Boost version
Call Stack (most recent call first):
  
/storage/users/mnaderan/tools/cmake-3.9.0/share/cmake-3.9/Modules/FindBoost.cmake:873
 (_Boost_COMPONENT_DEPENDENCIES)
  
/storage/users/mnaderan/tools/cmake-3.9.0/share/cmake-3.9/Modules/FindBoost.cmake:1501
 (_Boost_MISSING_DEPENDENCIES)
  cmake/FindBoost.cmake:6 (FIND_PACKAGE)
  CMakeLists.txt:47 (include)


CMake Warning at 
/storage/users/mnaderan/tools/cmake-3.9.0/share/cmake-3.9/Modules/FindBoost.cmake:769
 (message):
  Imported targets not available for Boost version
Call Stack (most recent call first):
  
/storage/users/mnaderan/tools/cmake-3.9.0/share/cmake-3.9/Modules/FindBoost.cmake:873
 (_Boost_COMPONENT_DEPENDENCIES)
  
/storage/users/mnaderan/tools/cmake-3.9.0/share/cmake-3.9/Modules/FindBoost.cmake:1501
 (_Boost_MISSING_DEPENDENCIES)
  cmake/FindBoost.cmake:6 (FIND_PACKAGE)
  CMakeLists.txt:47 (include)


CMake Warning at 
/storage/users/mnaderan/tools/cmake-3.9.0/share/cmake-3.9/Modules/FindBoost.cmake:769
 (message):
  Imported targets not available for Boost version
Call Stack (most recent call first):
  
/storage/users/mnaderan/tools/cmake-3.9.0/share/cmake-3.9/Modules/FindBoost.cmake:873
 (_Boost_COMPONENT_DEPENDENCIES)
  
/storage/users/mnaderan/tools/cmake-3.9.0/share/cmake-3.9/Modules/FindBoost.cmake:1501
 (_Boost_MISSING_DEPENDENCIES)
  cmake/FindBoost.cmake:6 (FIND_PACKAGE)
  CMakeLists.txt:47 (include)




Regards,
Mahmood 

On Thursday, October 24, 2019, 9:01:53 PM GMT+3:30, Mateusz Loskot 
 wrote:  
When you read word `variables` in CMake documentation,
it means CMake variables (also known as cache entries).
Otherwise, it would be qualified using word `environment`.

The CMake variables can be set via command line option -D [1]

[1] https://cmake.org/cmake/help/latest/manual/cmake.1.html

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
  -- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Alternative locations for boost in cmake

2019-10-24 Thread Mateusz Loskot
On Thu, 24 Oct 2019 at 19:05, Mahmood Naderan via CMake  wrote:
>
> I have read https://cmake.org/cmake/help/v3.0/module/FindBoost.html which 
> states some variables for boost library.
> I want to know where should I set these variables. For example, in the 
> terminal, I have written
>
> $ export Boost_NO_SYSTEM_PATHS=ON

When you read word `variables` in CMake documentation,
it means CMake variables (also known as cache entries).
Otherwise, it would be qualified using word `environment`.

The CMake variables can be set via command line option -D [1]

[1] https://cmake.org/cmake/help/latest/manual/cmake.1.html

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


[CMake] Alternative locations for boost in cmake

2019-10-24 Thread Mahmood Naderan via CMake
Hi,
I have read https://cmake.org/cmake/help/v3.0/module/FindBoost.html which 
states some variables for boost library. I want to know where should I set 
these variables. For example, in the terminal, I have written
$ export Boost_NO_SYSTEM_PATHS=ON
However, after I run "cmake ..", I see:

-- Boost version: 1.63.0
-- Boost version: 1.63.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   timer
--   chrono



That is system boost and I don't want that.Any idea?

Regards,
Mahmood-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake