conan-io / cmake-conan

CMake wrapper for conan C and C++ package manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Release build getting debug generators folder set

etodanik opened this issue · comments

My conan setup ends up pointing to debug generators when I set build type to Release. I suspect that it might be something the plugin misunderstands?

Here is my log.

C:\Users\danny\AppData\Local\Programs\CLion\bin\cmake\win\x64\bin\cmake.exe -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=C:/Users/danny/AppData/Local/Programs/CLion/bin/ninja/win/x64/ninja.exe -G Ninja -DBUILD_TESTING:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=ON "-DCONAN_COMMAND=C:\Program Files\Conan\conan\conan.exe" -DBUILD_INTEGRATION:BOOL=ON -DBUILD_WITH_MT:BOOL=ON -DCEF_RUNTIME_LIBRARY_FLAG:STRING=/MD -DUSE_SANDBOX:BOOL=OFF -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=C:\Users\danny\CLionProjects\myproject-addon\conan_provider.cmake -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=C:\Users\danny\CLionProjects\myproject-addon\conan_provider.cmake -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=C:\Users\danny\CLionProjects\myproject-addon\conan_provider.cmake -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=C:\Users\danny\CLionProjects\myproject-addon\conan_provider.cmake -S C:\Users\danny\CLionProjects\myproject-addon -B C:\Users\danny\CLionProjects\myproject-addon\cmake-build-release-visual-studio
-- Found: clang-format
-- Found: cppcheck
-- CMake-Conan: first find_package() found. Installing dependencies with Conan
-- CMake-Conan: Checking if a default profile exists
C:\Users\danny\.conan2\profiles\default
-- CMake-Conan: cmake_system_name=Windows
-- CMake-Conan: cmake_system_processor=x86_64
-- CMake-Conan: CMake compiler=MSVC
-- CMake-Conan: CMake compiler version=19.37.32822.0
-- CMake-Conan: [settings] compiler=msvc
-- CMake-Conan: [settings] compiler.version=193
-- CMake-Conan: Creating profile C:/Users/danny/CLionProjects/myproject-addon/cmake-build-release-visual-studio/conan_host_profile
-- CMake-Conan: Profile: 
include(default)
[settings]
arch=x86_64
os=Windows
compiler=msvc
compiler.version=193
compiler.cppstd=17
[conf]
tools.cmake.cmaketoolchain:generator=Ninja

-- CMake-Conan: Installing both Debug and Release
-- CMake-Conan: conan install C:/Users/danny/CLionProjects/myproject-addon -of=C:/Users/danny/CLionProjects/myproject-addon/cmake-build-release-visual-studio/conan -pr;C:/Users/danny/CLionProjects/myproject-addon/cmake-build-release-visual-studio/conan_host_profile;-s;build_type=Release;--build=missing;-g;CMakeDeps

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=17
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=193
os=Windows
[conf]
tools.cmake.cmaketoolchain:generator=Ninja

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=14
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=193
os=Windows


======== Computing dependency graph ========
conanfile.py: RUN: conan export --user user --channel stable --version cci.20220630 C:/Users/danny/CLionProjects/myproject-addon\conan\detours

======== Exporting recipe to the cache ========
detours/cci.20220630@user/stable: Exporting package recipe: C:/Users/danny/CLionProjects/myproject-addon\conan\detours\conanfile.py
detours/cci.20220630@user/stable: exports: File 'conandata.yml' found. Exporting it...
detours/cci.20220630@user/stable: Calling export_sources()
detours/cci.20220630@user/stable: Copied 1 '.yml' file: conandata.yml
detours/cci.20220630@user/stable: Copied 1 '.py' file: conanfile.py
detours/cci.20220630@user/stable: Copied 1 '.txt' file: CMakeLists.txt
detours/cci.20220630@user/stable: Exported to cache folder: C:\Users\danny\.conan2\p\detou43e4477e353cc\e
detours/cci.20220630@user/stable: Exported: detours/cci.20220630@user/stable#6b632b6a8c5a283b79eefae1284d65dc (2023-09-06 01:22:41 UTC)

