About FindBoost.cmake

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

About FindBoost.cmake

Osman Zakir
Hi again, everyone.

I noticed that FindBoost.cmake has "-d" set as the Boost debug ABI tag even though the Boost libraries actually use "-gd".  I installed the latet release of CMake just now, which has Boost 1.68.0 listed as a test version, and it has this problem too.  For Boost.Filesystem, if it's an x64 multithreaded debug lib (just take this as an example), the filename is "libboost_filesystem-vc141-mt-gd-x64-1_68.lib".  For x86 it'd be "libboost_filesystem-vc141-mt-gd-x32-1_68.lib".  

Just thought I'd send this email to report this.  

--

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
Reply | Threaded
Open this post in threaded view
|

Re: About FindBoost.cmake

Michael Ellery
I’m guessing you want to set Boost_USE_DEBUG_RUNTIME:

https://github.com/Kitware/CMake/blob/master/Modules/FindBoost.cmake#L1467


> On Oct 29, 2018, at 4:29 PM, Osman Zakir <[hidden email]> wrote:
>
> Hi again, everyone.
>
> I noticed that FindBoost.cmake has "-d" set as the Boost debug ABI tag even though the Boost libraries actually use "-gd".  I installed the latet release of CMake just now, which has Boost 1.68.0 listed as a test version, and it has this problem too.  For Boost.Filesystem, if it's an x64 multithreaded debug lib (just take this as an example), the filename is "libboost_filesystem-vc141-mt-gd-x64-1_68.lib".  For x86 it'd be "libboost_filesystem-vc141-mt-gd-x32-1_68.lib".  
>
> Just thought I'd send this email to report this.  
> --
>
> 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
Reply | Threaded
Open this post in threaded view
|

Re: About FindBoost.cmake

Mateusz Loskot
In reply to this post by Osman Zakir
On Tue, 30 Oct 2018 at 00:29, Osman Zakir <[hidden email]> wrote:
>
> I noticed that FindBoost.cmake has "-d" set as the Boost debug ABI tag even though the Boost libraries actually use "-gd".

-d comes from variant=debug option when you build Boost
-g comes from runtime-debugging=on

You've got it explained here
https://www.boost.org/doc/libs/1_68_0/more/getting_started/windows.html

> I installed the latet release of CMake just now, which has Boost 1.68.0 listed as a test version, and it has this problem too.

IMO, what you describe is not a problem.
-gd is perfectly valid combination, and on Windows where versioned
layout of Boost is the default, you will see names like

d:\boost.win\stage\lib>ls -1 *file*
libboost_filesystem-vc141-mt-gd-x32-1_69.lib
libboost_filesystem-vc141-mt-gd-x64-1_69.lib
libboost_filesystem-vc141-mt-x32-1_69.lib
libboost_filesystem-vc141-mt-x64-1_69.lib

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
--
Mateusz Loskot
http://mateusz.loskot.net
Reply | Threaded
Open this post in threaded view
|

Re: About FindBoost.cmake

Mateusz Loskot
On Tue, 30 Oct 2018 at 10:17, Osman Zakir <[hidden email]> wrote:
>
> Yes, but this might also be why it can't find more than "some" of the Boost libraries.  It looks for "-d" even though I'm using the "-gd" ones.

How do you know it looks for -d?
Sorry, but you are not showing any cmake command line,
any bit of your CMakeLists.txt how you invoke find_package,
and nothing from output you are getting.

set(Boost_DEBUG ON)
find_package(Boost 1.68.0 REQUIRED COMPONENTS filesystem)

then, in a sample project

mkdir build
cd build
cmake ..

and it looks for -gd

-- [ C:/Program
Files/CMake/share/cmake-3.12/Modules/FindBoost.cmake:1430 ]
_boost_MULTITHREADED = -mt
-- [ C:/Program
Files/CMake/share/cmake-3.12/Modules/FindBoost.cmake:1506 ]
_boost_RELEASE_ABI_TAG = -
-- [ C:/Program
Files/CMake/share/cmake-3.12/Modules/FindBoost.cmake:1508 ]
_boost_DEBUG_ABI_TAG = -gd

