You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
2.2 KiB

  1. # Set a default build type if none was specified
  2. set(default_build_type "Release")
  3. if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
  4. set(default_build_type "Debug")
  5. endif()
  6. if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
  7. message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
  8. set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
  9. STRING "Choose the type of build." FORCE)
  10. # Set the possible values of build type for cmake-gui
  11. set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
  12. "MinSizeRel" "RelWithDebInfo")
  13. endif()
  14. # Taken from the https://github.com/OpenChemistry/tomviz project
  15. # Copyright (c) 2014-2017, Kitware, Inc.
  16. # All rights reserved.
  17. #
  18. # Redistribution and use in source and binary forms, with or without
  19. # modification, are permitted provided that the following conditions are met:
  20. #
  21. # 1. Redistributions of source code must retain the above copyright notice, this
  22. # list of conditions and the following disclaimer.
  23. #
  24. # 2. Redistributions in binary form must reproduce the above copyright notice,
  25. # this list of conditions and the following disclaimer in the documentation
  26. # and/or other materials provided with the distribution.
  27. #
  28. # 3. Neither the name of the copyright holder nor the names of its contributors
  29. # may be used to endorse or promote products derived from this software
  30. # without specific prior written permission.
  31. #
  32. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  33. # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  34. # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  35. # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  36. # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  37. # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  38. # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  39. # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
  40. # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  41. # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.