conanfile.py: RUN: conan export --user user --channel stable --version 0.0.4 C:/Users/danny/CLionProjects/myproject-addon\conan\plibsys

======== Exporting recipe to the cache ========
plibsys/0.0.4@user/stable: Exporting package recipe: C:/Users/danny/CLionProjects/myproject-addon\conan\plibsys\conanfile.py
plibsys/0.0.4@user/stable: Copied 1 '.py' file: conanfile.py
plibsys/0.0.4@user/stable: Copied 1 '.md' file: LICENSE.md
plibsys/0.0.4@user/stable: Copied 1 '.txt' file: CMakeLists.txt
plibsys/0.0.4@user/stable: Exported to cache folder: C:\Users\danny\.conan2\p\plibs1429bf2ae5815\e
plibsys/0.0.4@user/stable: Exported: plibsys/0.0.4@user/stable#007be8c67cef41734a86eb85fcadd815 (2023-09-06 01:22:42 UTC)

Graph root
    conanfile.py: C:/Users/danny/CLionProjects/myproject-addon\conanfile.py
Requirements
    bgfx/cci.20230216#d0bbce02186a893b282d15b21c42eca7 - Cache
    bimg/cci.20230114#e6508ae8f3b912cd8a7d0ed0915f6a63 - Cache
    bx/cci.20221116#3b61fd9ea59776992f661217bec13bb6 - Cache
    detours/cci.20220630@user/stable#6b632b6a8c5a283b79eefae1284d65dc - Cache
    doctest/2.4.11#a4211dfc329a16ba9f280f9574025659 - Cache
    opengl/system#b29589c04d6df84c110d6acb066ab653 - Cache
    plibsys/0.0.4@user/stable#007be8c67cef41734a86eb85fcadd815 - Cache
    sdl/2.28.2#218125eaa98eaf195b5eac20e52807a4 - Cache
Build requirements
    cccl/1.3#6c9fc62128a11c1805de5dff1a1a0639 - Cache
    genie/1170#83cec5ee811a1a23f3e3cae90fa9769c - Cache
    msys2/cci.latest#567331f1604f3c584f04feade960f06e - Cache

======== Computing necessary packages ========
detours/cci.20220630@user/stable: target process is X64
bx/cci.20221116: Checking 3 compatible configurations:
bx/cci.20221116: '74210726f80c6efb4ecc0087460b845cf5ab52c4': compiler.cppstd=14
bx/cci.20221116: Main binary package 'edbe57e168119239772070f7bbf6180117cd218c' missing. Using compatible package '74210726f80c6efb4ecc0087460b845cf5ab52c4'
bimg/cci.20230114: Checking 3 compatible configurations:
bimg/cci.20230114: '157a172e52e6beb7c24cf5c05bdd41d0d9e92164': compiler.cppstd=14
bimg/cci.20230114: Main binary package 'ce8e06540568261e4c352f05c94e3e6d7b1d08fd' missing. Using compatible package '157a172e52e6beb7c24cf5c05bdd41d0d9e92164'
bgfx/cci.20230216: Checking 3 compatible configurations:
bgfx/cci.20230216: '42c298664c2c28a82368b0c5d08a91d243f1ebd8': compiler.cppstd=14
bgfx/cci.20230216: Main binary package '587e1022b7720da905cc8f739c86951130985990' missing. Using compatible package '42c298664c2c28a82368b0c5d08a91d243f1ebd8'
Requirements
    bgfx/cci.20230216#d0bbce02186a893b282d15b21c42eca7:42c298664c2c28a82368b0c5d08a91d243f1ebd8#919123c1fb5a783aea18d16420939a83 - Cache
    bimg/cci.20230114#e6508ae8f3b912cd8a7d0ed0915f6a63:157a172e52e6beb7c24cf5c05bdd41d0d9e92164#a300f716dc3b59d45af57daf09dd559e - Cache
    bx/cci.20221116#3b61fd9ea59776992f661217bec13bb6:74210726f80c6efb4ecc0087460b845cf5ab52c4#d092997e4889260bef686cbfa1cd5fca - Cache
    detours/cci.20220630@user/stable#6b632b6a8c5a283b79eefae1284d65dc:2068baaab67a8d1ae925bbe12c37df5b885a6d56#772d12a2c3c55e63224c486cb3be7b29 - Cache
    doctest/2.4.11#a4211dfc329a16ba9f280f9574025659:da39a3ee5e6b4b0d3255bfef95601890afd80709#c64e99fa3cf2e427c3b1dfd6c0ff0f68 - Cache
    opengl/system#b29589c04d6df84c110d6acb066ab653:da39a3ee5e6b4b0d3255bfef95601890afd80709#0ba8627bd47edc3a501e8f0eb9a79e5e - Cache
    plibsys/0.0.4@user/stable#007be8c67cef41734a86eb85fcadd815:f7dcd1cec4586c154a242a765a1de011300db8e2#6cd19c58503f1b9301c12dc8640d9395 - Cache
    sdl/2.28.2#218125eaa98eaf195b5eac20e52807a4:8e40a03e74608ac8499063f4621a06fc3d479112#9b9f28cb54c59c01c980a2aa38ffb55a - Cache
