Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmake] Fix cmake gui multi config generation #262

Merged
merged 1 commit into from
May 6, 2021

Conversation

IceflowRE
Copy link
Member

@IceflowRE IceflowRE commented Oct 13, 2020

Can you confirm it fixes the issue and it is really build against the debug and release libraries.

Based on #368

Close #228
Close #372

@IceflowRE IceflowRE added cat:dev tools building/ compiling the program, cmake configuration and general development tools org:review changes are finished, review in progress or requested labels Oct 13, 2020
@IAmNotHanni
Copy link
Member

The dependencies will still not be passed to the Visual Studio project map file sadly.

@IAmNotHanni
Copy link
Member

I think we can close this pull request for now: #372
Or we can convert it into a draft and do research on the actual cause of the problem.

@IceflowRE
Copy link
Member Author

I think we can close this pull request for now: #372
Or we can convert it into a draft and do research on the actual cause of the problem.

Only admins can convert it back into a draft ^^ aka. you

@IceflowRE IceflowRE changed the title [cmake] Fix cmake gui generated VS solutions [cmake] Fix cmake gui multi config generation Apr 26, 2021
@IceflowRE IceflowRE removed the org:on hold on hold, until ... label Apr 26, 2021
@IAmNotHanni
Copy link
Member

Amazing!

I think we need to boost the required minimum CMake version?

CMake Error at cmake/conan_setup.cmake:50 (conan_cmake_autodetect):
  Unknown CMake command "conan_cmake_autodetect".
Call Stack (most recent call first):
  CMakeLists.txt:34 (include)

@IceflowRE
Copy link
Member Author

Amazing!

I think we need to boost the required minimum CMake version?

CMake Error at cmake/conan_setup.cmake:50 (conan_cmake_autodetect):
  Unknown CMake command "conan_cmake_autodetect".
Call Stack (most recent call first):
  CMakeLists.txt:34 (include)

Delete your build folder.

@IAmNotHanni
Copy link
Member

Now I get this error:

CMake Error at build/conan.cmake:71 (message):
  Please specify in command line CMAKE_BUILD_TYPE
  (-DCMAKE_BUILD_TYPE=Release)
Call Stack (most recent call first):
  build/conan.cmake:430 (_conan_detect_build_type)
  cmake/conan_setup.cmake:35 (conan_cmake_autodetect)
  CMakeLists.txt:34 (include)

@IAmNotHanni
Copy link
Member

I know I could specify this now, but shouldn't be there a default setting for unexperienced programmers?

@IceflowRE IceflowRE force-pushed the iceflower/fix-cmake-gui branch 3 times, most recently from 8cd8238 to a4dce85 Compare April 26, 2021 10:50
@IAmNotHanni
Copy link
Member

Looks like some spdlog is configured in release mode, even though I want to compile inexor-vulkan-renderer-example as Debug:

2>spdlog.lib(spdlog.obj) : error LNK2038: Konflikt ermittelt für "_ITERATOR_DEBUG_LEVEL": Der Wert "0" stimmt nicht mit dem Wert "2" in main.obj überein.
2>spdlog.lib(spdlog.obj) : error LNK2038: Konflikt ermittelt für "RuntimeLibrary": Der Wert "MD_DynamicRelease" stimmt nicht mit dem Wert "MDd_DynamicDebug" in main.obj überein.
2>spdlog.lib(async.obj) : error LNK2038: Konflikt ermittelt für "_ITERATOR_DEBUG_LEVEL": Der Wert "0" stimmt nicht mit dem Wert "2" in main.obj überein.
2>spdlog.lib(async.obj) : error LNK2038: Konflikt ermittelt für "RuntimeLibrary": Der Wert "MD_DynamicRelease" stimmt nicht mit dem Wert "MDd_DynamicDebug" in main.obj überein.
2>spdlog.lib(file_sinks.obj) : error LNK2038: Konflikt ermittelt für "_ITERATOR_DEBUG_LEVEL": Der Wert "0" stimmt nicht mit dem Wert "2" in main.obj überein.
2>spdlog.lib(file_sinks.obj) : error LNK2038: Konflikt ermittelt für "RuntimeLibrary": Der Wert "MD_DynamicRelease" stimmt nicht mit dem Wert "MDd_DynamicDebug" in main.obj überein.
2>spdlog.lib(color_sinks.obj) : error LNK2038: Konflikt ermittelt für "_ITERATOR_DEBUG_LEVEL": Der Wert "0" stimmt nicht mit dem Wert "2" in main.obj überein.
2>spdlog.lib(color_sinks.obj) : error LNK2038: Konflikt ermittelt für "RuntimeLibrary": Der Wert "MD_DynamicRelease" stimmt nicht mit dem Wert "MDd_DynamicDebug" in main.obj überein.
2>fmt.lib(format.obj) : error LNK2038: Konflikt ermittelt für "_ITERATOR_DEBUG_LEVEL": Der Wert "0" stimmt nicht mit dem Wert "2" in main.obj überein.
2>fmt.lib(format.obj) : error LNK2038: Konflikt ermittelt für "RuntimeLibrary": Der Wert "MD_DynamicRelease" stimmt nicht mit dem Wert "MDd_DynamicDebug" in main.obj überein.
2>LINK : warning LNK4098: Standardbibliothek "MSVCRT" steht in Konflikt mit anderen Bibliotheken; /NODEFAULTLIB:Bibliothek verwenden.
2>G:\Inexor\CODE\master\vulkan-renderer\build-CMake-GUI\bin\inexor-vulkan-renderer-example.exe : fatal error LNK1319: 10 Konflikte ermittelt

Release build is working already though!

@IceflowRE
Copy link
Member Author

We have to add compiler.runtime=MDd for MSVC when using debug build type.

@IceflowRE IceflowRE force-pushed the iceflower/fix-cmake-gui branch 3 times, most recently from 4710a5a to 8f82282 Compare April 27, 2021 20:13
@IceflowRE IceflowRE changed the title [cmake] Fix cmake gui multi config generation WIP [cmake] Fix cmake gui multi config generation Apr 27, 2021
IAmNotHanni
IAmNotHanni previously approved these changes Apr 27, 2021
Copy link
Member

@IAmNotHanni IAmNotHanni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything works now! Amazing job!

@IceflowRE IceflowRE changed the title WIP [cmake] Fix cmake gui multi config generation [cmake] Fix cmake gui multi config generation Apr 27, 2021
@IAmNotHanni
Copy link
Member

I think this one just needs a rebase now?

@IceflowRE
Copy link
Member Author

I think this one just needs a rebase now?

Merge #368 first.

Copy link
Member

@IAmNotHanni IAmNotHanni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work again. Looks like we finally defeated this problem.
Works in Debug and Release config under Ubuntu 20.04 if I use cmake -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Debug/Release.
All configurations build correctly when using Visual Studio 16 2019: Release, MinSizeRel, Debug, and RelWithDebInfo.
This is amazing!

@IceflowRE
Copy link
Member Author

Rebased.

@IAmNotHanni IAmNotHanni merged commit 7a145af into master May 6, 2021
@IAmNotHanni IAmNotHanni deleted the iceflower/fix-cmake-gui branch August 19, 2021 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat:dev tools building/ compiling the program, cmake configuration and general development tools org:review changes are finished, review in progress or requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CMake GUI is not generating valid visual studio project solution files
3 participants