<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Is CMake 3.0 a requirement? We're using
CMake 2.8 on both Windows and Linux for LLVM/Clang/LLDB. <br>
I'll check this with CMake 3.0.<br>
<br>
Thanks,<br>
Deepak<br>
<br>
On 01/07/2014 21:22, Reid Kleckner wrote:<br>
</div>
<blockquote
cite="mid:CACs=ty+tP4FqoUsBFS2PAaNdSjsxjjg5xJbCYx_qqqxCVutDNA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Tue, Jul 1, 2014 at 10:57 AM,
Deepak Panickal <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:deepak@codeplay.com"
target="_blank">deepak@codeplay.com</a>></span>
wrote:
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
if (NOT MSVC)<br>
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")<br>
endif()<br>
- add_library(${name} ${libkind} ${srcs})<br>
+ llvm_add_library(${name} ${libkind} ${srcs})<br>
#if (LLVM_COMMON_DEPENDS)<br>
##add_dependencies(${name} ${LLVM_COMMON_DEPENDS})<br>
#endif()<br>
@@ -249,14 +257,7 @@ macro(add_lldb_library name)<br>
endmacro(add_lldb_library)<br>
<br>
macro(add_lldb_executable name)<br>
- #add_llvm_executable(${name} ${ARGN})<br>
- llvm_process_sources( ALL_FILES ${ARGN} )<br>
- add_executable(${name} ${ALL_FILES})<br>
- #target_link_libraries(${name} ${CLANG_USED_LIBS})<br>
- #llvm_config( ${name} ${LLVM_LINK_COMPONENTS} )<br>
- #if (LLVM_COMMON_DEPENDS)<br>
- #add_dependencies(${name} ${LLVM_COMMON_DEPENDS})<br>
- #endif()<br>
+ add_llvm_executable(${name} ${ARGN})<br>
set_target_properties(${name} PROPERTIES FOLDER "lldb
executables")<br>
endmacro(add_lldb_executable)<br>
<br>
@@ -315,9 +316,7 @@ set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS}<br>
<br>
#add_subdirectory(include)<br>
add_subdirectory(docs)<br>
-if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows" AND NOT
LLDB_DISABLE_PYTHON)<br>
- add_subdirectory(scripts)<br>
-endif()<br>
+add_subdirectory(scripts)<br>
add_subdirectory(source)<br>
add_subdirectory(test)<br>
add_subdirectory(tools)<br>
</blockquote>
<div><br>
</div>
<div>I think some of these changes broke building with CMake
3.0. This is what I get now when cmake reruns:</div>
<div><br>
</div>
<div>$ ninja -C ../../build clang</div>
<div>ninja: Entering directory `../../build'</div>
<div>[1/1] Re-running CMake...</div>
<div>FAILED: "C:\Program Files (x86)\CMake\bin\cmake.exe"
-HD:\src\llvm -BD:\src\llvm\build</div>
<div>-- Target triple: i686-pc-win32</div>
<div>... snip</div>
<div>-- LLDB version: 3.5.0</div>
<div>-- Could NOT find Doxygen (missing:
DOXYGEN_EXECUTABLE)</div>
<div>CMake Error at tools/lldb/CMakeLists.txt:234
(target_link_libraries):</div>
<div> The keyword signature for target_link_libraries has
already been used with</div>
<div> the target "liblldb". All uses of
target_link_libraries with a target must</div>
<div> be either all-keyword or all-plain.</div>
<div><br>
</div>
<div> The uses of the keyword signature are here:</div>
<div>
<br>
</div>
<div> * cmake/modules/AddLLVM.cmake:331
(target_link_libraries)</div>
<div><br>
</div>
<div>Call Stack (most recent call first):</div>
<div> tools/lldb/source/CMakeLists.txt:214
(add_lldb_library)</div>
<div><br>
</div>
<div><br>
</div>
<div>-- Configuring incomplete, errors occurred!</div>
<div>See also
"D:/src/llvm/build/CMakeFiles/CMakeOutput.log".</div>
<div>See also "D:/src/llvm/build/CMakeFiles/CMakeError.log".</div>
<div>ninja: error: rebuilding 'build.ninja': subcommand
failed</div>
<div><br>
</div>
<div>So there's some conflict between llvm_add_library and
target_link_libraries, which is unfortunate.</div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>