Build requirements
Skipped binaries
    cccl/1.3, genie/1170, msys2/cci.latest

======== Installing packages ========
detours/cci.20220630@user/stable: Already installed! (1 of 8)
doctest/2.4.11: Already installed! (2 of 8)
opengl/system: Already installed! (3 of 8)
plibsys/0.0.4@user/stable: Already installed! (4 of 8)
sdl/2.28.2: Already installed! (5 of 8)
bx/cci.20221116: Already installed! (6 of 8)
bimg/cci.20230114: Already installed! (7 of 8)
bgfx/cci.20230216: Already installed! (8 of 8)
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated:     'cpp_info.filenames' used in: bimg/cci.20230114, bgfx/cci.20230216, bx/cci.20221116, opengl/system
WARN: deprecated:     'cpp_info.names' used in: bgfx/cci.20230216, bx/cci.20221116, bimg/cci.20230114, sdl/2.28.2

======== Finalizing install (deploy, generators) ========
conanfile.py: Writing generators to C:\Users\danny\CLionProjects\myproject-addon\cmake-build-release-visual-studio\conan\build\Release\generators
conanfile.py: Generator 'CMakeDeps' calling 'generate()'
conanfile.py: Calling generate()
conanfile.py: Generators folder: C:\Users\danny\CLionProjects\myproject-addon\cmake-build-release-visual-studio\conan\build\Release\generators
conanfile.py: CMakeToolchain generated: conan_toolchain.cmake
conanfile.py: Preset 'conan-release' added to CMakePresets.json. Invoke it manually using 'cmake --preset conan-release' if using CMake>=3.23
conanfile.py: If your CMake version is not compatible with CMakePresets (<3.23) call cmake like: 'cmake <path> -G Ninja -DCMAKE_TOOLCHAIN_FILE=C:\Users\danny\CLionProjects\myproject-addon\cmake-build-release-visual-studio\conan\build\Release\generators\conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release'
conanfile.py: CMakeToolchain generated: CMakePresets.json
conanfile.py: Generating aggregated env files
conanfile.py: Generated aggregated env files: ['conanbuild.bat', 'conanrun.bat']
Install finished successfully
-- CMake-Conan: CONAN_GENERATORS_FOLDER=C:\Users\danny\CLionProjects\myproject-addon\cmake-build-release-visual-studio\conan\build\Release\generators
-- CMake-Conan: CONANFILE=C:/Users/danny/CLionProjects/myproject-addon/conanfile.py
-- CMake-Conan: conan install C:/Users/danny/CLionProjects/myproject-addon -of=C:/Users/danny/CLionProjects/myproject-addon/cmake-build-release-visual-studio/conan -pr;C:/Users/danny/CLionProjects/myproject-addon/cmake-build-release-visual-studio/conan_host_profile;-s;build_type=Debug;--build=missing;-g;CMakeDeps

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Debug
compiler=msvc
compiler.cppstd=17
compiler.runtime=dynamic
compiler.runtime_type=Debug
compiler.version=193
os=Windows
[conf]
tools.cmake.cmaketoolchain:generator=Ninja

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=14
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=193
os=Windows


