CMake when run from within Visual Studio 2022 couldn't detect compiler - c++

So after installing VS 2022 and downloading and compiling boost 1.82, I was trying to get a test project running, one that is supposed to compile cross platform (new feature in VS 2022 or was it there in previous versions as well??). I created a new VC++ project and solution from within VS as File > New > Project > CMake Project.
And after modifying the CMakeLists.txt file as:
...
set (BOOST_ROOT "C:/boost/boost")
set (BOOST_INCLUDEDIR "C:/boost/boost/include")
set (BOOST_LIBRARYDIR "C:/boost/boost/stage/lib")
set (BOOST_MIN_VERSION "1.82.0")
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
set(Boost_DEBUG ON)
find_package(Boost ${BOOST_MIN_VERSION} COMPONENTS date_time REQUIRED)
if (NOT Boost_FOUND)
message(FATAL_ERROR "Fatal error: Boost (version >= ${BOOST_MIN_VERSION}) required.")
endif()
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
...
And then did Project > Delete Cache And Reconfigure
The trouble is that it is not able to find the boost libraries and I believe it is because it couldn't figure out what the compiler is:
....
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1862 ] Boost_VERSION_MAJOR = "1"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1863 ] Boost_VERSION_MINOR = "82"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1864 ] Boost_VERSION_PATCH = "0"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1865 ] Boost_VERSION_COUNT = "3"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1889 ] Boost_LIB_PREFIX = ""
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1890 ] Boost_NAMESPACE = "boost"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:953 ] _boost_COMPILER = "" (guessed)
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1926 ] _boost_MULTITHREADED = "-mt"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:2004 ] _boost_ARCHITECTURE_TAG = "" (detected)
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:2008 ] _boost_RELEASE_ABI_TAG = "-"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:2009 ] _boost_DEBUG_ABI_TAG = "-d"
....
Here the _boost_COMPILER was detected as _boost_COMPILER = "" (guessed).
Any idea what could be wrong here.. VS is supposed to tell CMake about itself right since I am calling CMake from within it?
EDIT: Attaching entire output from CMake
1> CMake generation started for default configuration: 'x64-Debug'.
1> Command line: "C:\WINDOWS\system32\cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\Microsoft\CMake\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\johns\source\repos\LogMon\out\install\x64-Debug" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\Microsoft\CMake\Ninja\ninja.exe" "C:\Users\johns\source\repos\LogMon" 2>&1"
1> Working directory: C:\Users\johns\source\repos\LogMon\out\build\x64-Debug
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1689 ] _boost_TEST_VERSIONS = <unset>
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1690 ] Boost_USE_MULTITHREADED = "ON"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1691 ] Boost_USE_STATIC_LIBS = "ON"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1692 ] Boost_USE_STATIC_RUNTIME = "OFF"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1693 ] Boost_ADDITIONAL_VERSIONS = <unset>
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1694 ] Boost_NO_SYSTEM_PATHS = <unset>
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1726 ] BOOST_ROOT = "C:/boost/boost"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1727 ] ENV{BOOST_ROOT} = <unset>
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1728 ] BOOST_INCLUDEDIR = "C:/boost/boost/include"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1729 ] ENV{BOOST_INCLUDEDIR} = <unset>
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1730 ] BOOST_LIBRARYDIR = "C:/boost/boost/stage/lib"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1731 ] ENV{BOOST_LIBRARYDIR} = <unset>
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1803 ] _boost_INCLUDE_SEARCH_DIRS = "C:/boost/boost/include;C:/boost/boost/include;C:/boost/boost;PATHS;C:/boost/include;C:/boost;/sw/local/include"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1804 ] _boost_PATH_SUFFIXES = <unset>
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1819 ] location of version.hpp: C:/boost/boost/boost/version.hpp
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1859 ] Boost_VERSION = "108200"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1860 ] Boost_VERSION_STRING = "1.82.0"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1861 ] Boost_VERSION_MACRO = "108200"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1862 ] Boost_VERSION_MAJOR = "1"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1863 ] Boost_VERSION_MINOR = "82"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1864 ] Boost_VERSION_PATCH = "0"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1865 ] Boost_VERSION_COUNT = "3"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1889 ] Boost_LIB_PREFIX = "lib"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1890 ] Boost_NAMESPACE = "boost"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:953 ] _boost_COMPILER = "" (guessed)
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1926 ] _boost_MULTITHREADED = "-mt"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:2004 ] _boost_ARCHITECTURE_TAG = "" (detected)
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:2008 ] _boost_RELEASE_ABI_TAG = "-"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:2009 ] _boost_DEBUG_ABI_TAG = "-d"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:2069 ] _boost_LIBRARY_SEARCH_DIRS_RELEASE = "C:/boost/boost/stage/lib;C:/boost/boost/lib;C:/boost/boost/stage/lib;C:/boost/boost/lib;C:/boost/boost/../lib;C:/boost/boost/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:2070 ] _boost_LIBRARY_SEARCH_DIRS_DEBUG = "C:/boost/boost/stage/lib;C:/boost/boost/lib;C:/boost/boost/stage/lib;C:/boost/boost/lib;C:/boost/boost/../lib;C:/boost/boost/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
1> [CMake] CMake Warning at C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1384 (message):
1> [CMake] New Boost version may have incorrect or missing dependencies and imported
1> [CMake] targets
1> [CMake] Call Stack (most recent call first):
1> [CMake] C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1507 (_Boost_COMPONENT_DEPENDENCIES)
1> [CMake] C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:2118 (_Boost_MISSING_DEPENDENCIES)
1> [CMake] CMakeLists.txt:14 (find_package)
1> [CMake]
1> [CMake]
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:2255 ] Searching for DATE_TIME_LIBRARY_RELEASE: libboost_date_time-mt-1_82;libboost_date_time-mt;libboost_date_time-mt;libboost_date_time-mt;libboost_date_time
1> [CMake] -- [ C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:2310 ] Searching for DATE_TIME_LIBRARY_DEBUG: libboost_date_time-mt-d-1_82;libboost_date_time-mt-d;libboost_date_time-mt-d;libboost_date_time-mt;libboost_date_time
1> [CMake] CMake Error at C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
1> [CMake] Could NOT find Boost (missing: date_time) (found suitable version "1.82.0",
1> [CMake] minimum required is "1.82.0")
1> [CMake] Call Stack (most recent call first):
1> [CMake] C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
1> [CMake] C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/FindBoost.cmake:2376 (find_package_handle_standard_args)
1> [CMake] CMakeLists.txt:14 (find_package)
1> [CMake] -- Configuring incomplete, errors occurred!
1> 'C:\WINDOWS\system32\cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\Microsoft\CMake\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\johns\source\repos\LogMon\out\install\x64-Debug" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\Microsoft\CMake\Ninja\ninja.exe" "C:\Users\johns\source\repos\LogMon" 2>&1"' execution failed with error: ''C:\WINDOWS\system32\cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\Microsoft\CMake\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\johns\source\repos\LogMon\out\install\x64-Debug" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\Microsoft\CMake\Ninja\ninja.exe" "C:\Users\johns\source\repos\LogMon" 2>&1"' returned with exit code: 1'.

