[llvm-commits] [llvm] r117646 - /llvm/trunk/unittests/CMakeLists.txt

Óscar Fuentes ofv at wanadoo.es
Sat Oct 30 09:48:02 PDT 2010


NAKAMURA Takumi <geek4civic at gmail.com> writes:

>> On which platform/compiler the link fails?
>
> I met this issue on x86_64-linux CentOS5 gcc-4.4.
> After the last commit, I found the issue closed.
>
>   Bug 8428 - Unable to link JITTests
>   http://llvm.org/bugs/show_bug.cgi?id=8428

I work on Kubuntu 10.10 x86_64 gcc-4.4.5 and didn't hit the problem, but
maybe I was using the wrong revision.

> With my change, I confirmed msvs8, msvs10 and mingw builds are not broken.
> Lemme know if I broke anything.
>
>> Unless it was changed on the
>> last days, the config&make build sets REQUIRE_RTTI.
>
> Excuse me, I don't understand what you say exactly.

The LLVM_REQUIRE_RTTI variable is the CMake equivalent of Makefile's
REQUIRE_RTTI variable.

r116834 stablished LLVM_REQUIRE_RTTI to 1 on unittests/CMakeLists.txt:

commit 1ac44a341aecac2c5329957bbe72487a3ad8aa14
Author: mspencer
Date:   Tue Oct 19 18:04:19 2010 +0000

    unittests: Use the correct defines and global variables when building on CMake.
    
    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116834 91177308-0d34-0410-b5e6-96231b3b80d8

--- a/unittests/CMakeLists.txt
+++ b/unittests/CMakeLists.txt
@@ -13,6 +13,8 @@ function(add_llvm_unittest test_name)
 endfunction()
 
 include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
+set(LLVM_REQUIRES_RTTI 1)
+add_definitions(-DGTEST_HAS_RTTI=0)
 
 set(LLVM_LINK_COMPONENTS
   jit


I asked for a clarification about the purpose of that change, with no luck.

[snip]

>> Doing otherwise on
>> the cmake build requires a commentary on the CMakeLists.txt file.
>
> I think my change is a simple fixup. I was sorry not to fill the last
> commit log better.
> And I think it would not be needed to put comments especially unless
> it does different that Makefile does.

After seeing your change, I was confused thinking that
unittests/Makefile was setting REQUIRE_RTTI to 1 too. Actually, your
change syncs the settings of CMakeLists.txt with the Makefile, which is
good.

> Anyway I am working on unittests/cmake.
> Please be patient, thank you.

Great. I don't know much about the testing framework, but if you need
help with CMake, let me know.



More information about the llvm-commits mailing list