Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with CMake on Windows #92

Open
mi01 opened this issue Aug 26, 2019 · 4 comments
Open

Problems with CMake on Windows #92

mi01 opened this issue Aug 26, 2019 · 4 comments
Assignees
Labels

Comments

@mi01
Copy link

mi01 commented Aug 26, 2019

Hello,
while i had no problems to build the project on Linux, but i spent quite a while to make this work on Windows. Actually the problem was about linking Boost, CMake didnt found the necessary libraries. CMake was looking for a file like boost_system-vc141-mt-x64-1_70.lib for example, but actually the name of a static library is libboost_system-vc141-mt-x64-1_70.lib on Windows. I was able to solve this issue by adding the following command to the CMakeLists.txt:
set(Boost_USE_STATIC_LIBS ON)

I was using VS2017, Windows 10, CMake 3.15.2 and Boost 1.70.0,

@jgaa
Copy link
Owner

jgaa commented Aug 28, 2019

Did you look at the https://github.com/jgaa/restc-cpp/blob/master/build_vc2017.bat file?
Builds of restc-cpp are tested on windows after each commit to the master branch.

@mi01
Copy link
Author

mi01 commented Aug 28, 2019

Yes, i used the batch script, but this seems to be a CMake problem. I enabled the Boost_DEBUG flag to get some verbose output:

.\build_vc2017.bat
cmake -G "Visual Studio 15 Win64" ..
-- Selecting Windows SDK version 10.0.15063.0 to target Windows 10.0.17763.
-- The C compiler identification is MSVC 19.11.25508.2
-- The CXX compiler identification is MSVC 19.11.25508.2

[...]

CMake Warning (dev) at CMakeLists.txt:157 (find_package):
  Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
  Run "cmake --help-policy CMP0074" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  Environment variable Boost_ROOT is set to:

    C:\Data\boost_1_70_0\

  For compatibility, CMake is ignoring the variable.