After skimming through the entire log the issue seems to be elsewhere than you'd expect.
...
find_package(Boost ${BOOST_MIN_VERSION} COMPONENTS date_time REQUIRED) #<---
...
It says so at the bottom of the log:
#Missing date_time... i.e. it can't find a REQUIRED component
1> [CMake] Could NOT find Boost (missing: date_time) (found suitable version "1.82.0",
1> [CMake] minimum required is "1.82.0")
To properly debug this issue I would recommend going through the paths outputed by these variables here:
1> [...] _boost_LIBRARY_SEARCH_DIRS_RELEASE = "C:/boost/boost/stage/lib;C:/boost/boost/lib;C:/boost/boost/stage/lib;C:/boost/boost/lib;C:/boost/boost/../lib;C:/boost/boost/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
1> [...] _boost_LIBRARY_SEARCH_DIRS_DEBUG = "C:/boost/boost/stage/lib;C:/boost/boost/lib;C:/boost/boost/stage/lib;C:/boost/boost/lib;C:/boost/boost/../lib;C:/boost/boost/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
and double check that these libraries are present in the directories (they probably wont)
1> [...] Searching for DATE_TIME_LIBRARY_RELEASE: libboost_date_time-mt-1_82;libboost_date_time-mt;libboost_date_time-mt;libboost_date_time-mt;libboost_date_time
1> [...] Searching for DATE_TIME_LIBRARY_DEBUG: libboost_date_time-mt-d-1_82;libboost_date_time-mt-d;libboost_date_time-mt-d;libboost_date_time-mt;libboost_date_time
I would then check if these libraries exist in the boost folder at all. Chances are they won't and it will most likely be because they are either part of a different component or are just missing from your boost installation.
Try including whole boost to see if that is the case:
find_package(Boost ${BOOST_MIN_VERSION})
Hope it helps!
EDIT: I've managed to replicate your issue and truly it is due to the undetected compiler most likely. As when building the boost it appends the compiler as a suffix (or somewhere mid name) to the library. I.e. if you check the lib dir you can deduct which compiler was being used and perhaps force set the variable through set(Boost_COMPILER "-vcXYZ").
Note that the libboost_date_time-mt-d-1_82 is missing the compiler due to this unset variable. It should look like libboost_date_time-vc142-mt-d-1_82 (if you compiled with vc142)

Related

ninja: error: build.ninja: bad $-escape (literal $ must be written as $$)

I am getting the following error while compiling SeqAn Framework:
1> [CMake] CMake Error:
1> [CMake] Running
1> [CMake]
1> [CMake] 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe' '-C' 'C:/Users/pc/source/repos/seqan/out/build/x64-Clang-Debug' '-t' 'recompact'
1> [CMake]
1> [CMake] failed with:
1> [CMake]
1> [CMake] ninja: error: build.ninja:152: bad $-escape (literal $ must be written as $$)
1> [CMake]
1> [CMake]
1> [CMake]
1> [CMake]
1> [CMake]
1> [CMake] CMake Generate step failed. Build files cannot be regenerated correctly.
1> 'C:\WINDOWS\system32\cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\PROFESSIONAL\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\pc\Source\Repos\seqan\out\install\x64-Clang-Debug" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\PROFESSIONAL\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "C:\Users\pc\Source\Repos\seqan" 2>&1"' execution failed with error: ''C:\WINDOWS\system32\cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\PROFESSIONAL\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\pc\Source\Repos\seqan\out\install\x64-Clang-Debug" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\PROFESSIONAL\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "C:\Users\pc\Source\Repos\seqan" 2>&1"' returned with exit code: 1'.
The following is my CMakeSettings_schema.json file:
{
"configurations": [
{
"name": "x64-Clang-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "clang_cl_x64_x64" ],
"variables": []
}
]
}
The following is the content of my build.ninja file from line # 152:
COMMAND = cmd.exe /C "cd /D C:\Users\pc\source\repos\seqan\out\build\x64-Clang-Debug && C:\Users\pc\source\repos\seqan\out\build\x64-Clang-Debug\bin\$(ConfigurationName)\alf.exe --write-ctd C:/Users/pc/source/repos/seqan/out/build/x64-Clang-Debug/workflow_plugin_dir/descriptors/alf.ctd"
What can I do to fix this?

CMAKE: Could NOT find Boost (missing: date_time) (found suitable version "1.76.0", minimum required is "1.76.0")