FindBoost is a complex animal, it deals with tons of cases, it
frequently stops working.
So, crystal sphere -based investigation does not quite apply :)

BTW, pease respond to the mailing list, not privately.

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
--
Mateusz Loskot
http://mateusz.loskot.net
Reply | Threaded
Open this post in threaded view
|

Re: About FindBoost.cmake

Mateusz Loskot
On Tue, 30 Oct 2018 at 10:24, Mateusz Loskot <[hidden email]> wrote:

> On Tue, 30 Oct 2018 at 10:17, Osman Zakir <[hidden email]> wrote:
> >
> > Yes, but this might also be why it can't find more than "some" of the Boost libraries.  It looks for "-d" even though I'm using the "-gd" ones.
>
> How do you know it looks for -d?
> Sorry, but you are not showing any cmake command line,
> any bit of your CMakeLists.txt how you invoke find_package,
> and nothing from output you are getting.
>
> set(Boost_DEBUG ON)
> find_package(Boost 1.68.0 REQUIRED COMPONENTS filesystem)
>
> then, in a sample project
>
> mkdir build
> cd build
> cmake ..
>
> and it looks for -gd
>
> -- [ C:/Program
> Files/CMake/share/cmake-3.12/Modules/FindBoost.cmake:1430 ]
> _boost_MULTITHREADED = -mt
> -- [ C:/Program
> Files/CMake/share/cmake-3.12/Modules/FindBoost.cmake:1506 ]
> _boost_RELEASE_ABI_TAG = -
> -- [ C:/Program
> Files/CMake/share/cmake-3.12/Modules/FindBoost.cmake:1508 ]
> _boost_DEBUG_ABI_TAG = -gd

I've run some test.

I've got Boost (current develop branch) build in stage directory, as
you see it is --layout=versioned

D:\boost.win\stage\lib (develop -> origin)  ls -1 *system*
libboost_filesystem-vc141-mt-gd-x32-1_69.lib
libboost_filesystem-vc141-mt-gd-x64-1_69.lib
libboost_filesystem-vc141-mt-x32-1_69.lib
libboost_filesystem-vc141-mt-x64-1_69.lib
libboost_system-vc141-mt-gd-x32-1_69.lib
libboost_system-vc141-mt-gd-x64-1_69.lib
libboost_system-vc141-mt-x32-1_69.lib
libboost_system-vc141-mt-x64-1_69.lib

In test project D:\_\workshop\test_boost\CMakeLists.txt

set(Boost_ADDITIONAL_VERSIONS 1.69)
set(Boost_USE_STATIC_LIBS ON)
find_package(Boost 1.69.0 REQUIRED COMPONENTS filesystem system)

Then, configure:

D:\_\workshop\test_boost\_build.vs2017 cmake -A x64
-DBOOST_ROOT:PATH=D:\boost.win ..
-- Building for: Visual Studio 15 2017
-- The C compiler identification is MSVC 19.15.26730.0
-- The CXX compiler identification is MSVC 19.15.26730.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft
Visual Studio/2017/Professional/VC/Tools/MSVC/14.15.26726/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft
Visual Studio/2017/Professional/VC/Tools/MSVC/14.15.26726/bin/Hostx64/x64/cl.exe
-- works
...
-- Boost version: 1.69.0
-- Found the following Boost libraries:
--   filesystem
--   system
...

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
--
Mateusz Loskot
http://mateusz.loskot.net
Reply | Threaded
Open this post in threaded view
|

Re: About FindBoost.cmake

Mateusz Loskot
On Tue, 30 Oct 2018 at 10:54, Mateusz Loskot <[hidden email]> wrote:

