Jinja2Cpp: Error when running "cmake --build . --target all" (actually it's --target ALL_BUILD)
[Note: When I build Jinja2Cpp project files for VS2017, the project files include ALL_BUILD.vcxproj and INSTALL.vcxproj; there’s no “install.vcxproj” or “all.vcxproj”; running the command cmake --build . --target install gave an error saying that there’s no file called “all.vcxproj”.]
When I ran the command cmake --build . --target ALL_BUILD, it seemed to run fine and was building it, but then it tried to find and link against libboost_filesystem-vc141-mt-gd-1_64.lib and stopped with a linker error. Is there a way to fix this? Also, is there a way to tell it to use my existing Boost 1.68.0 installation (since it should be able to find and use that easily if configured (right?))?
Also, I want to generate code for both debug and release configurations. What CMake flags should I use for that?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 117 (2 by maintainers)
Commits related to this issue
- Fix '/DBOOST_ALL_NO_LIB' definition passing #80 — committed to jinja2cpp/Jinja2Cpp by flexferrum 6 years ago
- Fix '/DBOOST_ALL_NO_LIB' definition passing #80 — committed to jinja2cpp/Jinja2Cpp by flexferrum 6 years ago
That’s why because std::variant is used instead of nonstd::variant (for this particular configuration).
@DragonOsman , please, check if
variant_VARIANT_NONSTDis defined for your project (currency_converter.vcpojx). If not, define manually in your CMakeLists.txt.@martinmoene , actually, everything should be ok, 'cos I explicitly set this define:
target_compile_definitions(${LIB_TARGET_NAME} PUBLIC variant_CONFIG_SELECT_VARIANT=variant_VARIANT_NONSTD)https://github.com/flexferrum/Jinja2Cpp/blob/f0485b293b9d3c77907ac7f3ba83c9683714c98e/CMakeLists.txt#L73That’s too long ago.
Because in:
/DBOOST_ALL_NO_LIBis not an option (but a define)?With the following,
/DBOOST_ALL_NO_LIBdoes end up in the .vcxproj files:… and that definitely solves the problem!
Argh, it must be
BOOST_ALL_NO_LIB, checking again …