======== Computing dependency graph ========
conanfile.py: RUN: conan export --user user --channel stable --version cci.20220630 C:/Users/danny/CLionProjects/myproject-addon\conan\detours

======== Exporting recipe to the cache ========
detours/cci.20220630@user/stable: Exporting package recipe: C:/Users/danny/CLionProjects/myproject-addon\conan\detours\conanfile.py
detours/cci.20220630@user/stable: exports: File 'conandata.yml' found. Exporting it...
detours/cci.20220630@user/stable: Calling export_sources()
detours/cci.20220630@user/stable: Copied 1 '.yml' file: conandata.yml
detours/cci.20220630@user/stable: Copied 1 '.py' file: conanfile.py
detours/cci.20220630@user/stable: Copied 1 '.txt' file: CMakeLists.txt
detours/cci.20220630@user/stable: Exported to cache folder: C:\Users\danny\.conan2\p\detou43e4477e353cc\e
detours/cci.20220630@user/stable: Exported: detours/cci.20220630@user/stable#6b632b6a8c5a283b79eefae1284d65dc (2023-09-06 01:22:43 UTC)

conanfile.py: RUN: conan export --user user --channel stable --version 0.0.4 C:/Users/danny/CLionProjects/myproject-addon\conan\plibsys

======== Exporting recipe to the cache ========
plibsys/0.0.4@user/stable: Exporting package recipe: C:/Users/danny/CLionProjects/myproject-addon\conan\plibsys\conanfile.py
plibsys/0.0.4@user/stable: Copied 1 '.py' file: conanfile.py
plibsys/0.0.4@user/stable: Copied 1 '.md' file: LICENSE.md
plibsys/0.0.4@user/stable: Copied 1 '.txt' file: CMakeLists.txt
plibsys/0.0.4@user/stable: Exported to cache folder: C:\Users\danny\.conan2\p\plibs1429bf2ae5815\e
plibsys/0.0.4@user/stable: Exported: plibsys/0.0.4@user/stable#007be8c67cef41734a86eb85fcadd815 (2023-09-06 01:22:44 UTC)

Graph root
    conanfile.py: C:/Users/danny/CLionProjects/myproject-addon\conanfile.py
Requirements
    bgfx/cci.20230216#d0bbce02186a893b282d15b21c42eca7 - Cache
    bimg/cci.20230114#e6508ae8f3b912cd8a7d0ed0915f6a63 - Cache
    bx/cci.20221116#3b61fd9ea59776992f661217bec13bb6 - Cache
    detours/cci.20220630@user/stable#6b632b6a8c5a283b79eefae1284d65dc - Cache
    doctest/2.4.11#a4211dfc329a16ba9f280f9574025659 - Cache
    opengl/system#b29589c04d6df84c110d6acb066ab653 - Cache
    plibsys/0.0.4@user/stable#007be8c67cef41734a86eb85fcadd815 - Cache
    sdl/2.28.2#218125eaa98eaf195b5eac20e52807a4 - Cache
Build requirements
    cccl/1.3#6c9fc62128a11c1805de5dff1a1a0639 - Cache
    genie/1170#83cec5ee811a1a23f3e3cae90fa9769c - Cache
    msys2/cci.latest#567331f1604f3c584f04feade960f06e - Cache