This warning is for project developers.  Use -Wno-dev to suppress it.
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1427 ] _boost_TEST_VERSIONS = "1.70.0;1.70;1.69.0;1.69;1.68.0;1.68;1.67.0;1.67;1.66.0;1.66"
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1428 ] Boost_USE_MULTITHREADED = "TRUE"
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1429 ] Boost_USE_STATIC_LIBS = <unset>
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1430 ] Boost_USE_STATIC_RUNTIME = <unset>
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1431 ] Boost_ADDITIONAL_VERSIONS = <unset>
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1432 ] Boost_NO_SYSTEM_PATHS = <unset>
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1501 ] BOOST_ROOT = <unset>
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1502 ] ENV{BOOST_ROOT} = "C:\Data\boost_1_70_0\"
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1503 ] BOOST_INCLUDEDIR = <unset>
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1504 ] ENV{BOOST_INCLUDEDIR} = <unset>
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1505 ] BOOST_LIBRARYDIR = <unset>
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1506 ] ENV{BOOST_LIBRARYDIR} = <unset>
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1578 ] _boost_INCLUDE_SEARCH_DIRS = "C:/Data/boost_1_70_0/include;C:/Data/boost_1_70_0;PATHS;C:/local/boost_1_70_0;PATHS;C:/local/boost_1_70;PATHS;C:/local/boost_1_69_0;PATHS;C:/local/boost_1_69;PATHS;C:/local/boost_1_68_0;PATHS;C:/local/boost_1_68;PATHS;C:/local/boost_1_67_0;PATHS;C:/local/boost_1_67;PATHS;C:/local/boost_1_66_0;PATHS;C:/local/boost_1_66;PATHS;C:/boost/include;C:/boost;/sw/local/include"
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1579 ] _boost_PATH_SUFFIXES = "boost-1_70_0;boost_1_70_0;boost/boost-1_70_0;boost/boost_1_70_0;boost-1_70;boost_1_70;boost/boost-1_70;boost/boost_1_70;boost-1_69_0;boost_1_69_0;boost/boost-1_69_0;boost/boost_1_69_0;boost-1_69;boost_1_69;boost/boost-1_69;boost/boost_1_69;boost-1_68_0;boost_1_68_0;boost/boost-1_68_0;boost/boost_1_68_0;boost-1_68;boost_1_68;boost/boost-1_68;boost/boost_1_68;boost-1_67_0;boost_1_67_0;boost/boost-1_67_0;boost/boost_1_67_0;boost-1_67;boost_1_67;boost/boost-1_67;boost/boost_1_67;boost-1_66_0;boost_1_66_0;boost/boost-1_66_0;boost/boost_1_66_0;boost-1_66;boost_1_66;boost/boost-1_66;boost/boost_1_66"
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1594 ] location of version.hpp: C:/Data/boost_1_70_0/boost/version.hpp
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1634 ] Boost_VERSION = "107000"
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1635 ] Boost_VERSION_STRING = "1.70.0"
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1636 ] Boost_VERSION_MACRO = "107000"
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1637 ] Boost_VERSION_MAJOR = "1"
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1638 ] Boost_VERSION_MINOR = "70"
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1639 ] Boost_VERSION_PATCH = "0"
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1640 ] Boost_VERSION_COUNT = "3"
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1657 ] Boost_LIB_PREFIX = ""
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1658 ] Boost_NAMESPACE = "boost"
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:766 ] _boost_COMPILER = "-vc141;-vc140" (guessed)
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1694 ] _boost_MULTITHREADED = "-mt"
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1771 ] _boost_ARCHITECTURE_TAG = "-x64" (detected)
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1775 ] _boost_RELEASE_ABI_TAG = "-"
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1776 ] _boost_DEBUG_ABI_TAG = "-gd"
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1836 ] _boost_LIBRARY_SEARCH_DIRS_RELEASE = "C:/Data/boost_1_70_0/lib;C:/Data/boost_1_70_0/stage/lib;C:/Data/boost_1_70_0/lib64-msvc-14.1;C:/Data/boost_1_70_0/lib64-msvc-14.0;C:/Data/boost_1_70_0/lib;C:/Data/boost_1_70_0/../lib;C:/Data/boost_1_70_0/stage/lib;C:/Data/boost_1_70_0/../lib64-msvc-14.1;C:/Data/boost_1_70_0/../lib64-msvc-14.0;C:/Data/boost_1_70_0/lib64-msvc-14.1;C:/Data/boost_1_70_0/lib64-msvc-14.0;C:/local/boost_1_70_0/lib64-msvc-14.1;C:/local/boost_1_70_0/lib64-msvc-14.0;C:/local/boost_1_70/lib64-msvc-14.1;C:/local/boost_1_70/lib64-msvc-14.0;C:/local/boost_1_69_0/lib64-msvc-14.1;C:/local/boost_1_69_0/lib64-msvc-14.0;C:/local/boost_1_69/lib64-msvc-14.1;C:/local/boost_1_69/lib64-msvc-14.0;C:/local/boost_1_68_0/lib64-msvc-14.1;C:/local/boost_1_68_0/lib64-msvc-14.0;C:/local/boost_1_68/lib64-msvc-14.1;C:/local/boost_1_68/lib64-msvc-14.0;C:/local/boost_1_67_0/lib64-msvc-14.1;C:/local/boost_1_67_0/lib64-msvc-14.0;C:/local/boost_1_67/lib64-msvc-14.1;C:/local/boost_1_67/lib64-msvc-14.0;C:/local/boost_1_66_0/lib64-msvc-14.1;C:/local/boost_1_66_0/lib64-msvc-14.0;C:/local/boost_1_66/lib64-msvc-14.1;C:/local/boost_1_66/lib64-msvc-14.0;C:/boost/lib64-msvc-14.1;C:/boost/lib64-msvc-14.0;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:1837 ] _boost_LIBRARY_SEARCH_DIRS_DEBUG = "C:/Data/boost_1_70_0/lib;C:/Data/boost_1_70_0/stage/lib;C:/Data/boost_1_70_0/lib64-msvc-14.1;C:/Data/boost_1_70_0/lib64-msvc-14.0;C:/Data/boost_1_70_0/lib;C:/Data/boost_1_70_0/../lib;C:/Data/boost_1_70_0/stage/lib;C:/Data/boost_1_70_0/../lib64-msvc-14.1;C:/Data/boost_1_70_0/../lib64-msvc-14.0;C:/Data/boost_1_70_0/lib64-msvc-14.1;C:/Data/boost_1_70_0/lib64-msvc-14.0;C:/local/boost_1_70_0/lib64-msvc-14.1;C:/local/boost_1_70_0/lib64-msvc-14.0;C:/local/boost_1_70/lib64-msvc-14.1;C:/local/boost_1_70/lib64-msvc-14.0;C:/local/boost_1_69_0/lib64-msvc-14.1;C:/local/boost_1_69_0/lib64-msvc-14.0;C:/local/boost_1_69/lib64-msvc-14.1;C:/local/boost_1_69/lib64-msvc-14.0;C:/local/boost_1_68_0/lib64-msvc-14.1;C:/local/boost_1_68_0/lib64-msvc-14.0;C:/local/boost_1_68/lib64-msvc-14.1;C:/local/boost_1_68/lib64-msvc-14.0;C:/local/boost_1_67_0/lib64-msvc-14.1;C:/local/boost_1_67_0/lib64-msvc-14.0;C:/local/boost_1_67/lib64-msvc-14.1;C:/local/boost_1_67/lib64-msvc-14.0;C:/local/boost_1_66_0/lib64-msvc-14.1;C:/local/boost_1_66_0/lib64-msvc-14.0;C:/local/boost_1_66/lib64-msvc-14.1;C:/local/boost_1_66/lib64-msvc-14.0;C:/boost/lib64-msvc-14.1;C:/boost/lib64-msvc-14.0;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2022 ] Searching for SYSTEM_LIBRARY_RELEASE: boost_system-vc141-mt-x64-1_70;boost_system-vc141-mt-x64;boost_system-vc141-mt;boost_system-vc140-mt-x64-1_70;boost_system-vc140-mt-x64;boost_system-vc140-mt;boost_system-mt-x64-1_70;boost_system-mt-x64;boost_system-mt;boost_system-mt;boost_system
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2077 ] Searching for SYSTEM_LIBRARY_DEBUG: boost_system-vc141-mt-gd-x64-1_70;boost_system-vc141-mt-gd-x64;boost_system-vc141-mt-gd;boost_system-vc140-mt-gd-x64-1_70;boost_system-vc140-mt-gd-x64;boost_system-vc140-mt-gd;boost_system-mt-gd-x64-1_70;boost_system-mt-gd-x64;boost_system-mt-gd;boost_system-mt;boost_system
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2022 ] Searching for PROGRAM_OPTIONS_LIBRARY_RELEASE: boost_program_options-vc141-mt-x64-1_70;boost_program_options-vc141-mt-x64;boost_program_options-vc141-mt;boost_program_options-vc140-mt-x64-1_70;boost_program_options-vc140-mt-x64;boost_program_options-vc140-mt;boost_program_options-mt-x64-1_70;boost_program_options-mt-x64;boost_program_options-mt;boost_program_options-mt;boost_program_options
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2077 ] Searching for PROGRAM_OPTIONS_LIBRARY_DEBUG: boost_program_options-vc141-mt-gd-x64-1_70;boost_program_options-vc141-mt-gd-x64;boost_program_options-vc141-mt-gd;boost_program_options-vc140-mt-gd-x64-1_70;boost_program_options-vc140-mt-gd-x64;boost_program_options-vc140-mt-gd;boost_program_options-mt-gd-x64-1_70;boost_program_options-mt-gd-x64;boost_program_options-mt-gd;boost_program_options-mt;boost_program_options
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2022 ] Searching for FILESYSTEM_LIBRARY_RELEASE: boost_filesystem-vc141-mt-x64-1_70;boost_filesystem-vc141-mt-x64;boost_filesystem-vc141-mt;boost_filesystem-vc140-mt-x64-1_70;boost_filesystem-vc140-mt-x64;boost_filesystem-vc140-mt;boost_filesystem-mt-x64-1_70;boost_filesystem-mt-x64;boost_filesystem-mt;boost_filesystem-mt;boost_filesystem
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2077 ] Searching for FILESYSTEM_LIBRARY_DEBUG: boost_filesystem-vc141-mt-gd-x64-1_70;boost_filesystem-vc141-mt-gd-x64;boost_filesystem-vc141-mt-gd;boost_filesystem-vc140-mt-gd-x64-1_70;boost_filesystem-vc140-mt-gd-x64;boost_filesystem-vc140-mt-gd;boost_filesystem-mt-gd-x64-1_70;boost_filesystem-mt-gd-x64;boost_filesystem-mt-gd;boost_filesystem-mt;boost_filesystem
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2022 ] Searching for DATE_TIME_LIBRARY_RELEASE: boost_date_time-vc141-mt-x64-1_70;boost_date_time-vc141-mt-x64;boost_date_time-vc141-mt;boost_date_time-vc140-mt-x64-1_70;boost_date_time-vc140-mt-x64;boost_date_time-vc140-mt;boost_date_time-mt-x64-1_70;boost_date_time-mt-x64;boost_date_time-mt;boost_date_time-mt;boost_date_time
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2077 ] Searching for DATE_TIME_LIBRARY_DEBUG: boost_date_time-vc141-mt-gd-x64-1_70;boost_date_time-vc141-mt-gd-x64;boost_date_time-vc141-mt-gd;boost_date_time-vc140-mt-gd-x64-1_70;boost_date_time-vc140-mt-gd-x64;boost_date_time-vc140-mt-gd;boost_date_time-mt-gd-x64-1_70;boost_date_time-mt-gd-x64;boost_date_time-mt-gd;boost_date_time-mt;boost_date_time
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2022 ] Searching for CONTEXT_LIBRARY_RELEASE: boost_context-vc141-mt-x64-1_70;boost_context-vc141-mt-x64;boost_context-vc141-mt;boost_context-vc140-mt-x64-1_70;boost_context-vc140-mt-x64;boost_context-vc140-mt;boost_context-mt-x64-1_70;boost_context-mt-x64;boost_context-mt;boost_context-mt;boost_context
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2077 ] Searching for CONTEXT_LIBRARY_DEBUG: boost_context-vc141-mt-gd-x64-1_70;boost_context-vc141-mt-gd-x64;boost_context-vc141-mt-gd;boost_context-vc140-mt-gd-x64-1_70;boost_context-vc140-mt-gd-x64;boost_context-vc140-mt-gd;boost_context-mt-gd-x64-1_70;boost_context-mt-gd-x64;boost_context-mt-gd;boost_context-mt;boost_context
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2022 ] Searching for COROUTINE_LIBRARY_RELEASE: boost_coroutine-vc141-mt-x64-1_70;boost_coroutine-vc141-mt-x64;boost_coroutine-vc141-mt;boost_coroutine-vc140-mt-x64-1_70;boost_coroutine-vc140-mt-x64;boost_coroutine-vc140-mt;boost_coroutine-mt-x64-1_70;boost_coroutine-mt-x64;boost_coroutine-mt;boost_coroutine-mt;boost_coroutine
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2077 ] Searching for COROUTINE_LIBRARY_DEBUG: boost_coroutine-vc141-mt-gd-x64-1_70;boost_coroutine-vc141-mt-gd-x64;boost_coroutine-vc141-mt-gd;boost_coroutine-vc140-mt-gd-x64-1_70;boost_coroutine-vc140-mt-gd-x64;boost_coroutine-vc140-mt-gd;boost_coroutine-mt-gd-x64-1_70;boost_coroutine-mt-gd-x64;boost_coroutine-mt-gd;boost_coroutine-mt;boost_coroutine
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2022 ] Searching for CHRONO_LIBRARY_RELEASE: boost_chrono-vc141-mt-x64-1_70;boost_chrono-vc141-mt-x64;boost_chrono-vc141-mt;boost_chrono-vc140-mt-x64-1_70;boost_chrono-vc140-mt-x64;boost_chrono-vc140-mt;boost_chrono-mt-x64-1_70;boost_chrono-mt-x64;boost_chrono-mt;boost_chrono-mt;boost_chrono
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2077 ] Searching for CHRONO_LIBRARY_DEBUG: boost_chrono-vc141-mt-gd-x64-1_70;boost_chrono-vc141-mt-gd-x64;boost_chrono-vc141-mt-gd;boost_chrono-vc140-mt-gd-x64-1_70;boost_chrono-vc140-mt-gd-x64;boost_chrono-vc140-mt-gd;boost_chrono-mt-gd-x64-1_70;boost_chrono-mt-gd-x64;boost_chrono-mt-gd;boost_chrono-mt;boost_chrono
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2022 ] Searching for LOG_LIBRARY_RELEASE: boost_log-vc141-mt-x64-1_70;boost_log-vc141-mt-x64;boost_log-vc141-mt;boost_log-vc140-mt-x64-1_70;boost_log-vc140-mt-x64;boost_log-vc140-mt;boost_log-mt-x64-1_70;boost_log-mt-x64;boost_log-mt;boost_log-mt;boost_log
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2077 ] Searching for LOG_LIBRARY_DEBUG: boost_log-vc141-mt-gd-x64-1_70;boost_log-vc141-mt-gd-x64;boost_log-vc141-mt-gd;boost_log-vc140-mt-gd-x64-1_70;boost_log-vc140-mt-gd-x64;boost_log-vc140-mt-gd;boost_log-mt-gd-x64-1_70;boost_log-mt-gd-x64;boost_log-mt-gd;boost_log-mt;boost_log
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2022 ] Searching for LOG_SETUP_LIBRARY_RELEASE: boost_log_setup-vc141-mt-x64-1_70;boost_log_setup-vc141-mt-x64;boost_log_setup-vc141-mt;boost_log_setup-vc140-mt-x64-1_70;boost_log_setup-vc140-mt-x64;boost_log_setup-vc140-mt;boost_log_setup-mt-x64-1_70;boost_log_setup-mt-x64;boost_log_setup-mt;boost_log_setup-mt;boost_log_setup
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2077 ] Searching for LOG_SETUP_LIBRARY_DEBUG: boost_log_setup-vc141-mt-gd-x64-1_70;boost_log_setup-vc141-mt-gd-x64;boost_log_setup-vc141-mt-gd;boost_log_setup-vc140-mt-gd-x64-1_70;boost_log_setup-vc140-mt-gd-x64;boost_log_setup-vc140-mt-gd;boost_log_setup-mt-gd-x64-1_70;boost_log_setup-mt-gd-x64;boost_log_setup-mt-gd;boost_log_setup-mt;boost_log_setup
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2022 ] Searching for THREAD_LIBRARY_RELEASE: boost_thread-vc141-mt-x64-1_70;boost_thread-vc141-mt-x64;boost_thread-vc141-mt;boost_thread-vc140-mt-x64-1_70;boost_thread-vc140-mt-x64;boost_thread-vc140-mt;boost_thread-mt-x64-1_70;boost_thread-mt-x64;boost_thread-mt;boost_thread-mt;boost_thread
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2077 ] Searching for THREAD_LIBRARY_DEBUG: boost_thread-vc141-mt-gd-x64-1_70;boost_thread-vc141-mt-gd-x64;boost_thread-vc141-mt-gd;boost_thread-vc140-mt-gd-x64-1_70;boost_thread-vc140-mt-gd-x64;boost_thread-vc140-mt-gd;boost_thread-mt-gd-x64-1_70;boost_thread-mt-gd-x64;boost_thread-mt-gd;boost_thread-mt;boost_thread
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2022 ] Searching for REGEX_LIBRARY_RELEASE: boost_regex-vc141-mt-x64-1_70;boost_regex-vc141-mt-x64;boost_regex-vc141-mt;boost_regex-vc140-mt-x64-1_70;boost_regex-vc140-mt-x64;boost_regex-vc140-mt;boost_regex-mt-x64-1_70;boost_regex-mt-x64;boost_regex-mt;boost_regex-mt;boost_regex
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2077 ] Searching for REGEX_LIBRARY_DEBUG: boost_regex-vc141-mt-gd-x64-1_70;boost_regex-vc141-mt-gd-x64;boost_regex-vc141-mt-gd;boost_regex-vc140-mt-gd-x64-1_70;boost_regex-vc140-mt-gd-x64;boost_regex-vc140-mt-gd;boost_regex-mt-gd-x64-1_70;boost_regex-mt-gd-x64;boost_regex-mt-gd;boost_regex-mt;boost_regex
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2022 ] Searching for ATOMIC_LIBRARY_RELEASE: boost_atomic-vc141-mt-x64-1_70;boost_atomic-vc141-mt-x64;boost_atomic-vc141-mt;boost_atomic-vc140-mt-x64-1_70;boost_atomic-vc140-mt-x64;boost_atomic-vc140-mt;boost_atomic-mt-x64-1_70;boost_atomic-mt-x64;boost_atomic-mt;boost_atomic-mt;boost_atomic
-- [ C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2077 ] Searching for ATOMIC_LIBRARY_DEBUG: boost_atomic-vc141-mt-gd-x64-1_70;boost_atomic-vc141-mt-gd-x64;boost_atomic-vc141-mt-gd;boost_atomic-vc140-mt-gd-x64-1_70;boost_atomic-vc140-mt-gd-x64;boost_atomic-vc140-mt-gd;boost_atomic-mt-gd-x64-1_70;boost_atomic-mt-gd-x64;boost_atomic-mt-gd;boost_atomic-mt;boost_atomic

CMake Error at C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Boost (missing: system program_options filesystem date_time
  context coroutine chrono log) (found suitable version "1.70.0", minimum
  required is "1.66.0")

Call Stack (most recent call first):

  C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  C:/Data/cmake-3.15.2/share/cmake-3.15/Modules/FindBoost.cmake:2143 (find_package_handle_standard_args)
  CMakeLists.txt:157 (find_package)

-- Configuring incomplete, errors occurred!

The boost binarys are at C:/Data/boost_1_70_0/stage/lib in my case and CMake is looking there as you can see, but it is not able to find the files, because it is not expecting the prefix lib. Enabling the flag Boost_USE_STATIC_LIBS helped here.

I did nothing unusual with Boost and used a fresh copy of it. I build it by just invoking bootstrap and .\b2 as said in the manual.

@jgaa
Copy link
Owner

jgaa commented Aug 30, 2019

It seems like boost 1.70 broke something. I'll fix it.

@jgaa jgaa added the bug label Aug 30, 2019
@jgaa jgaa self-assigned this Aug 30, 2019
@paulhoux
Copy link

Thanks @mi01 , adding set(Boost_USE_STATIC_LIBS ON) solved the problem for me as well. Using VC2019.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants