Browse Source

CMake: Remove automatic re-check of libraries

This relied on internal CMake variables and did not detected all
compiler and flag changes which could influence library search changes.
Users should clear the build directory when making such config changes.
pull/108/head
Daniel Scharrer 7 years ago
parent
commit
b398a3f842
  1. 15
      CMakeLists.txt
  2. 5
      cmake/CompileCheck.cmake

15
CMakeLists.txt

@ -135,21 +135,6 @@ if(USE_STATIC_LIBS AND NOT MSVC)
add_ldflag("-static-libgcc")
endif()
# Force re-checking libraries if the compiler or compiler flags change
if((NOT LAST_CMAKE_CXX_FLAGS STREQUAL CMAKE_CXX_FLAGS)
OR (NOT LAST_CMAKE_CXX_COMPILER STREQUAL CMAKE_CXX_COMPILER))
force_recheck_library(LZMA)
force_recheck_library(Boost)
force_recheck_library(ZLIB)
force_recheck_library(BZip2)
force_recheck_library(iconv)
unset(Boost_INCLUDE_DIR CACHE)
set(LAST_CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE INTERNAL
"The last C++ compiler flags")
set(LAST_CMAKE_CXX_COMPILER "${CMAKE_CXX_COMPILER}" CACHE INTERNAL
"The last C++ compiler")
endif()
unset(LIBRARIES)
if(USE_ARC4)

5
cmake/CompileCheck.cmake

@ -191,8 +191,3 @@ function(add_ldflag FLAG)
endif()
endfunction(add_ldflag)
function(force_recheck_library LIBRARY_NAME)
unset(FIND_PACKAGE_MESSAGE_DETAILS_${ARGV1} CACHE)
unset(FIND_PACKAGE_MESSAGE_DETAILS_${LIBRARY_NAME} CACHE)
endfunction()

Loading…
Cancel
Save