> [...]
> D:\_\workshop\test_boost\_build.vs2017 cmake -A x64
> -DBOOST_ROOT:PATH=D:\boost.win ..
> -- Building for: Visual Studio 15 2017
> -- The C compiler identification is MSVC 19.15.26730.0
> -- The CXX compiler identification is MSVC 19.15.26730.0
> -- Check for working C compiler: C:/Program Files (x86)/Microsoft
> Visual Studio/2017/Professional/VC/Tools/MSVC/14.15.26726/bin/Hostx64/x64/cl.exe
> -- Check for working C compiler: C:/Program Files (x86)/Microsoft
> Visual Studio/2017/Professional/VC/Tools/MSVC/14.15.26726/bin/Hostx64/x64/cl.exe
> -- works
> ...
> -- Boost version: 1.69.0
> -- Found the following Boost libraries:
> --   filesystem
> --   system
> ...

I forgo to mention above I run

cmake --version
cmake version 3.12.2


--
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
--
Mateusz Loskot
http://mateusz.loskot.net
Reply | Threaded
Open this post in threaded view
|

Re: About FindBoost.cmake

Mateusz Loskot
On Tue, 30 Oct 2018 at 12:09, Osman Zakir <[hidden email]> wrote:
>
> Nice. So what command did you run to configure CMake?

I included full cmake invocation command line in my response you replied to.
Just re-read it below.

Once again, please, respond to [hidden email] mailing list, not privately!

ML

> ________________________________
> From: CMake <[hidden email]> on behalf of Mateusz Loskot <[hidden email]>
> Sent: Tuesday, October 30, 2018 2:55 PM
> To: [hidden email]
> Subject: Re: [CMake] About FindBoost.cmake
>
> On Tue, 30 Oct 2018 at 10:54, Mateusz Loskot <[hidden email]> wrote:
> > [...]
> > D:\_\workshop\test_boost\_build.vs2017 cmake -A x64
> > -DBOOST_ROOT:PATH=D:\boost.win ..
> > -- Building for: Visual Studio 15 2017
> > -- The C compiler identification is MSVC 19.15.26730.0
> > -- The CXX compiler identification is MSVC 19.15.26730.0
> > -- Check for working C compiler: C:/Program Files (x86)/Microsoft
> > Visual Studio/2017/Professional/VC/Tools/MSVC/14.15.26726/bin/Hostx64/x64/cl.exe
> > -- Check for working C compiler: C:/Program Files (x86)/Microsoft
> > Visual Studio/2017/Professional/VC/Tools/MSVC/14.15.26726/bin/Hostx64/x64/cl.exe
> > -- works
> > ...
> > -- Boost version: 1.69.0
> > -- Found the following Boost libraries:
> > --   filesystem
> > --   system
> > ...
>
> I forgo to mention above I run
>
> cmake --version
> cmake version 3.12.2
>
>
> --
> Mateusz Loskot, http://mateusz.loskot.net


--
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
--
Mateusz Loskot
http://mateusz.loskot.net
Reply | Threaded
Open this post in threaded view
|

Re: About FindBoost.cmake

Osman Zakir
So just "make -A x64 -DBOOST_ROOT:PATH=D:\boost.win"?

Speaking of x64 vs. x86, I think CMake needs to be able to include the option to build for either x86 or x64 in the same VS project file.  I read on the CMake forums that this is being worked on, but what's the story on that?

From: CMake <[hidden email]> on behalf of Mateusz Loskot <[hidden email]>
Sent: Tuesday, October 30, 2018 4:18 PM
To: [hidden email]
Subject: Re: [CMake] About FindBoost.cmake
 
On Tue, 30 Oct 2018 at 12:09, Osman Zakir <[hidden email]> wrote:
>
> Nice. So what command did you run to configure CMake?

I included full cmake invocation command line in my response you replied to.
Just re-read it below.

Once again, please, respond to [hidden email] mailing list, not privately!

ML