I'm trying to add boost components date_time in a c++ program using CMake on Windows 10. I'm writing down what I have done so far. Following is the code in CMakeLists.txt
# CMakeList.txt : CMake project for cmake boost with lib, include source and define
# project specific logic here.
#
cmake_minimum_required(VERSION 2.8.9)
project ("hello")
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_DEBUG ON)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost 1.76.0 COMPONENTS date_time)
if(Boost_FOUND)
include_directories(${BOOST_INCLUDEDIR})
add_executable(progname file1.cxx file2.cxx)
target_link_libraries(progname ${BOOST_LIBRARYDIR})
endif()
add_executable(hello hello.cpp)
Remember that I have set environment variables BOOST_INCLUDEDIR , BOOST_LIBRARYDIR and BOOST_ROOT as C:\boost_1_76_0 , C:\boost_1_76_0\stage\lib and C:\boost_1_76_0 respectively.
I keep getting this error.
-- Could NOT find Boost (missing: date_time) (found suitable version "1.76.0", minimum required is "1.76.0")
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/jan.muhammad/source/repos/boost in cmake
Following are the warnings:
Severity Code Description Project File Line Suppression State
Warning CMake Warning (dev) at C:\Users\jan.muhammad\source\repos\boost in cmake\CMakeLists.txt:12 (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:\boost_1_76_0
For compatibility, CMake is ignoring the variable.
This warning is for project developers. Use -Wno-dev to suppress it. hello C:\Users\jan.muhammad\source\repos\boost in cmake\CMakeLists.txt 12
Warning CMake Warning at C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1354 (message):
New Boost version may have incorrect or missing dependencies and imported
targets C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake 1354
Here's the console output after cmake . using Boost_DEBUG:
PS C:\Users\jan.muhammad\source\repos\boost in cmake> cmake .
-- Building for: Visual Studio 16 2019
CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.18363.
-- The C compiler identification is MSVC 19.29.30040.0
-- The CXX compiler identification is MSVC 19.29.30040.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at CMakeLists.txt:12 (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:\boost_1_76_0
For compatibility, CMake is ignoring the variable.
This warning is for project developers. Use -Wno-dev to suppress it.
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1657 ] _boost_TEST_VERSIONS = <unset>
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1658 ] Boost_USE_MULTITHREADED ="ON"
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1659 ] Boost_USE_STATIC_LIBS = "OFF"
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1660 ] Boost_USE_STATIC_RUNTIME = "OFF"
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1661 ] Boost_ADDITIONAL_VERSIONS = <unset>
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1662 ] Boost_NO_SYSTEM_PATHS = <unset>
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1694 ] BOOST_ROOT = <unset>
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1695 ] ENV{BOOST_ROOT} = "C:\boost_1_76_0"
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1696 ] BOOST_INCLUDEDIR = <unset>
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1697 ] ENV{BOOST_INCLUDEDIR} = "C:\boost_1_76_0"
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1698 ] BOOST_LIBRARYDIR = <unset>
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1699 ] ENV{BOOST_LIBRARYDIR} = "C:\boost_1_76_0\stage\lib"
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1771 ] _boost_INCLUDE_SEARCH_DIRS = "C:/boost_1_76_0;C:/boost_1_76_0/include;C:/boost_1_76_0;PATHS;C:/boost/include;C:/boost;/sw/local/include"
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1772 ] _boost_PATH_SUFFIXES = <unset>
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1787 ] location of version.hpp: C:/boost_1_76_0/boost/version.hpp
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1827 ] Boost_VERSION = "107600"
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1828 ] Boost_VERSION_STRING = "1.76.0"
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1829 ] Boost_VERSION_MACRO = "107600"
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1830 ] Boost_VERSION_MAJOR = "1"
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1831 ] Boost_VERSION_MINOR = "76"
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1832 ] Boost_VERSION_PATCH = "0"
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1833 ] Boost_VERSION_COUNT = "3"
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1857 ] Boost_LIB_PREFIX = ""
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1858 ] Boost_NAMESPACE = "boost"
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:953 ] _boost_COMPILER = "-vc142;-vc141;-vc140" (guessed)
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1894 ] _boost_MULTITHREADED = "-mt"
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1972 ] _boost_ARCHITECTURE_TAG = "-x64" (detected)
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1976 ] _boost_RELEASE_ABI_TAG = "-"
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1977 ] _boost_DEBUG_ABI_TAG = "-gd"
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:2037 ] _boost_LIBRARY_SEARCH_DIRS_RELEASE = "C:/boost_1_76_0/stage/lib;C:/boost_1_76_0/lib;C:/boost_1_76_0/stage/lib;C:/boost_1_76_0/lib64-msvc-14.2;C:/boost_1_76_0/lib64-msvc-14.1;C:/boost_1_76_0/lib64-msvc-14.0;C:/boost_1_76_0/lib;C:/boost_1_76_0/../lib;C:/boost_1_76_0/stage/lib;C:/boost_1_76_0/../lib64-msvc-14.2;C:/boost_1_76_0/../lib64-msvc-14.1;C:/boost_1_76_0/../lib64-msvc-14.0;C:/boost_1_76_0/lib64-msvc-14.2;C:/boost_1_76_0/lib64-msvc-14.1;C:/boost_1_76_0/lib64-msvc-14.0;C:/boost/lib64-msvc-14.2;C:/boost/lib64-msvc-14.1;C:/boost/lib64-msvc-14.0;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:2038 ] _boost_LIBRARY_SEARCH_DIRS_DEBUG = "C:/boost_1_76_0/stage/lib;C:/boost_1_76_0/lib;C:/boost_1_76_0/stage/lib;C:/boost_1_76_0/lib64-msvc-14.2;C:/boost_1_76_0/lib64-msvc-14.1;C:/boost_1_76_0/lib64-msvc-14.0;C:/boost_1_76_0/lib;C:/boost_1_76_0/../lib;C:/boost_1_76_0/stage/lib;C:/boost_1_76_0/../lib64-msvc-14.2;C:/boost_1_76_0/../lib64-msvc-14.1;C:/boost_1_76_0/../lib64-msvc-14.0;C:/boost_1_76_0/lib64-msvc-14.2;C:/boost_1_76_0/lib64-msvc-14.1;C:/boost_1_76_0/lib64-msvc-14.0;C:/boost/lib64-msvc-14.2;C:/boost/lib64-msvc-14.1;C:/boost/lib64-msvc-14.0;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
CMake Warning at C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1354 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:1476 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:2086 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:12 (find_package)
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:2223 ] Searching for DATE_TIME_LIBRARY_RELEASE: boost_date_time-vc142-mt-x64-1_76;boost_date_time-vc142-mt-x64;boost_date_time-vc142-mt;boost_date_time-vc141-mt-x64-1_76;boost_date_time-vc141-mt-x64;boost_date_time-vc141-mt;boost_date_time-vc140-mt-x64-1_76;boost_date_time-vc140-mt-x64;boost_date_time-vc140-mt;boost_date_time-mt-x64-1_76;boost_date_time-mt-x64;boost_date_time-mt;boost_date_time-mt;boost_date_time
-- [ C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/FindBoost.cmake:2278 ] Searching for DATE_TIME_LIBRARY_DEBUG: boost_date_time-vc142-mt-gd-x64-1_76;boost_date_time-vc142-mt-gd-x64;boost_date_time-vc142-mt-gd;boost_date_time-vc141-mt-gd-x64-1_76;boost_date_time-vc141-mt-gd-x64;boost_date_time-vc141-mt-gd;boost_date_time-vc140-mt-gd-x64-1_76;boost_date_time-vc140-mt-gd-x64;boost_date_time-vc140-mt-gd;boost_date_time-mt-gd-x64-1_76;boost_date_time-mt-gd-x64;boost_date_time-mt-gd;boost_date_time-mt;boost_date_time
-- Could NOT find Boost (missing: date_time) (found suitable version "1.76.0", minimum required is "1.76.0")
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/jan.muhammad/source/repos/boost in cmake
Instead of
include_directories(${BOOST_INCLUDEDIR})
add_executable(progname file1.cxx file2.cxx)
target_link_libraries(progname ${BOOST_LIBRARYDIR})
I always recommend using Boost::boost both for nice clean include of headers and linkage
add_executable(progname file1.cxx file2.cxx)
target_link_libraries(progname Boost::boost Boost::date_time)
Also to have more meaning full cmake erros I guess you want to use
find_package(Boost 1.76.0 COMPONENTS date_time REQUIRED) and get rid of the if(Boost_FOUND) except if you have a meaning full alternative if you don't find boost.

Can't generate CMake files with Visual Studio

