Skip to content

Commit 833c910

Browse files
author
Teseo Schneider
committed
added ltcg flag
1 parent 1721990 commit 833c910

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ include(CXXFeatures)
3030
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
3131

3232
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
33-
set_target_properties(pyigl PROPERTIES LINK_FLAGS "/LTCG")
34-
3533
foreach(config ${CMAKE_CONFIGURATION_TYPES})
3634
string(TOUPPER ${config} config)
3735
string(REPLACE /MD /MT CMAKE_C_FLAGS_${config} "${CMAKE_C_FLAGS_${config}}")
@@ -94,6 +92,10 @@ target_include_directories(pyigl PRIVATE "src/include")
9492
# target_compile_definitions(pyigl PUBLIC -DIGL_PARALLEL_FOR_FORCE_SERIAL)
9593
# endif()
9694

95+
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
96+
set_target_properties(pyigl PROPERTIES LINK_FLAGS "/LTCG")
97+
endif()
98+
9799
add_library(pyigl_classes MODULE classes/classes.cpp)
98100
target_link_libraries(pyigl_classes PRIVATE npe igl::core)
99101
target_link_libraries(pyigl_classes PRIVATE pybind11::module)

0 commit comments

Comments
 (0)