Linux-GNU.cmake 971 B

12345678910111213141516171819202122232425
  1. #=============================================================================
  2. # Copyright 2010 Kitware, Inc.
  3. #
  4. # Distributed under the OSI-approved BSD License (the "License");
  5. # see accompanying file Copyright.txt for details.
  6. #
  7. # This software is distributed WITHOUT ANY WARRANTY; without even the
  8. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. # See the License for more information.
  10. #=============================================================================
  11. # (To distribute this file outside of CMake, substitute the full
  12. # License text for the above reference.)
  13. # This module is shared by multiple languages; use include blocker.
  14. if(__LINUX_COMPILER_GNU)
  15. return()
  16. endif()
  17. set(__LINUX_COMPILER_GNU 1)
  18. macro(__linux_compiler_gnu lang)
  19. # We pass this for historical reasons. Projects may have
  20. # executables that use dlopen but do not set ENABLE_EXPORTS.
  21. set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-rdynamic")
  22. endmacro()