Fix build on Windows

- C/CXX should not be passed to MASM
- Fix CMAKE_BUILD_TYPE
This commit is contained in:
Paul Fd 2023-08-07 11:44:28 +02:00
parent 27228226f9
commit d470f7004e
2 changed files with 5 additions and 5 deletions

View file

@ -10,8 +10,8 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
STRING "Choose the type of build." FORCE)
endif()
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
"MinSizeRel" "RelWithDebInfo")
endif()

View file

@ -41,7 +41,7 @@ endif()
# Process sources as UTF-8
if(MSVC)
add_compile_options("/utf-8")
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/utf-8>)
endif()
# Define the math constants everywhere
@ -104,7 +104,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
endif()
endif()
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
add_compile_options(/Zc:__cplusplus)
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/Zc:__cplusplus>)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()