I'm trying to use CMake with Visual Studio for a 3D class, but whenever I open the provided CMake project, Visual Studio can't generate CMake files. I get the following error (some parts of the output were in French so I translated them):
CMake generation started with the default configuration: 'x64-Debug (par défaut)'.
1> Command line: "cmd.exe" /c ""c:\program files (x86)\microsoft visual studio\2019\community\common7\ide\commonextensions\microsoft\cmake\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_INSTALL_PREFIX:PATH="D:\Scolaire\11 - 2A\INF443\1 - Tutoriels\create_window_commented\out\install\x64-Debug (par défaut)" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/HostX64/x64/cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/HostX64/x64/cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_MAKE_PROGRAM="c:\program files (x86)\microsoft visual studio\2019\community\common7\ide\commonextensions\microsoft\cmake\Ninja\ninja.exe" "D:\Scolaire\11 - 2A\INF443\1 - Tutoriels\create_window_commented" 2>&1"
1> Working directory: D:\Scolaire\11 - 2A\INF443\1 - Tutoriels\create_window_commented\out\build\x64-Debug (par défaut)
1> [CMake] -- The C compiler identification is MSVC 19.26.28805.0
1> [CMake] -- The CXX compiler identification is MSVC 19.26.28805.0
1> [CMake] -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/HostX64/x64/cl.exe
1> [CMake] -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/HostX64/x64/cl.exe - broken
1> [CMake] CMake Error at C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.17/Modules/CMakeTestCCompiler.cmake:60 (message):
1> [CMake] The C compiler
1> [CMake]
1> [CMake] "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/HostX64/x64/cl.exe"
1> [CMake]
1> [CMake] is not able to compile a simple test program.
1> [CMake]
1> [CMake] It fails with the following output:
1> [CMake]
1> [CMake] Change Dir: D:/Scolaire/11 - 2A/INF443/1 - Tutoriels/create_window_commented/out/build/x64-Debug (par défaut)/CMakeFiles/CMakeTmp
1> [CMake]
1> [CMake] Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe cmTC_cbae0 && [1/2] Building C object CMakeFiles\cmTC_cbae0.dir\testCCompiler.c.obj
1> [CMake] [2/2] Linking C executable cmTC_cbae0.exe
1> [CMake] FAILED: cmTC_cbae0.exe
1> [CMake] cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_cbae0.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1426~1.288\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_cbae0.dir\testCCompiler.c.obj /out:cmTC_cbae0.exe /implib:cmTC_cbae0.lib /pdb:cmTC_cbae0.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
1> [CMake] RC Pass 1: command "rc /fo CMakeFiles\cmTC_cbae0.dir/manifest.res CMakeFiles\cmTC_cbae0.dir/manifest.rc" failed (exit code 0) with the following output:
1> [CMake] The specified file could not be found
1> [CMake] ninja: build stopped: subcommand failed.
1> [CMake]
1> [CMake]
1> [CMake]
1> [CMake]
1> [CMake]
1> [CMake] CMake will not be able to correctly generate this project.
1> [CMake] Call Stack (most recent call first):
1> [CMake] CMakeLists.txt:3 (project)
1> [CMake] -- Configuring incomplete, errors occurred!
1> [CMake] See also "D:/Scolaire/11 - 2A/INF443/1 - Tutoriels/create_window_commented/out/build/x64-Debug (par défaut)/CMakeFiles/CMakeOutput.log".
1> [CMake] See also "D:/Scolaire/11 - 2A/INF443/1 - Tutoriels/create_window_commented/out/build/x64-Debug (par défaut)/CMakeFiles/CMakeError.log".
1> Execution failed 'cmd.exe' '/c ""c:\program files (x86)\microsoft visual studio\2019\community\common7\ide\commonextensions\microsoft\cmake\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_INSTALL_PREFIX:PATH="D:\Scolaire\11 - 2A\INF443\1 - Tutoriels\create_window_commented\out\install\x64-Debug (par défaut)" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/HostX64/x64/cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/HostX64/x64/cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_MAKE_PROGRAM="c:\program files (x86)\microsoft visual studio\2019\community\common7\ide\commonextensions\microsoft\cmake\Ninja\ninja.exe" "D:\Scolaire\11 - 2A\INF443\1 - Tutoriels\create_window_commented" 2>&1"'. Error: ''cmd.exe' '/c ""c:\program files (x86)\microsoft visual studio\2019\community\common7\ide\commonextensions\microsoft\cmake\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_INSTALL_PREFIX:PATH="D:\Scolaire\11 - 2A\INF443\1 - Tutoriels\create_window_commented\out\install\x64-Debug (par défaut)" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/HostX64/x64/cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/HostX64/x64/cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_MAKE_PROGRAM="c:\program files (x86)\microsoft visual studio\2019\community\common7\ide\commonextensions\microsoft\cmake\Ninja\ninja.exe" "D:\Scolaire\11 - 2A\INF443\1 - Tutoriels\create_window_commented" 2>&1"' was returned with end code: 1'.
Other people in my class are using the same provided files and don't have errors so the problem can't be from this. I use Windows 10 and the latest version of Visual Studio (I tried to uninstall and reinstall it). The C++ and CMake tools are installed within Visual Studio.
The provided project should only open an empty windows, it looks like this:
PS D:\Scolaire\11 - 2A\INF443\1 - Tutoriels\create_window_commented> ls
Répertoire : D:\Scolaire\11 - 2A\INF443\1 - Tutoriels\create_window_commented
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 25/05/2020 14:09 .vs
d----- 25/05/2020 14:09 out
d----- 03/08/2018 15:10 src
-a---- 11/03/2020 08:59 175 CMakeLists.txt
-a---- 02/03/2020 17:37 214 Makefile
-a---- 02/03/2020 17:37 229 meson.build
-a---- 11/03/2020 08:59 847 README
Do you know what the cause could be ? Thanks!
The problem was from the CMakeLists.txt, the parameters inside this file were for Unix instead of Windows.
Edit: the CMakeLists.txt that didn't work was this:
cmake_minimum_required(VERSION 2.8)
project(pgm)
set(CMAKE_CXX_FLAGS "-O2 -g -std=c++11 -Wall -Wextra")
add_executable(pgm src/main.cpp)
target_link_libraries(pgm glfw)
I made the following changes.
From set(CMAKE_CXX_FLAGS "-O2 -g -std=c++11 -Wall -Wextra") to:
set(CMAKE_BUILD_TYPE Debug)
set(GLFW_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/lib_windows/glfw3_win/include")
include_directories(${GLFW_INCLUDE_DIRS})
set(GLFW_LIBRARIES "${CMAKE_CURRENT_SOURCE_DIR}/lib_windows/glfw3_win/lib/glfw3.lib") # Set directory to precompiled version of glfw3
From target_link_libraries(pgm glfw) to:
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${source_files}) # Allow to explore source directories as a tree
target_link_libraries(pgm ${GLFW_LIBRARIES})
I didn't write this code, I just understood that the wrong lines of code were meant for Unix so I replaced them with the right lines of code from another CMakeLists.txt from a similar provided OpenGL project.
My solution — add this right before 'project' in top cmake file:
set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")

CMake found Boost but not requested libraries