======== Computing necessary packages ========
detours/cci.20220630@user/stable: target process is X64
Requirements
    bgfx/cci.20230216#d0bbce02186a893b282d15b21c42eca7:f4b82d251cf9a9803f0a530e7f812d229773faf5#aff546f383cb0886257092d98b485fe1 - Cache
    bimg/cci.20230114#e6508ae8f3b912cd8a7d0ed0915f6a63:60c8a231d4b3d8cc46e42ecc9e017f0a5edeeeea#c46e0208dde048831d7698a3f0d95791 - Cache
    bx/cci.20221116#3b61fd9ea59776992f661217bec13bb6:63c8af60ed30a8b5cd8920fd855b9f8c38925b8b#d32dc3bba62710c9c2eec42c88427a5f - Cache
    detours/cci.20220630@user/stable#6b632b6a8c5a283b79eefae1284d65dc:3f23ab942045df646e1419d9a6df0f083079eaaa#d39c1f2f6e98173f35e27dd0fec1bdbe - Cache
    doctest/2.4.11#a4211dfc329a16ba9f280f9574025659:da39a3ee5e6b4b0d3255bfef95601890afd80709#c64e99fa3cf2e427c3b1dfd6c0ff0f68 - Cache
    opengl/system#b29589c04d6df84c110d6acb066ab653:da39a3ee5e6b4b0d3255bfef95601890afd80709#0ba8627bd47edc3a501e8f0eb9a79e5e - Cache
    plibsys/0.0.4@user/stable#007be8c67cef41734a86eb85fcadd815:17b26a16efb893750e4481f98a154db2934ead88#0d7346dc9fd8224c08c52286dc580abc - Cache
    sdl/2.28.2#218125eaa98eaf195b5eac20e52807a4:4b2807ea0986501c5dddac43b0be3419afc62c1a#404f3a3532d43519b95b21336a437f4f - Cache
Build requirements
Skipped binaries
    cccl/1.3, genie/1170, msys2/cci.latest

======== Installing packages ========
detours/cci.20220630@user/stable: Already installed! (1 of 8)
doctest/2.4.11: Already installed! (2 of 8)
opengl/system: Already installed! (3 of 8)
plibsys/0.0.4@user/stable: Already installed! (4 of 8)
sdl/2.28.2: Already installed! (5 of 8)
bx/cci.20221116: Already installed! (6 of 8)
bimg/cci.20230114: Already installed! (7 of 8)
bgfx/cci.20230216: Already installed! (8 of 8)
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated:     'cpp_info.filenames' used in: opengl/system, bimg/cci.20230114, bgfx/cci.20230216, bx/cci.20221116
WARN: deprecated:     'cpp_info.names' used in: bimg/cci.20230114, sdl/2.28.2, bgfx/cci.20230216, bx/cci.20221116

