This repository was archived by the owner on Oct 7, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,8 +13,18 @@ set(CMAKE_CXX_STANDARD 20)
1313set (CMAKE_CXX_STANDARD_REQUIRED ON )
1414set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG :Debug >:Debug >" )
1515
16- # TODO: re-enable /GL and /LTCG when we get a bigger build machine
17- add_compile_options (/bigobj /GR- /permissive- )
16+ if (MSVC )
17+ # TODO: re-enable /GL and /LTCG when we get a bigger build machine
18+ add_compile_options (/bigobj /GR- /permissive- )
19+
20+ string (REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} " )
21+ # TODO: re-enable /GL and /LTCG when we get a bigger build machine
22+ # string(APPEND CMAKE_MODULE_LINKER_FLAGS " /LTCG:STATUS")
23+
24+ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "19.20.27404.0" )
25+ string (APPEND CMAKE_CXX_FLAGS " /d2FH4" )
26+ endif ()
27+ endif ()
1828
1929# strip suffix to allow support for prerelease version
2030string (REGEX MATCH "^[0-9]\\ .[0-9]+(\\ .[0-9]+)?" PYTHON_BASE_VERSION ${PYTHON_VERSION_STRING} )
@@ -34,12 +44,4 @@ if($ENV{CI})
3444 set_property (TARGET _winrt PROPERTY JOB_POOL_COMPILE compile_job )
3545endif ()
3646
37- string (REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} " )
38- # TODO: re-enable /GL and /LTCG when we get a bigger build machine
39- # string(APPEND CMAKE_MODULE_LINKER_FLAGS " /LTCG:STATUS")
40-
41- if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "19.20.27404.0" )
42- string (APPEND CMAKE_CXX_FLAGS " /d2FH4" )
43- endif ()
44-
4547install (TARGETS _winrt DESTINATION "pywinrt/${CMAKE_PROJECT_NAME} " )
You can’t perform that action at this time.
0 commit comments