I am trying to add Boost to a C++ application using CMake. I have read through all relevant questions I can find on SO, and I feel I am getting closer to a solution. But the CMake still can't find the requested Boost library for some reasons.
I am trying to find "boost_filesystem". The debug shows CMake is looking for "boost_filesystem-vc141-mt-gd-1_65_1". I do have the file "libboost_filesystem-vc141-mt-gd-1_65_1.lib" in the folder "C:\boost\boost_1_65_1\stage\lib". I suppose this is the file CMake is looking for, but for some reasons CMake says it can't find it.
Here is the procedure I used to build the Boost. This may be too much details for most people but I suspect it may be helpful to another newbie.
download and extract Boost 1.65.1 in folder C:\boost\boost_1_65_1
go to developer prompt command line and run bootstrap.bat under the above folder.
updated file visualc.hpp under C:\boost\boost_1_65_1\boost\config\compiler (see Unknown compiler version while compiling Boost with MSVC 14.0 (VS 2015)!
Replaced the lines in the bottom of the file visualc.hpp :
// last known and checked version is 19.11.25506 (VC++ 2017.3):
#if (_MSC_VER > 1911)
with
// last known and checked version is 19.13.26128 (VC++ 2017.5.6):
#if (_MSC_VER > 1913)
Open another file project-config.jam under the folder boost_1_65_1 and updated the second line to the following:
using msvc : 14.1 : "C:\Program Files (x86)\Microsoft Visual Studio\2017
\Professional\VC\Tools\MSVC\14.13.26128\bin\Hostx64\x64\cl.exe" ;
Go back to developer prompt command line and run the following to build Boost:
b2 toolset=msvc-14.1 address-model=64
It seems I have done the following items correctly:
properly built the libraries, though not using the default directory. I confirmed that the requested library is built.
assigned the path correctly to the CMake designated directories
used CMake find_package() correctly
Here are the relevant versions I am using:
VS: 2017 v15.6.1 with CMake 3.10
Boost version: 1.65.1, built with tool MSVC 14.1
Here is the CMakelist.txt:
cmake_minimum_required(VERSION 3.6 FATAL_ERROR)
project(test)
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
set(Boost_DEBUG ON)
set(BOOST_ROOT C:\\boost\\boost_1_65_1)
set(BOOST_INCLUDEDIR C:\\boost\\boost_1_65_1)
set(BOOST_LIBRARYDIR C:\\boost\\boost_1_65_1\\stage\\lib)
set(Boost_DEBUG 1)
find_package(Boost COMPONENTS filesystem REQUIRED)
message(STATUS "Boost LIBRARIES: " ${Boost_LIBRARIES})
add_executable(test_Boost main.cpp)
target_link_libraries(test_Boost ${Boost_LIBRARIES})
here is part of the output that may be relevant:
1> Command line: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\PROFESSIONAL\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe -G "Ninja" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\david\CMakeBuilds\94321a3b-9fa8-083f-a86f-e151c3abae79\install\x64-Release" -DCMAKE_CXX_COMPILER="C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.13.26128/bin/HostX64/x64/cl.exe" -DCMAKE_C_COMPILER="C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.13.26128/bin/HostX64/x64/cl.exe" -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\PROFESSIONAL\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "E:\computer\boost\cmake"
1> Working directory: C:\Users\david\CMakeBuilds\94321a3b-9fa8-083f-a86f-e151c3abae79\build\x64-Release
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1073 ] _boost_TEST_VERSIONS = 1.65.1;1.65.0;1.65;1.64.0
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1075 ] Boost_USE_MULTITHREADED = ON
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1077 ] Boost_USE_STATIC_LIBS = OFF
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1079 ] Boost_USE_STATIC_RUNTIME = OFF
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1081 ] Boost_ADDITIONAL_VERSIONS =
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1083 ] Boost_NO_SYSTEM_PATHS =
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1151 ] Declared as CMake or Environmental Variables:
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1153 ] BOOST_ROOT = C:\boost\boost_1_65_1
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1155 ] BOOST_INCLUDEDIR = C:\boost\boost_1_65_1
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1157 ] BOOST_LIBRARYDIR = C:\boost\boost_1_65_1\stage\lib
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1159 ] _boost_TEST_VERSIONS = 1.65.1;1.65.0;1.65;1.64.0;...
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1258 ] location of version.hpp: C:/boost/boost_1_65_1/boost/version.hpp
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1282 ] version.hpp reveals boost 1.65.1;...
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1368 ] guessed _boost_COMPILER = -vc141;-vc140
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1378 ] _boost_MULTITHREADED = -mt
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1422 ] _boost_RELEASE_ABI_TAG = -
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1424 ] _boost_DEBUG_ABI_TAG = -gd
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1486 ] _boost_LIBRARY_SEARCH_DIRS_RELEASE = C:\boost\boost_1_65_1\stage\lib;C:\boost\boost_1_65_1/lib;...
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1636 ] Searching for FILESYSTEM_LIBRARY_RELEASE: boost_filesystem-vc141-mt-1_65_1;boost_filesystem-vc141-mt
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1687 ] Searching for FILESYSTEM_LIBRARY_DEBUG: boost_filesystem-vc141-mt-gd-1_65_1;boost_filesystem-vc141-mt-gd
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1636 ] Searching for SYSTEM_LIBRARY_RELEASE: boost_system-vc141-mt-1_65_1;boost_system-vc141-mt
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1687 ] Searching for SYSTEM_LIBRARY_DEBUG: boost_system-vc141-mt-gd-1_65_1;boost_system-vc141-mt-gd
1> -- [ C:/Program Files (x86)/.../FindBoost.cmake:1762 ] Boost_FOUND = 1
1> -- Boost LIBRARIES:
1> CMake Error at C:/Program Files (x86)/.../FindBoost.cmake:1923 (message):
1> Unable to find the requested Boost libraries.
1>
1> Boost version: 1.65.1
1>
1> Boost include path: C:/boost/boost_1_65_1
1>
1> Could not find the following Boost libraries:
1>
1> boost_filesystem
1>
1> Some (but not all) of the required Boost libraries were found. You may
1> need to install these additional Boost libraries. Alternatively, set
1> BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
1> to the location of Boost.
1> Call Stack (most recent call first):
1> CMakeLists.txt(17): (find_package)
1>
1>
1> -- Configuring incomplete, errors occurred!
1> See also "C:/Users/david/CMakeBuilds/94321a3b-9fa8-083f-a86f-e151c3abae79/build/x64-Release/CMakeFiles/CMakeOutput.log".
1> C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\PROFESSIONAL\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe -G "Ninja" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\david\CMakeBuilds\94321a3b-9fa8-083f-a86f-e151c3abae79\install\x64-Release" -DCMAKE_CXX_COMPILER="C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.13.26128/bin/HostX64/x64/cl.exe" -DCMAKE_C_COMPILER="C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.13.26128/bin/HostX64/x64/cl.exe" -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\PROFESSIONAL\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "E:\computer\boost\cmake" returned with exit code: 1
CMake Error at C:/Program Files (x86)/.../FindBoost.cmake:1923 (message):
Unable to find the requested Boost libraries.
Boost version: 1.65.1
Boost include path: C:/boost/boost_1_65_1
Could not find the following Boost libraries:
boost_filesystem
Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.
Call Stack (most recent call first):
CMakeLists.txt:17 (find_package)
libboost_filesystem-vc141-mt-gd-1_65_1.lib is the static version of the filesystem library (the name starts with lib)
In CMake you are searching for the dynamic version:
set(Boost_USE_STATIC_LIBS OFF)
This cannot work. Now you have to options:
switch the OFF to ON
rebuild boost with the following addition:
b2 toolset=msvc-14.1 address-model=64 --build-type=complete
The command --build-type=complete build all supported variants of the libraries. Just to be on the safe side ;-)

CMake doesn't find Boost library property_tree