======== Finalizing install (deploy, generators) ========
conanfile.py: Writing generators to C:\Users\danny\CLionProjects\myproject-addon\cmake-build-release-visual-studio\conan\build\Debug\generators
conanfile.py: Generator 'CMakeDeps' calling 'generate()'
conanfile.py: Calling generate()
conanfile.py: Generators folder: C:\Users\danny\CLionProjects\myproject-addon\cmake-build-release-visual-studio\conan\build\Debug\generators
conanfile.py: CMakeToolchain generated: conan_toolchain.cmake
conanfile.py: Preset 'conan-debug' added to CMakePresets.json. Invoke it manually using 'cmake --preset conan-debug' if using CMake>=3.23
conanfile.py: If your CMake version is not compatible with CMakePresets (<3.23) call cmake like: 'cmake <path> -G Ninja -DCMAKE_TOOLCHAIN_FILE=C:\Users\danny\CLionProjects\myproject-addon\cmake-build-release-visual-studio\conan\build\Debug\generators\conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Debug'
conanfile.py: CMakeToolchain generated: CMakePresets.json
conanfile.py: Generating aggregated env files
conanfile.py: Generated aggregated env files: ['conanbuild.bat', 'conanrun.bat']
Install finished successfully
-- CMake-Conan: CONAN_GENERATORS_FOLDER=C:\Users\danny\CLionProjects\myproject-addon\cmake-build-release-visual-studio\conan\build\Debug\generators
-- CMake-Conan: CONANFILE=C:/Users/danny/CLionProjects/myproject-addon/conanfile.py
-- Could NOT find CEF (missing: CEF_DIR)
-- *** CEF CONFIGURATION SETTINGS ***
-- Generator:                    Ninja
-- Platform:                     Windows
-- Project architecture:         x86_64
-- Build type:                   Release
-- Binary distribution root:     C:/Users/danny/CLionProjects/myproject-addon/third_party/cef/cef_binary_116.0.15+g0b8c265+chromium-116.0.5845.111_windows64
-- Visual Studio ATL support:    ON
-- CEF sandbox:                  OFF
-- Standard libraries:           comctl32.lib;gdi32.lib;rpcrt4.lib;shlwapi.lib;ws2_32.lib
-- Compile defines:              __STDC_CONSTANT_MACROS;__STDC_FORMAT_MACROS;WIN32;_WIN32;_WINDOWS;UNICODE;_UNICODE;WINVER=0x0A00;_WIN32_WINNT=0x0A00;NTDDI_VERSION=NTDDI_WIN10_FE;NOMINMAX;WIN32_LEAN_AND_MEAN;_HAS_EXCEPTIONS=0;CEF_USE_ATL;__STDC_CONSTANT_MACROS;__STDC_FORMAT_MACROS;WIN32;_WIN32;_WINDOWS;UNICODE;_UNICODE;WINVER=0x0A00;_WIN32_WINNT=0x0A00;NTDDI_VERSION=NTDDI_WIN10_FE;NOMINMAX;WIN32_LEAN_AND_MEAN;_HAS_EXCEPTIONS=0;CEF_USE_ATL
-- Compile defines (Debug):      
-- Compile defines (Release):    NDEBUG;_NDEBUG;NDEBUG;_NDEBUG
-- C compile flags:              /MP;/Gy;/GR-;/W4;/WX;/wd4100;/wd4127;/wd4244;/wd4324;/wd4481;/wd4512;/wd4701;/wd4702;/wd4996;/Zi;/MP;/Gy;/GR-;/W4;/WX;/wd4100;/wd4127;/wd4244;/wd4324;/wd4481;/wd4512;/wd4701;/wd4702;/wd4996;/Zi 
-- C compile flags (Debug):      /MDd;/RTC1;/Od;/MDd;/RTC1;/Od 
-- C compile flags (Release):    /MD;/O2;/Ob2;/GF;/MD;/O2;/Ob2;/GF 
-- C++ compile flags:            /MP;/Gy;/GR-;/W4;/WX;/wd4100;/wd4127;/wd4244;/wd4324;/wd4481;/wd4512;/wd4701;/wd4702;/wd4996;/Zi;/MP;/Gy;/GR-;/W4;/WX;/wd4100;/wd4127;/wd4244;/wd4324;/wd4481;/wd4512;/wd4701;/wd4702;/wd4996;/Zi /std:c++17;/std:c++17
-- C++ compile flags (Debug):    /MDd;/RTC1;/Od;/MDd;/RTC1;/Od 
-- C++ compile flags (Release):  /MD;/O2;/Ob2;/GF;/MD;/O2;/Ob2;/GF 
-- Exe link flags:                /MANIFEST:NO;/LARGEADDRESSAWARE;/STACK:0x800000;/MANIFEST:NO;/LARGEADDRESSAWARE;/STACK:0x800000
-- Exe link flags (Debug):       /DEBUG;/DEBUG 
-- Exe link flags (Release):      
-- Shared link flags:             
-- Shared link flags (Debug):    /DEBUG;/DEBUG 
-- Shared link flags (Release):   
-- CEF Binary files:             chrome_elf.dll;d3dcompiler_47.dll;libcef.dll;libEGL.dll;libGLESv2.dll;snapshot_blob.bin;v8_context_snapshot.bin;vk_swiftshader.dll;vk_swiftshader_icd.json;vulkan-1.dll
-- CEF Resource files:           chrome_100_percent.pak;chrome_200_percent.pak;resources.pak;icudtl.dat;locales
-- CMake-Conan: find_package(CEF) found, 'conan install' already ran
-- Could NOT find CEF (missing: CEF_DIR)
-- CMake-Conan: find_package(detours) found, 'conan install' already ran
-- Conan: Target declared 'detours::detours'
-- CMAKEJS_CMD_PATH: C:/Program Files/nodejs/cmake-js.cmd
'C:/Program Files/nodejs/cmake-js.cmd' 'print-configure'
info find VS using VS2022 (17.7.34024.191) found at:
info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
info find VS run with --verbose for detailed information
info TOOL Using Visual Studio 17 2022 generator.
info find VS using VS2022 (17.7.34024.191) found at:
info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
info find VS run with --verbose for detailed information
[
  'cmake',
  'C:\\Users\\danny\\CLionProjects\\myproject-addon\\project\\addon-electron',
  '--no-warn-unused-cli',
  '-G',
  'Visual Studio 17 2022',
  '-A',
  'x64',
  '-DCMAKE_JS_VERSION=7.2.1',
  '-DCMAKE_BUILD_TYPE=Release',
  '-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=C:\\Users\\danny\\CLionProjects\\myproject-addon\\project\\addon-electron\\build',
  '-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>',
  '-DCMAKE_JS_INC=C:\\Users\\danny\\.cmake-js\\electron-x64\\v21.1.1\\include\\node',
  '-DCMAKE_JS_SRC=C:/ProgramData/nvm/v18.17.1/node_modules/cmake-js/lib/cpp/win_delay_load_hook.cc',
  '-DNODE_RUNTIME=electron',
  '-DNODE_RUNTIMEVERSION=21.1.1',
  '-DNODE_ARCH=x64',
  '-DCMAKE_JS_LIB=C:\\Users\\danny\\.cmake-js\\electron-x64\\v21.1.1\\x64\\node.lib',
  '-DCMAKE_SHARED_LINKER_FLAGS=/DELAYLOAD:NODE.EXE'
]
-- CMAKE_JS_INC: C:\Users\danny\.cmake-js\electron-x64\v21.1.1\include\node
-- CMAKE_JS_LIB: C:\Users\danny\.cmake-js\electron-x64\v21.1.1\x64\node.lib
-- CMAKE_LIBRARY_OUTPUT_DIRECTORY: \CLionProjects\myproject-addon\project\addon-electron
-- [CMakeJS] Set up variables.
'node' '-p' 'require('node-addon-api').include'
"C:\Users\danny\CLionProjects\myproject-addon\project\addon-electron\node_modules\node-addon-api"
-- NODE_ADDON_API_DIR: C:\Users\danny\CLionProjects\myproject-addon\project\addon-electron\node_modules\node-addon-api

