llvm.org GIT mirror llvm / b9a8dc6
[CMake] Don't set <PROJECT>_STANDALONE_BUILD We shouldn't be treating runtimes builds as standalone builds since we have enough of the context loaded into the runtimes environment. Differential Revision: https://reviews.llvm.org/D57992 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353601 91177308-0d34-0410-b5e6-96231b3b80d8 Petr Hosek 5 months ago
1 changed file(s) with 6 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
8686
8787 # This variable makes sure that e.g. llvm-lit is found.
8888 set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR})
89 set(LLVM_CMAKE_PATH ${LLVM_MAIN_SRC_DIR}/cmake/modules)
8990
9091 if(APPLE)
9192 set(LLVM_ENABLE_LIBCXX ON CACHE BOOL "")
115116 # Handle common options used by all runtimes.
116117 include(AddLLVM)
117118 include(HandleLLVMOptions)
119 include(FindPythonInterp)
118120
119121 set(CMAKE_REQUIRED_FLAGS ${SAFE_CMAKE_REQUIRED_FLAGS})
120122 set(CMAKE_REQUIRED_LIBRARIES ${SAFE_CMAKE_REQUIRED_LIBRARIES})
123
124 # This can be used to detect whether we're in the runtimes build.
125 set(RUNTIMES_BUILD ON)
121126
122127 foreach(entry ${runtimes})
123128 get_filename_component(projName ${entry} NAME)
125130 # TODO: Clean this up as part of an interface standardization
126131 string(REPLACE "-" "_" canon_name ${projName})
127132 string(TOUPPER ${canon_name} canon_name)
128 # The subdirectories need to treat this as standalone builds
129 set(${canon_name}_STANDALONE_BUILD On)
130133
131134 if(LLVM_RUNTIMES_LIBDIR_SUFFIX)
132135 set(${canon_name}_LIBDIR_SUFFIX "${LLVM_RUNTIMES_LIBDIR_SUFFIX}" CACHE STRING "" FORCE)
134137
135138 # Setting a variable to let sub-projects detect which other projects
136139 # will be included under here.
137 set(HAVE_${canon_name} On)
140 set(HAVE_${canon_name} ON)
138141 endforeach()
139142
140143 # We do this in two loops so that HAVE_* is set for each runtime before the