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

Most upvoted comments

That’s why because std::variant is used instead of nonstd::variant (for this particular configuration).

@DragonOsman , please, check if variant_VARIANT_NONSTD is 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#L73

That’s too long ago.

Because in:

set (COMMON_MSVC_OPTS "/wd4503 /DBOOST_ALL_NO_LIB")

/DBOOST_ALL_NO_LIB is not an option (but a define)?

With the following, /DBOOST_ALL_NO_LIB does end up in the .vcxproj files:

set (COMMON_MSVC_OPTS "/wd4503")
add_definitions(/DBOOST_ALL_NO_LIB) 

… and that definitely solves the problem!

Argh, it must be BOOST_ALL_NO_LIB, checking again …