-- CMAKE_BUILD_TYPE: Release
-- CMake-Conan: find_package(CEF) found, 'conan install' already ran
-- Could NOT find CEF (missing: CEF_DIR)
-- CMake-Conan: find_package(SDL2) found, 'conan install' already ran
-- Conan: Component target declared 'SDL2::SDL2'
-- Conan: Component target declared 'SDL2::SDL2main'
CMake Warning at cmake-build-release-visual-studio/conan/build/Debug/generators/SDL2Targets.cmake:25 (message):
  Target name 'SDL2::SDL2-static' already exists.
Call Stack (most recent call first):
  cmake-build-release-visual-studio/conan/build/Debug/generators/SDL2Config.cmake:16 (include)
  conan_provider.cmake:348 (find_package)
  project/browser/examples/simple_sdl/CMakeLists.txt:44 (find_package)


-- CMake-Conan: find_package(CEF) found, 'conan install' already ran
-- Could NOT find CEF (missing: CEF_DIR)
-- CMake-Conan: find_package(CEF) found, 'conan install' already ran
-- Could NOT find CEF (missing: CEF_DIR)
-- CMake-Conan: find_package(detours) found, 'conan install' already ran
-- Conan: Target declared 'detours::detours'
-- CMake-Conan: find_package(SDL2) found, 'conan install' already ran
-- Conan: Component target declared 'SDL2::SDL2'
-- Conan: Component target declared 'SDL2::SDL2main'
CMake Warning at cmake-build-release-visual-studio/conan/build/Debug/generators/SDL2Targets.cmake:25 (message):
  Target name 'SDL2::SDL2-static' already exists.
