diff options
-rw-r--r-- | Modules/CheckIPOSupported.cmake | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/CheckIPOSupported.cmake b/Modules/CheckIPOSupported.cmake index d8297d9..de2a140 100644 --- a/Modules/CheckIPOSupported.cmake +++ b/Modules/CheckIPOSupported.cmake @@ -56,13 +56,14 @@ include(CMakeParseArguments) # cmake_parse_arguments # X_RESULT - name of the final result variable # X_OUTPUT - name of the variable with information about error macro(_ipo_not_supported output) - string(COMPARE EQUAL "${X_RESULT}" "" is_empty) - if(is_empty) + if(NOT X_RESULT) message(FATAL_ERROR "IPO is not supported (${output}).") endif() set("${X_RESULT}" NO PARENT_SCOPE) - set("${X_OUTPUT}" "${output}" PARENT_SCOPE) + if(X_OUTPUT) + set("${X_OUTPUT}" "${output}" PARENT_SCOPE) + endif() endmacro() # Run IPO/LTO test |