Replies: 4 comments 1 reply
-
|
I would rather throw FATAL_ERROR if And I also forgot the |
Beta Was this translation helpful? Give feedback.
-
|
You can write which defines it to be installed in Release mode, but doesn't say what to do in Debug mode, i.e. it won't do anything in debug mode, which I think is what you want to achieve |
Beta Was this translation helpful? Give feedback.
-
|
Exactly, that's it, in this case it would look like this: if(TOM_EXAMPLE)
if(TINY_VCPKG)
install(TARGETS ${TomExample_target}
CONFIGURATIONS Release
EXPORT TinyOrmTargets RUNTIME
)
else()
install(TARGETS ${TomExample_target} EXPORT TinyOrmTargets RUNTIME)
endif()
endif()But this is unnecessary, current code works well in all scenarios. |
Beta Was this translation helpful? Give feedback.
-
|
Yeah, I know about this and I also remember why I decided this way, I decided to have the portfile as small as possible, and as you can see I'm installing it in the way that vcpkg is expecting. So I'm handling it in the TinyDeployment.cmake instead of in the portfile. I also agree that this solution that you are proposing is nicer, smaller, and more clear but I will not rewrite it again, it works well. Also, look a few lines down there is another Everything is fine and works superb, except there are three |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to discuss it, I looked at it now and it's correct.
All these
if()conditions that contain theCMAKE_BUILD_TYPEin theTinyDeployment.cmakewill never fail because theTINY_VCPKGis always before, like(TINY_VCPKG AND CMAKE_BUILD_TYPE STREQUAL "Debug")so if theTINY_VCPKGisfalsethe second expressionCMAKE_BUILD_TYPEwill not be considered.The
TINY_VCPKGistrueonly in the vcpkg port files here and thevcpkg_cmake_configure()guarantees that the build will beNinjaorUnix Makefilessingle-configuration, thisif()condition guarantees it.So can't happen that the code will be invoked with the multi-config generator.
The
CONFIGURATIONSoption doesn't support gen-ex so I can't write something like this:What means I would need two
install(TARGETS)commands one for the vcpkg and the other for everything else and that's pointless (even if it is more correct).What do you think? @SchaichAlonso
Beta Was this translation helpful? Give feedback.
All reactions