Call Stack (most recent call first):
  cmake-build-release-visual-studio/conan/build/Debug/generators/SDL2Config.cmake:16 (include)
  conan_provider.cmake:348 (find_package)
  project/cube/CMakeLists.txt:35 (find_package)


-- CMake-Conan: find_package(bgfx) found, 'conan install' already ran
-- Conan: Target declared 'bgfx::bgfx'
-- CMake-Conan: find_package(bimg) found, 'conan install' already ran
-- Conan: Target declared 'bimg::bimg'
-- CMake-Conan: find_package(bx) found, 'conan install' already ran
-- Conan: Target declared 'bx::bx'
-- CMake-Conan: find_package(opengl_system) found, 'conan install' already ran
-- Conan: Target declared 'opengl::opengl'
-- CMake-Conan: find_package(CEF) found, 'conan install' already ran
-- Could NOT find CEF (missing: CEF_DIR)
-- Configuring done (5.0s)
-- Generating done (0.1s)
-- Build files have been written to: C:/Users/danny/CLionProjects/myproject-addon/cmake-build-release-visual-studio

[Finished]

As a small P.S:

  • Debug build type works flawlessly
  • Multi-Config SEEMS to work? (I need to double check but I have some dependency on knowing the build type in my CMakeLists.txt), but for my CI Github workflows I need single config Ninja, not multi.
  • The practical result of this confusion is that things like SDL2 aren't properly linked.

Hi @israelidanny

Thanks for your feedback.
The underlying cmake-conan for Windows VS setups is multi-config, it means it will install by default both Debug and Release dependencies, no matter your current build_type, so things will work when switching build_type from the IDE and building.

If the generators is different, it can be specifying via profile or command line configuration tools.cmake.cmaketoolchain:generator=Ninja, and it will not use multi-config installation.

If things are not correctly linked, we might need to check it, it would be necessary to move it to the cmake-conan repo (I think this should be reproducible without the CLion plugin, is this the case?)

I'm on a crazy crunch / deadline - but I'm more than happy to produce a minimum reproducible example, and open a corresponding Issue upstream! It'd be this weekend.

If someone gets there faster than me, ever so doper.

Yes, better to transfer to cmake-conan repo for the moment

@czoido alrighty! For anyone trying to reproduce this until I had time to prepare an example. I'm on MSVC 2022, using Ninja, and a good example of a failing recipe is SDL2 it links on Release, gets paths garbled on Debug and doesn't link.

While SOME recipes DO work, it also happens with many other recipes. Quite a few of them, which leads me to believe it isn't an individual recipe issue.

Hi @israelidanny - thanks for your report, I'm currently looking into this issue.

If I remember correctly, when the build is configured with a single config generator such as Ninja, it should map to the build type you have selected (and work the same as on Linux with Makefiles, for instance)

I'll try to reproduce this locally and get back to you

Hi @israelidanny.

I believe we have traced the root cause of the issue.
I have opened a PR here with a potential fix: #556

If you are able to test this from that branch, that would be great!

I just override my conan cmake file with that, right?

Hi @israelidanny - we have (just) merged the fix after testing this. If you are using the new CLion Conan plugin, this should be picked up.

@israelidanny to update the file in the plugin, please click on the update (🔄) button:
image

Thank you for the legendary reaction speed!