Closed yurivict closed 7 years ago
Does the build crash due to the unsupported option by clang? If not, it's just a warning message from the compiler..
There are a lot of warnings. You shouldn't be passing the flag when the compiler is clang.
I'm using
With this combination I indeed get:
clang: warning: argument unused during compilation: '-ipo' [-Wunused-command-line-argument]
The relevant lines on -ipo are master/CMakeLists.txt lines 82-85:
check_cxx_compiler_flag (-ipo HAS_IPO)
if (HAS_IPO)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ipo")
endif()
On which the CMake v3.9 help (https://cmake.org/cmake/help/v3.9/module/CheckCXXCompilerFlag.html) notes the following:
The result only tells that the compiler does not give an error message when it encounters the flag. If the flag has any effect or even a specific one is beyond the scope of this module.
Please note that the CMake v3.10 help (https://cmake.org/cmake/help/v3.10/module/CheckCXXCompilerFlag.html) notes the following:
A positive result from this check indicates only that the compiler did not issue a diagnostic message when given the flag. Whether the flag has any effect or even a specific one is beyond the scope of this module.
@yurivict, which version of cmake are you using? If below 3.10.0-rc5, please upgrade to the latest CMake for resolving your issue.
@yurivict,
Thank you for the confirmation regarding "-flto".
Considering that the warning regarding the unused argument "-ipo" is merely a warning, and will resolve itself in time with cmake 3.10, do you consider that this issue can be closed?
Seb.
It prints a lot of messages 'option not supported'.