llvm.org GIT mirror llvm / 16d0e12
llvm-config: Let directories aware of CMAKE_CFG_INTDIR. With llvm-config.exe --bindir --libdir --build-mode, on Visual Studio 2010, In build tree: (OBJ_ROOT)/bin/MinSizeRel (OBJ_ROOT)/lib/MinSizeRel MinSizeRel In installed tree: (INSTALL_PREFIX)/bin (INSTALL_PREFIX)/lib MinSizeRel This is enhancements since r196283. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197467 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 5 years ago
1 changed file(s) with 9 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
183183 std::string CurrentExecPrefix;
184184 std::string ActiveObjRoot;
185185
186 // If CMAKE_CFG_INTDIR is given, honor it as build mode.
187 char const *build_mode = LLVM_BUILDMODE;
188 #if defined(CMAKE_CFG_INTDIR)
189 if (!(CMAKE_CFG_INTDIR[0] == '.' && CMAKE_CFG_INTDIR[1] == '\0'))
190 build_mode = CMAKE_CFG_INTDIR;
191 #endif
192
186193 // Create an absolute path, and pop up one directory (we expect to be inside a
187194 // bin dir).
188195 sys::fs::make_absolute(CurrentPath);
238245 ActiveLibDir = ActiveObjRoot + "/lib";
239246 break;
240247 case CMakeBuildModeStyle:
241 ActiveBinDir = ActiveObjRoot + "/bin/" + LLVM_BUILDMODE;
242 ActiveLibDir = ActiveObjRoot + "/lib/" + LLVM_BUILDMODE;
248 ActiveBinDir = ActiveObjRoot + "/bin/" + build_mode;
249 ActiveLibDir = ActiveObjRoot + "/lib/" + build_mode;
243250 break;
244251 }
245252
299306 } else if (Arg == "--host-target") {
300307 OS << LLVM_DEFAULT_TARGET_TRIPLE << '\n';
301308 } else if (Arg == "--build-mode") {
302 char const *build_mode = LLVM_BUILDMODE;
303 #if defined(CMAKE_CFG_INTDIR)
304 if (!(CMAKE_CFG_INTDIR[0] == '.' && CMAKE_CFG_INTDIR[1] == '\0'))
305 build_mode = CMAKE_CFG_INTDIR;
306 #endif
307309 OS << build_mode << '\n';
308310 } else if (Arg == "--assertion-mode") {
309311 #if defined(NDEBUG)