You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# If a static library of this project is used in another project that does not have `CMAKE_INTERPROCEDURAL_OPTIMIZATION` enabled, a linker error might happen.
11
-
# TODO set this option in `package_project` function.
12
-
message(
13
-
STATUS
14
-
"Interprocedural optimization is enabled. In other projects, linking with the compiled libraries of this project might require `set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)`"
"Interprocedural Optimization is not supported. Not using it. Here is the error log: ${output}"
22
-
)
23
-
endif()
5
+
include(CheckIPOSupported)
6
+
check_ipo_supported(RESULT result OUTPUToutput)
7
+
is_mingw(_is_mingw)
8
+
if(result ANDNOT${_is_mingw})
9
+
# If a static library of this project is used in another project that does not have `CMAKE_INTERPROCEDURAL_OPTIMIZATION` enabled, a linker error might happen.
10
+
# TODO set this option in `package_project` function.
11
+
message(
12
+
STATUS
13
+
"Interprocedural optimization is enabled. In other projects, linking with the compiled libraries of this project might require `set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)`"
0 commit comments