r198328 - [CMake] Add missing set_output_directory after Takumi's change in r198205.

NAKAMURA Takumi geek4civic at gmail.com
Fri Jan 31 17:02:44 PST 2014


Mehdi, lemme know how I broke yours.

I guess LLVM_*_OUTPUT_INTDIR were provided or not.
Apologies, I haven't checked external cmake project but "standalone clang".

Could you try to set variables?
  set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
  set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib)

I think AddLLVM.cmake may have default LLVM_*_OUTPUT_INTDIR,
or default behavior if LLVM_*_OUTPUT_INTDIR is missing.

...Takumi


2014-02-01 Jordan Rose <jordan_rose at apple.com>:
> Ah, interesting. How do you (both) think we should fix this? LLVM has some
> in-tree passes that use this as well.
>
>
> On Jan 31, 2014, at 14:00, Mehdi Amini <mehdi.amini at silkan.com> wrote:
>
> My bad, it is not r198328 (Clang tree) but r198344 (LLVM tree), you used the
> same commit title and I didn't check the revision when I looked-up the
> email.
>
> In particular the " set_output_directory" addition here:
>
> http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?r1=198344&r2=198343&pathrev=198344
>
> Mehdi
>
>
> On 1/31/14, 10:41 AM, Jordan Rose wrote:
>
> I can't see how it would be this commit, since this only applies to targets
> using add_clang_executable. Takumi?
>
>
> On Jan 31, 2014, at 1:12, Mehdi Amini <mehdi.amini at silkan.com> wrote:
>
> Hi,
>
> It seems this commit breaks out-of-tree build for LLVM passes, as described
> here http://llvm.org/docs/CMake.html#developing-llvm-pass-out-of-source
>
> I'm not sure if the issue is this commit or r197394 ; as at that time Dmitri
> Gribenko mentioned that it broke out-of-tree build of Clang.
>
> Mehdi
>
>
>
> On 1/2/14, 10:28 AM, Jordan Rose wrote:
>
> Author: jrose
> Date: Thu Jan  2 12:28:32 2014
> New Revision: 198328
>
> URL: http://llvm.org/viewvc/llvm-project?rev=198328&view=rev
> Log:
> [CMake] Add missing set_output_directory after Takumi's change in r198205.
>
> In a standalone build, Clang binaries should end up in Clang's build folder,
> not LLVM's.
>
> Xcode still has a few issues finding auxiliary tools and libraries in the
> build folders. I'll fix those next.
>
> Modified:
>     cfe/trunk/CMakeLists.txt
>
> Modified: cfe/trunk/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=198328&r1=198327&r2=198328&view=diff
> ==============================================================================
> --- cfe/trunk/CMakeLists.txt (original)
> +++ cfe/trunk/CMakeLists.txt Thu Jan  2 12:28:32 2014
> @@ -332,6 +332,7 @@ endmacro(add_clang_library)
>  macro(add_clang_executable name)
>    add_llvm_executable( ${name} ${ARGN} )
>    set_target_properties(${name} PROPERTIES FOLDER "Clang executables")
> +  set_output_directory(${name} ${CLANG_RUNTIME_OUTPUT_INTDIR}
> ${CLANG_LIBRARY_OUTPUT_INTDIR})
>  endmacro(add_clang_executable)
>    include_directories(BEFORE
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
>



More information about the llvm-commits mailing list