Skip to content
Snippets Groups Projects
Commit 0d21c42e authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

:broom:More cmake modernization

parent abbc28fc
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
## We're not there yet, but once done, there is a kludge in Linking.cmake ## We're not there yet, but once done, there is a kludge in Linking.cmake
# "if(${CMAKE_VERSION} VERSION_LESS "3.20.0")" that can also be removed # "if(${CMAKE_VERSION} VERSION_LESS "3.20.0")" that can also be removed
cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR) cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR)
cmake_policy(SET CMP0091 NEW)
set(ROOT_PROJECT_NAME "Alchemy" CACHE STRING set(ROOT_PROJECT_NAME "Alchemy" CACHE STRING
"The root project/makefile/solution name. Defaults to Alchemy.") "The root project/makefile/solution name. Defaults to Alchemy.")
......
...@@ -63,6 +63,7 @@ endif() ...@@ -63,6 +63,7 @@ endif()
if (WINDOWS) if (WINDOWS)
# Don't build DLLs. # Don't build DLLs.
set(BUILD_SHARED_LIBS OFF) set(BUILD_SHARED_LIBS OFF)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
add_compile_options(/MP) add_compile_options(/MP)
...@@ -84,15 +85,6 @@ if (WINDOWS) ...@@ -84,15 +85,6 @@ if (WINDOWS)
) )
add_compile_options( add_compile_options(
$<$<CONFIG:Debug>:/Od>
$<$<CONFIG:Debug>:/MDd>
$<$<OR:$<CONFIG:Release>,$<CONFIG:RelWithDebInfo>>:/O2>
$<$<OR:$<CONFIG:Release>,$<CONFIG:RelWithDebInfo>>:/MD>
$<$<OR:$<CONFIG:Release>,$<CONFIG:RelWithDebInfo>>:/GS>
$<$<CONFIG:Release>:/Oi>
$<$<CONFIG:Release>:/Ot>
$<$<CONFIG:Release>:/Gy>
$<$<CONFIG:Release>:/Oy->
$<$<CONFIG:Release>:/Zc:inline> $<$<CONFIG:Release>:/Zc:inline>
$<$<CONFIG:Release>:/fp:fast> $<$<CONFIG:Release>:/fp:fast>
/Zi /Zi
...@@ -101,19 +93,12 @@ if (WINDOWS) ...@@ -101,19 +93,12 @@ if (WINDOWS)
/W3 /W3
/c /c
/Zc:__cplusplus /Zc:__cplusplus
/Zc:forScope
/Zc:rvalueCast
/Zc:strictStrings
/Zc:ternary
/nologo /nologo
) )
add_link_options( add_link_options(
/DEBUG:FULL /DEBUG:FULL
/IGNORE:4099 /IGNORE:4099
/NODEFAULTLIB:LIBCMT
$<$<CONFIG:Debug>:/NODEFAULTLIB:LIBCMTD>
$<$<CONFIG:Debug>:/NODEFAULTLIB:MSVCRT>
) )
if (ADDRESS_SIZE EQUAL 32) if (ADDRESS_SIZE EQUAL 32)
...@@ -129,7 +114,7 @@ if (WINDOWS) ...@@ -129,7 +114,7 @@ if (WINDOWS)
endif () endif ()
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
add_compile_options(/Zc:externConstexpr /Zc:referenceBinding /ZH:SHA_256) add_compile_options(/Zc:externConstexpr /ZH:SHA_256)
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
add_compile_options(/Qvec /Zc:dllexportInlines- /clang:-mprefer-vector-width=128 -fno-strict-aliasing -Wno-ignored-pragma-intrinsic -Wno-unused-local-typedef) add_compile_options(/Qvec /Zc:dllexportInlines- /clang:-mprefer-vector-width=128 -fno-strict-aliasing -Wno-ignored-pragma-intrinsic -Wno-unused-local-typedef)
endif() endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment