forked from mirror/OpenTTD
Fix: [CMake] restore CMAKE_REQUIRED_FLAGS if you change it (#13393)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
# SSE version (SSE 2.0, SSSE 3.0).
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
||||
set(CMAKE_REQUIRED_FLAGS "")
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||
@@ -15,3 +16,5 @@ check_cxx_source_compiles("
|
||||
int main() { return 0; }"
|
||||
SSE_FOUND
|
||||
)
|
||||
|
||||
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
|
||||
|
Reference in New Issue
Block a user