File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 11# https://alexreinking.com/blog/how-to-use-cmake-without-the-agonizing-pain-part-1.html
22cmake_minimum_required (VERSION 3.21)
33
4- project (cxx-common)
4+ # Default to a Release config. Required before project() because Windows defaults to Debug
5+ set (CMAKE_BUILD_TYPE "Release" CACHE STRING "" )
6+ if (CMAKE_BUILD_TYPE STREQUAL "" )
7+ set (CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
8+ endif ()
9+
10+ project (dependencies)
511
612option (USE_EXTERNAL_LLVM "Do not compile LLVM as part of the superbuild, use an external one instead" OFF )
713option (USE_SANITIZERS "Use ASan and UBSan" OFF )
@@ -18,7 +24,7 @@ if(USE_EXTERNAL_LLVM)
1824 set (CMAKE_PREFIX_PATH "${BREW_LLVM_PREFIX} " )
1925 message (STATUS "Found LLVM keg installed by Homebrew at ${BREW_LLVM_PREFIX} " )
2026 else ()
21- message (FATAL_ERROR "LLVM not found, to install: brew install llvm" )
27+ message (WARNING "LLVM not found, to install: brew install llvm" )
2228 endif ()
2329 endif ()
2430 find_package (LLVM CONFIG REQUIRED)
Original file line number Diff line number Diff line change @@ -11,12 +11,9 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
1111 message (FATAL_ERROR "In-tree builds are not supported. Run CMake from a separate directory: cmake -B build" )
1212endif ()
1313
14- # Default to a Release config
15- set (CMAKE_BUILD_TYPE "Release" CACHE STRING "" )
1614if (CMAKE_BUILD_TYPE STREQUAL "" )
17- set ( CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE )
15+ message (FATAL_ERROR "CMAKE_BUILD_TYPE is not set" )
1816endif ()
19-
2017message (STATUS "Configuration: ${CMAKE_BUILD_TYPE} " )
2118
2219# Default to build/install (setting this variable is not recommended and might cause conflicts)
You can’t perform that action at this time.
0 commit comments