> ________________________________
> From: CMake <[hidden email]> on behalf of Mateusz Loskot <[hidden email]>
> Sent: Tuesday, October 30, 2018 2:55 PM
> To: [hidden email]
> Subject: Re: [CMake] About FindBoost.cmake
>
> On Tue, 30 Oct 2018 at 10:54, Mateusz Loskot <[hidden email]> wrote:
> > [...]
> > D:\_\workshop\test_boost\_build.vs2017 cmake -A x64
> > -DBOOST_ROOT:PATH=D:\boost.win ..
> > -- Building for: Visual Studio 15 2017
> > -- The C compiler identification is MSVC 19.15.26730.0
> > -- The CXX compiler identification is MSVC 19.15.26730.0
> > -- Check for working C compiler: C:/Program Files (x86)/Microsoft
> > Visual Studio/2017/Professional/VC/Tools/MSVC/14.15.26726/bin/Hostx64/x64/cl.exe
> > -- Check for working C compiler: C:/Program Files (x86)/Microsoft
> > Visual Studio/2017/Professional/VC/Tools/MSVC/14.15.26726/bin/Hostx64/x64/cl.exe
> > -- works
> > ...
> > -- Boost version: 1.69.0
> > -- Found the following Boost libraries:
> > --   filesystem
> > --   system
> > ...
>
> I forgo to mention above I run
>
> cmake --version
> cmake version 3.12.2
>
>
> --
> Mateusz Loskot, http://mateusz.loskot.net


--
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
Reply | Threaded
Open this post in threaded view
|

Re: About FindBoost.cmake

Mateusz Loskot
On Tue, 30 Oct 2018 at 12:25, Osman Zakir <[hidden email]> wrote:
>
> So just "make -A x64 -DBOOST_ROOT:PATH=D:\boost.win"?


No. The comand I pasted reads

"cmake -A x64 -DBOOST_ROOT:PATH=D:\boost.win"
^^^ cmake not make


> Speaking of x64 vs. x86, I think CMake needs to be able to include the option to build for either x86 or x64 in the same VS project file.  I read on the CMake forums that this is being worked on, but what's the story on that?

Sorry, no idea what you talking about. Perhaps it's better to read the
docs first:

-A <platform-name>
Specify platform name if supported by generator.


For this paricular VS use case, I could have used

cmake -G "Visual Studio 15 2017 Win64" -DBOOST_ROOT:PATH=D:\boost.win ..
which should be equivalent to
cmake -A x64 -DBOOST_ROOT:PATH=D:\boost.win


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
--
Mateusz Loskot
http://mateusz.loskot.net
Reply | Threaded
Open this post in threaded view
|

Re: About FindBoost.cmake

Osman Zakir
Yeah, I forgot to type the 'c'.  My mistake.

From: CMake <[hidden email]> on behalf of Mateusz Loskot <[hidden email]>
Sent: Tuesday, October 30, 2018 4:30 PM
To: [hidden email]
Subject: Re: [CMake] About FindBoost.cmake
 
On Tue, 30 Oct 2018 at 12:25, Osman Zakir <[hidden email]> wrote:
>
> So just "make -A x64 -DBOOST_ROOT:PATH=D:\boost.win"?


No. The comand I pasted reads

"cmake -A x64 -DBOOST_ROOT:PATH=D:\boost.win"
^^^ cmake not make


> Speaking of x64 vs. x86, I think CMake needs to be able to include the option to build for either x86 or x64 in the same VS project file.  I read on the CMake forums that this is being worked on, but what's the story on that?

Sorry, no idea what you talking about. Perhaps it's better to read the
docs first:

-A <platform-name>
Specify platform name if supported by generator.


For this paricular VS use case, I could have used

cmake -G "Visual Studio 15 2017 Win64" -DBOOST_ROOT:PATH=D:\boost.win ..
which should be equivalent to
cmake -A x64 -DBOOST_ROOT:PATH=D:\boost.win


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