I'm trying to cross compile a project which require boost property_tree but I'm having trouble with the CMake on windows.
On my system, boost is located at C:/Program Files (x86)/boost/boost_1_66_0 and the headers file are located in the boost subdirectory. I therefore set those in my CMakeLists.txt
SET (BOOST_ROOT "C:/Program Files (x86)/boost/boost_1_66_0")
SET (BOOST_INCLUDEDIR "${BOOST_ROOT}/boost")
SET(Boost_DEBUG ON)
find_package(Boost REQUIRED COMPONENTS
property_tree )
But Cmake give me the following error:
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1078 ] _boost_TEST_VERSIONS = 1.65.1;1.65.0;1.65;1.64.0;1.64;1.63.0;1.63;1.62.0;1.62;1.61.0;1.61;1.60.0;1.60;1.59.0;1.59;1.58.0;1.58;1.57.0;1.57;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1080 ] Boost_USE_MULTITHREADED = TRUE
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1082 ] Boost_USE_STATIC_LIBS =
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1084 ] Boost_USE_STATIC_RUNTIME =
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1086 ] Boost_ADDITIONAL_VERSIONS =
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1088 ] Boost_NO_SYSTEM_PATHS =
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1156 ] Declared as CMake or Environmental Variables:
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1158 ] BOOST_ROOT = C:/Program Files (x86)/boost/boost_1_66_0
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1160 ] BOOST_INCLUDEDIR = C:/Program Files (x86)/boost/boost_1_66_0/boost
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1162 ] BOOST_LIBRARYDIR =
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1164 ] _boost_TEST_VERSIONS = 1.65.1;1.65.0;1.65;1.64.0;1.64;1.63.0;1.63;1.62.0;1.62;1.61.0;1.61;1.60.0;1.60;1.59.0;1.59;1.58.0;1.58;1.57.0;1.57;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1263 ] location of version.hpp: C:/Program Files (x86)/boost/boost_1_66_0/boost/version.hpp
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1287 ] version.hpp reveals boost 1.66.0
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1373 ] guessed _boost_COMPILER = -vc141;-vc140
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1383 ] _boost_MULTITHREADED = -mt
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1427 ] _boost_RELEASE_ABI_TAG = -
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1429 ] _boost_DEBUG_ABI_TAG = -gd
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1491 ] _boost_LIBRARY_SEARCH_DIRS_RELEASE = C:/Program Files (x86)/boost/boost_1_66_0/lib;C:/Program Files (x86)/boost/boost_1_66_0/stage/lib;C:/Program Files (x86)/boost/boost_1_66_0/lib32-msvc-14.1;C:/Program Files (x86)/boost/boost_1_66_0/lib32-msvc-14.0;C:/Program Files (x86)/boost/boost_1_66_0/lib;C:/Program Files (x86)/boost/boost_1_66_0/../lib;C:/Program Files (x86)/boost/boost_1_66_0/stage/lib;C:/Program Files (x86)/boost/boost_1_66_0/../lib32-msvc-14.1;C:/Program Files (x86)/boost/boost_1_66_0/../lib32-msvc-14.0;C:/local/boost_1_65_1/lib32-msvc-14.1;C:/local/boost_1_65_1/lib32-msvc-14.0;C:/local/boost_1_65_0/lib32-msvc-14.1;C:/local/boost_1_65_0/lib32-msvc-14.0;C:/local/boost_1_65/lib32-msvc-14.1;C:/local/boost_1_65/lib32-msvc-14.0;C:/local/boost_1_64_0/lib32-msvc-14.1;C:/local/boost_1_64_0/lib32-msvc-14.0;C:/local/boost_1_64/lib32-msvc-14.1;C:/local/boost_1_64/lib32-msvc-14.0;C:/local/boost_1_63_0/lib32-msvc-14.1;C:/local/boost_1_63_0/lib32-msvc-14.0;C:/local/boost_1_63/lib32-msvc-14.1;C:/local/boost_1_63/lib32-msvc-14.0;C:/local/boost_1_62_0/lib32-msvc-14.1;C:/local/boost_1_62_0/lib32-msvc-14.0;C:/local/boost_1_62/lib32-msvc-14.1;C:/local/boost_1_62/lib32-msvc-14.0;C:/local/boost_1_61_0/lib32-msvc-14.1;C:/local/boost_1_61_0/lib32-msvc-14.0;C:/local/boost_1_61/lib32-msvc-14.1;C:/local/boost_1_61/lib32-msvc-14.0;C:/local/boost_1_60_0/lib32-msvc-14.1;C:/local/boost_1_60_0/lib32-msvc-14.0;C:/local/boost_1_60/lib32-msvc-14.1;C:/local/boost_1_60/lib32-msvc-14.0;C:/local/boost_1_59_0/lib32-msvc-14.1;C:/local/boost_1_59_0/lib32-msvc-14.0;C:/local/boost_1_59/lib32-msvc-14.1;C:/local/boost_1_59/lib32-msvc-14.0;C:/local/boost_1_58_0/lib32-msvc-14.1;C:/local/boost_1_58_0/lib32-msvc-14.0;C:/local/boost_1_58/lib32-msvc-14.1;C:/local/boost_1_58/lib32-msvc-14.0;C:/local/boost_1_57_0/lib32-msvc-14.1;C:/local/boost_1_57_0/lib32-msvc-14.0;C:/local/boost_1_57/lib32-msvc-14.1;C:/local/boost_1_57/lib32-msvc-14.0;C:/local/boost_1_56_0/lib32-msvc-14.1;C:/local/boost_1_56_0/lib32-msvc-14.0;C:/local/boost_1_56/lib32-msvc-14.1;C:/local/boost_1_56/lib32-msvc-14.0;C:/local/boost_1_55_0/lib32-msvc-14.1;C:/local/boost_1_55_0/lib32-msvc-14.0;C:/local/boost_1_55/lib32-msvc-14.1;C:/local/boost_1_55/lib32-msvc-14.0;C:/local/boost_1_54_0/lib32-msvc-14.1;C:/local/boost_1_54_0/lib32-msvc-14.0;C:/local/boost_1_54/lib32-msvc-14.1;C:/local/boost_1_54/lib32-msvc-14.0;C:/local/boost_1_53_0/lib32-msvc-14.1;C:/local/boost_1_53_0/lib32-msvc-14.0;C:/local/boost_1_53/lib32-msvc-14.1;C:/local/boost_1_53/lib32-msvc-14.0;C:/local/boost_1_52_0/lib32-msvc-14.1;C:/local/boost_1_52_0/lib32-msvc-14.0;C:/local/boost_1_52/lib32-msvc-14.1;C:/local/boost_1_52/lib32-msvc-14.0;C:/local/boost_1_51_0/lib32-msvc-14.1;C:/local/boost_1_51_0/lib32-msvc-14.0;C:/local/boost_1_51/lib32-msvc-14.1;C:/local/boost_1_51/lib32-msvc-14.0;C:/local/boost_1_50_0/lib32-msvc-14.1;C:/local/boost_1_50_0/lib32-msvc-14.0;C:/local/boost_1_50/lib32-msvc-14.1;C:/local/boost_1_50/lib32-msvc-14.0;C:/local/boost_1_49_0/lib32-msvc-14.1;C:/local/boost_1_49_0/lib32-msvc-14.0;C:/local/boost_1_49/lib32-msvc-14.1;C:/local/boost_1_49/lib32-msvc-14.0;C:/local/boost_1_48_0/lib32-msvc-14.1;C:/local/boost_1_48_0/lib32-msvc-14.0;C:/local/boost_1_48/lib32-msvc-14.1;C:/local/boost_1_48/lib32-msvc-14.0;C:/local/boost_1_47_0/lib32-msvc-14.1;C:/local/boost_1_47_0/lib32-msvc-14.0;C:/local/boost_1_47/lib32-msvc-14.1;C:/local/boost_1_47/lib32-msvc-14.0;C:/local/boost_1_46_1/lib32-msvc-14.1;C:/local/boost_1_46_1/lib32-msvc-14.0;C:/local/boost_1_46_0/lib32-msvc-14.1;C:/local/boost_1_46_0/lib32-msvc-14.0;C:/local/boost_1_46/lib32-msvc-14.1;C:/local/boost_1_46/lib32-msvc-14.0;C:/local/boost_1_45_0/lib32-msvc-14.1;C:/local/boost_1_45_0/lib32-msvc-14.0;C:/local/boost_1_45/lib32-msvc-14.1;C:/local/boost_1_45/lib32-msvc-14.0;C:/local/boost_1_44_0/lib32-msvc-14.1;C:/local/boost_1_44_0/lib32-msvc-14.0;C:/local/boost_1_44/lib32-msvc-14.1;C:/local/boost_1_44/lib32-msvc-14.0;C:/local/boost_1_43_0/lib32-msvc-14.1;C:/local/boost_1_43_0/lib32-msvc-14.0;C:/local/boost_1_43/lib32-msvc-14.1;C:/local/boost_1_43/lib32-msvc-14.0;C:/local/boost_1_42_0/lib32-msvc-14.1;C:/local/boost_1_42_0/lib32-msvc-14.0;C:/local/boost_1_42/lib32-msvc-14.1;C:/local/boost_1_42/lib32-msvc-14.0;C:/local/boost_1_41_0/lib32-msvc-14.1;C:/local/boost_1_41_0/lib32-msvc-14.0;C:/local/boost_1_41/lib32-msvc-14.1;C:/local/boost_1_41/lib32-msvc-14.0;C:/local/boost_1_40_0/lib32-msvc-14.1;C:/local/boost_1_40_0/lib32-msvc-14.0;C:/local/boost_1_40/lib32-msvc-14.1;C:/local/boost_1_40/lib32-msvc-14.0;C:/local/boost_1_39_0/lib32-msvc-14.1;C:/local/boost_1_39_0/lib32-msvc-14.0;C:/local/boost_1_39/lib32-msvc-14.1;C:/local/boost_1_39/lib32-msvc-14.0;C:/local/boost_1_38_0/lib32-msvc-14.1;C:/local/boost_1_38_0/lib32-msvc-14.0;C:/local/boost_1_38/lib32-msvc-14.1;C:/local/boost_1_38/lib32-msvc-14.0;C:/local/boost_1_37_0/lib32-msvc-14.1;C:/local/boost_1_37_0/lib32-msvc-14.0;C:/local/boost_1_37/lib32-msvc-14.1;C:/local/boost_1_37/lib32-msvc-14.0;C:/local/boost_1_36_1/lib32-msvc-14.1;C:/local/boost_1_36_1/lib32-msvc-14.0;C:/local/boost_1_36_0/lib32-msvc-14.1;C:/local/boost_1_36_0/lib32-msvc-14.0;C:/local/boost_1_36/lib32-msvc-14.1;C:/local/boost_1_36/lib32-msvc-14.0;C:/local/boost_1_35_1/lib32-msvc-14.1;C:/local/boost_1_35_1/lib32-msvc-14.0;C:/local/boost_1_35_0/lib32-msvc-14.1;C:/local/boost_1_35_0/lib32-msvc-14.0;C:/local/boost_1_35/lib32-msvc-14.1;C:/local/boost_1_35/lib32-msvc-14.0;C:/local/boost_1_34_1/lib32-msvc-14.1;C:/local/boost_1_34_1/lib32-msvc-14.0;C:/local/boost_1_34_0/lib32-msvc-14.1;C:/local/boost_1_34_0/lib32-msvc-14.0;C:/local/boost_1_34/lib32-msvc-14.1;C:/local/boost_1_34/lib32-msvc-14.0;C:/local/boost_1_33_1/lib32-msvc-14.1;C:/local/boost_1_33_1/lib32-msvc-14.0;C:/local/boost_1_33_0/lib32-msvc-14.1;C:/local/boost_1_33_0/lib32-msvc-14.0;C:/local/boost_1_33/lib32-msvc-14.1;C:/local/boost_1_33/lib32-msvc-14.0;C:/boost/lib32-msvc-14.1;C:/boost/lib32-msvc-14.0;PATHS;C:/boost/lib;C:/boost;/sw/local/lib_boost_LIBRARY_SEARCH_DIRS_DEBUG = C:/Program Files (x86)/boost/boost_1_66_0/lib;C:/Program Files (x86)/boost/boost_1_66_0/stage/lib;C:/Program Files (x86)/boost/boost_1_66_0/lib32-msvc-14.1;C:/Program Files (x86)/boost/boost_1_66_0/lib32-msvc-14.0;C:/Program Files (x86)/boost/boost_1_66_0/lib;C:/Program Files (x86)/boost/boost_1_66_0/../lib;C:/Program Files (x86)/boost/boost_1_66_0/stage/lib;C:/Program Files (x86)/boost/boost_1_66_0/../lib32-msvc-14.1;C:/Program Files (x86)/boost/boost_1_66_0/../lib32-msvc-14.0;C:/local/boost_1_65_1/lib32-msvc-14.1;C:/local/boost_1_65_1/lib32-msvc-14.0;C:/local/boost_1_65_0/lib32-msvc-14.1;C:/local/boost_1_65_0/lib32-msvc-14.0;C:/local/boost_1_65/lib32-msvc-14.1;C:/local/boost_1_65/lib32-msvc-14.0;C:/local/boost_1_64_0/lib32-msvc-14.1;C:/local/boost_1_64_0/lib32-msvc-14.0;C:/local/boost_1_64/lib32-msvc-14.1;C:/local/boost_1_64/lib32-msvc-14.0;C:/local/boost_1_63_0/lib32-msvc-14.1;C:/local/boost_1_63_0/lib32-msvc-14.0;C:/local/boost_1_63/lib32-msvc-14.1;C:/local/boost_1_63/lib32-msvc-14.0;C:/local/boost_1_62_0/lib32-msvc-14.1;C:/local/boost_1_62_0/lib32-msvc-14.0;C:/local/boost_1_62/lib32-msvc-14.1;C:/local/boost_1_62/lib32-msvc-14.0;C:/local/boost_1_61_0/lib32-msvc-14.1;C:/local/boost_1_61_0/lib32-msvc-14.0;C:/local/boost_1_61/lib32-msvc-14.1;C:/local/boost_1_61/lib32-msvc-14.0;C:/local/boost_1_60_0/lib32-msvc-14.1;C:/local/boost_1_60_0/lib32-msvc-14.0;C:/local/boost_1_60/lib32-msvc-14.1;C:/local/boost_1_60/lib32-msvc-14.0;C:/local/boost_1_59_0/lib32-msvc-14.1;C:/local/boost_1_59_0/lib32-msvc-14.0;C:/local/boost_1_59/lib32-msvc-14.1;C:/local/boost_1_59/lib32-msvc-14.0;C:/local/boost_1_58_0/lib32-msvc-14.1;C:/local/boost_1_58_0/lib32-msvc-14.0;C:/local/boost_1_58/lib32-msvc-14.1;C:/local/boost_1_58/lib32-msvc-14.0;C:/local/boost_1_57_0/lib32-msvc-14.1;C:/local/boost_1_57_0/lib32-msvc-14.0;C:/local/boost_1_57/lib32-msvc-14.1;C:/local/boost_1_57/lib32-msvc-14.0;C:/local/boost_1_56_0/lib32-msvc-14.1;C:/local/boost_1_56_0/lib32-msvc-14.0;C:/local/boost_1_56/lib32-msvc-14.1;C:/local/boost_1_56/lib32-msvc-14.0;C:/local/boost_1_55_0/lib32-msvc-14.1;C:/local/boost_1_55_0/lib32-msvc-14.0;C:/local/boost_1_55/lib32-msvc-14.1;C:/local/boost_1_55/lib32-msvc-14.0;C:/local/boost_1_54_0/lib32-msvc-14.1;C:/local/boost_1_54_0/lib32-msvc-14.0;C:/local/boost_1_54/lib32-msvc-14.1;C:/local/boost_1_54/lib32-msvc-14.0;C:/local/boost_1_53_0/lib32-msvc-14.1;C:/local/boost_1_53_0/lib32-msvc-14.0;C:/local/boost_1_53/lib32-msvc-14.1;C:/local/boost_1_53/lib32-msvc-14.0;C:/local/boost_1_52_0/lib32-msvc-14.1;C:/local/boost_1_52_0/lib32-msvc-14.0;C:/local/boost_1_52/lib32-msvc-14.1;C:/local/boost_1_52/lib32-msvc-14.0;C:/local/boost_1_51_0/lib32-msvc-14.1;C:/local/boost_1_51_0/lib32-msvc-14.0;C:/local/boost_1_51/lib32-msvc-14.1;C:/local/boost_1_51/lib32-msvc-14.0;C:/local/boost_1_50_0/lib32-msvc-14.1;C:/local/boost_1_50_0/lib32-msvc-14.0;C:/local/boost_1_50/lib32-msvc-14.1;C:/local/boost_1_50/lib32-msvc-14.0;C:/local/boost_1_49_0/lib32-msvc-14.1;C:/local/boost_1_49_0/lib32-msvc-14.0;C:/local/boost_1_49/lib32-msvc-14.1;C:/local/boost_1_49/lib32-msvc-14.0;C:/local/boost_1_48_0/lib32-msvc-14.1;C:/local/boost_1_48_0/lib32-msvc-14.0;C:/local/boost_1_48/lib32-msvc-14.1;C:/local/boost_1_48/lib32-msvc-14.0;C:/local/boost_1_47_0/lib32-msvc-14.1;C:/local/boost_1_47_0/lib32-msvc-14.0;C:/local/boost_1_47/lib32-msvc-14.1;C:/local/boost_1_47/lib32-msvc-14.0;C:/local/boost_1_46_1/lib32-msvc-14.1;C:/local/boost_1_46_1/lib32-msvc-14.0;C:/local/boost_1_46_0/lib32-msvc-14.1;C:/local/boost_1_46_0/lib32-msvc-14.0;C:/local/boost_1_46/lib32-msvc-14.1;C:/local/boost_1_46/lib32-msvc-14.0;C:/local/boost_1_45_0/lib32-msvc-14.1;C:/local/boost_1_45_0/lib32-msvc-14.0;C:/local/boost_1_45/lib32-msvc-14.1;C:/local/boost_1_45/lib32-msvc-14.0;C:/local/boost_1_44_0/lib32-msvc-14.1;C:/local/boost_1_44_0/lib32-msvc-14.0;C:/local/boost_1_44/lib32-msvc-14.1;C:/local/boost_1_44/lib32-msvc-14.0;C:/local/boost_1_43_0/lib32-msvc-14.1;C:/local/boost_1_43_0/lib32-msvc-14.0;C:/local/boost_1_43/lib32-msvc-14.1;C:/local/boost_1_43/lib32-msvc-14.0;C:/local/boost_1_42_0/lib32-msvc-14.1;C:/local/boost_1_42_0/lib32-msvc-14.0;C:/local/boost_1_42/lib32-msvc-14.1;C:/local/boost_1_42/lib32-msvc-14.0;C:/local/boost_1_41_0/lib32-msvc-14.1;C:/local/boost_1_41_0/lib32-msvc-14.0;C:/local/boost_1_41/lib32-msvc-14.1;C:/local/boost_1_41/lib32-msvc-14.0;C:/local/boost_1_40_0/lib32-msvc-14.1;C:/local/boost_1_40_0/lib32-msvc-14.0;C:/local/boost_1_40/lib32-msvc-14.1;C:/local/boost_1_40/lib32-msvc-14.0;C:/local/boost_1_39_0/lib32-msvc-14.1;C:/local/boost_1_39_0/lib32-msvc-14.0;C:/local/boost_1_39/lib32-msvc-14.1;C:/local/boost_1_39/lib32-msvc-14.0;C:/local/boost_1_38_0/lib32-msvc-14.1;C:/local/boost_1_38_0/lib32-msvc-14.0;C:/local/boost_1_38/lib32-msvc-14.1;C:/local/boost_1_38/lib32-msvc-14.0;C:/local/boost_1_37_0/lib32-msvc-14.1;C:/local/boost_1_37_0/lib32-msvc-14.0;C:/local/boost_1_37/lib32-msvc-14.1;C:/local/boost_1_37/lib32-msvc-14.0;C:/local/boost_1_36_1/lib32-msvc-14.1;C:/local/boost_1_36_1/lib32-msvc-14.0;C:/local/boost_1_36_0/lib32-msvc-14.1;C:/local/boost_1_36_0/lib32-msvc-14.0;C:/local/boost_1_36/lib32-msvc-14.1;C:/local/boost_1_36/lib32-msvc-14.0;C:/local/boost_1_35_1/lib32-msvc-14.1;C:/local/boost_1_35_1/lib32-msvc-14.0;C:/local/boost_1_35_0/lib32-msvc-14.1;C:/local/boost_1_35_0/lib32-msvc-14.0;C:/local/boost_1_35/lib32-msvc-14.1;C:/local/boost_1_35/lib32-msvc-14.0;C:/local/boost_1_34_1/lib32-msvc-14.1;C:/local/boost_1_34_1/lib32-msvc-14.0;C:/local/boost_1_34_0/lib32-msvc-14.1;C:/local/boost_1_34_0/lib32-msvc-14.0;C:/local/boost_1_34/lib32-msvc-14.1;C:/local/boost_1_34/lib32-msvc-14.0;C:/local/boost_1_33_1/lib32-msvc-14.1;C:/local/boost_1_33_1/lib32-msvc-14.0;C:/local/boost_1_33_0/lib32-msvc-14.1;C:/local/boost_1_33_0/lib32-msvc-14.0;C:/local/boost_1_33/lib32-msvc-14.1;C:/local/boost_1_33/lib32-msvc-14.0;C:/boost/lib32-msvc-14.1;C:/boost/lib32-msvc-14.0;PATHS;C:/boost/lib;C:/boost;/sw/local/lib
CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:18 (find_package)
CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1610 (message):
No header defined for property_tree; skipping header check
Call Stack (most recent call first):
CMakeLists.txt:18 (find_package)
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1641 ] Searching for PROPERTY_TREE_LIBRARY_RELEASE: boost_property_tree-vc141-mt-1_66;boost_property_tree-vc141-mt;boost_property_tree-vc140-mt-1_66;boost_property_tree-vc140-mt;boost_property_tree-mt-1_66;boost_property_tree-mt;boost_property_tree
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1692 ] Searching for PROPERTY_TREE_LIBRARY_DEBUG: boost_property_tree-vc141-mt-gd-1_66;boost_property_tree-vc141-mt-gd;boost_property_tree-vc140-mt-gd-1_66;boost_property_tree-vc140-mt-gd;boost_property_tree-mt-gd-1_66;boost_property_tree-mt-gd;boost_property_tree-mt;boost_property_tree
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1767 ] Boost_FOUND = 1
CMake Error at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1928 (message):
Unable to find the requested Boost libraries.
Boost version: 1.66.0
Boost include path: C:/Program Files (x86)/boost/boost_1_66_0
Could not find the following Boost libraries:
boost_property_tree
No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the
directory containing Boost libraries or BOOST_ROOT to the location of
Boost.
Call Stack (most recent call first):
CMakeLists.txt:18 (find_package)
Any idea of what I am doing wrong ?