Open Ron2014 opened 4 years ago
The new commit f0d9bcb4e6336e7a8c7b614e176cb1cf78bfda4b could help. The project requires a minimal configuration for MSVC. I cannot remove completely the runtime configuration because existing projects using this repos need it. Let me know if it works for you with the commit above, or an option could be added to bypass configure_msvc_runtime.
Good Job, Buddy.
Good news, it works. only comment these lines:
# set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
# set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
# set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
# set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}")
# set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
Another issue with cmake/MSVCRuntime.cmake: it replaces /Ob0 with /Ob2 globally! Now I'm unable to properly debug my own code because you choose to change global compilation flags, This is very very bad!
Two questions: 1) why oh why do you change that /Ob option? even in Debug? 2) why can't you use a more modern CMake style using target_compile_options(), so you don't mess with global compile options?
You can fork it and make all changes you need for your project.
You can fork it and make all changes you need for your project.
But why would you change /Ob0 to /Ob2 in Debug mode?
Also, would you accept a PR that left the /Ob0 there in Debug mode?
For the God, don't destroy cplusplus project.
My job is intergrate openssl to the c++ project of our team by cmake , and I found your repo, this repo.
Really nice repo.
But when I found the code in openssl-cmake/CMakeLists.txt:
MSVCRuntime.cmake
this file change all the C++ compiler options, make my project don't understand c++ syntax like:Finally, I remove these two lines and get everything well.
Wish you consider about it.
For detail
snapshot
my wiki