Re: [CMake] Issue with non-system gcc path

2019-11-02 Thread Mahmood Naderan via CMake
OK. The OS is centos-6.9 which is pretty old. I think I may hit other errors 
later.I will try to find another way. Thank you.

Regards,
Mahmood 

On Saturday, November 2, 2019, 5:24:05 PM GMT+3:30, Rainer Poisel 
 wrote:  
 
 Hi Mahmood,

I think there is a problem with your toolchain. Maybe there is an
environment variable (hot guess: LD_LIBRARY_PATH or something similar)
missing.

Have a look into the following files in your build directory:
  * CMakeFiles/CMakeOutput.log and
  * CMakeFiles/CMakeError.log

Maybe there is some helpful information there?

Best regards,
  Rainer

On Sat, Nov 2, 2019 at 2:36 PM Mahmood Naderan via CMake
 wrote:
>
> Hi,
>
> May I know what is wrong with the specifying a non-system gcc path?
>
>
> $ cmake .. -DCMAKE_C_COMPILER=/storage/users/mnaderan/tools/gcc-6.1.0/bin/gcc 
> -DCMAKE_CXX_COMPILER=/storage/users/mnaderan/tools/gcc-6.1.0/bin/g++          
>                         -- The C compiler identification is unknown
> -- The CXX compiler identification is unknown
> -- Check for working C compiler: 
> /storage/users/mnaderan/tools/gcc-6.1.0/bin/gcc
> -- Check for working C compiler: 
> /storage/users/mnaderan/tools/gcc-6.1.0/bin/gcc -- broken
> CMake Error at 
> /storage/users/mnaderan/tools/cmake-3.15.4/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60
>  (message):
>  The C compiler
>
>    "/storage/users/mnaderan/tools/gcc-6.1.0/bin/gcc"
>
>  is not able to compile a simple test program.
>
>  It fails with the following output:
>
>
>
>
> 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
  -- 

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] Issue with non-system gcc path

2019-11-02 Thread Mahmood Naderan via CMake
Hi,
May I know what is wrong with the specifying a non-system gcc path?

$ cmake .. -DCMAKE_C_COMPILER=/storage/users/mnaderan/tools/gcc-6.1.0/bin/gcc 
-DCMAKE_CXX_COMPILER=/storage/users/mnaderan/tools/gcc-6.1.0/bin/g++
   -- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: /storage/users/mnaderan/tools/gcc-6.1.0/bin/gcc
-- Check for working C compiler: 
/storage/users/mnaderan/tools/gcc-6.1.0/bin/gcc -- broken
CMake Error at 
/storage/users/mnaderan/tools/cmake-3.15.4/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60
 (message):
  The C compiler

    "/storage/users/mnaderan/tools/gcc-6.1.0/bin/gcc"

  is not able to compile a simple test program.

  It fails with the following output:




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 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] [DKIM: Failed] Re: Alternative locations for boost in cmake

2019-10-25 Thread Mahmood Naderan via CMake
Thank you. In addition to that, I have to write -DBoost_INCLUDE_DIR and not 
-DBOOST_INCLUDE_DIR
It is not fine.

Regards,
Mahmood 

On Friday, October 25, 2019, 11:54:43 AM GMT+3:30, Marcel Loose 
 wrote:  
 
  
Hi Mahmood,
 
I think that "-DBoost_LIBRARY_DIRS" should be "-DBoost_LIBRARY_DIR".
 
Cheers,
 Marcel Loose.
 

  -- 

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 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


[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


Re: [CMake] Custom installation of cmake

2019-10-21 Thread Mahmood Naderan via CMake
Thanks. I found it much easier to use the installer package (.sh file).
I wanted a new gcc for building cmake. since the system default is 4.8.5. 
The installer package is available and installed that to my custom folder.

Regards,
Mahmood 

On Sunday, October 20, 2019, 8:58:25 PM GMT+3:30, Raymond Wan 
 wrote:  
 
 Hi Mahmood,

Did you try typing "./bootstrap --help"?

Perhaps something there is what you need?

Ray

  -- 

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] Custom installation of cmake

2019-10-19 Thread Mahmood Naderan via CMake
OK and how about custom installation path of cmake?

Regards,
Mahmood 

On Saturday, October 19, 2019, 4:44:28 PM GMT+3:30, 15 knots 
 wrote:  
 
 What worked for me, is to add 'ools/gcc-7.1.0/bin/' in front of the
PATh environment variable for the time cmake is invoked. E.g from
bash.
PATH=tools/gcc-7.1.0/bin/;$PATH cmake -G ...

Martin
  -- 

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] Custom installation of cmake

2019-10-19 Thread Mahmood Naderan via CMake
 Hi
I would like to compile cmake source with a non default gcc version. That is, I 
have built gcc in my home$ ls tools/gcc-7.1.0/bin/
c++  gcc-ar  gcov-dumpx86_64-pc-linux-gnu-gcc
x86_64-pc-linux-gnu-gcc-ranlib
cpp  gcc-nm  gcov-toolx86_64-pc-linux-gnu-gcc-7.1.0
g++  gcc-ranlib  x86_64-pc-linux-gnu-c++  x86_64-pc-linux-gnu-gcc-ar
gcc  gcovx86_64-pc-linux-gnu-g++  x86_64-pc-linux-gnu-gcc-nm
and 
$ ls ~/cmake-3.14.6
Auxiliary   CMakeFiles  configure 
doxygen.config  Source
bootstrap   CMakeGraphVizOptions.cmake  CONTRIBUTING.rst  
HelpTemplates
Bootstrap.cmk   CMakeLists.txt  Copyright.txt 
LicensesTests
CMakeCache.txt  CMakeLogo.gif   CTestConfig.cmake 
Modules Utilities
CMakeCPack.cmakecmake_uninstall.cmake.inCTestCustom.cmake.in  
Packaging
CMakeCPackOptions.cmake.in  CompileFlags.cmake  DartConfig.cmake  
README.rst
In the manual, it is only stated to build cmake with the default options which 
will install cmake in the system paths.
./bootstrap
make
make install
I want to give it my gcc and install it in my home. How can I do that?
 

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