[test-suite] r266678 - Update TEST_SUITE_DIAGNOSE to work with more than one flag

Chris Matthews via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 19 10:13:14 PDT 2016


Thanks. Fix in r266762.

> On Apr 18, 2016, at 4:24 PM, Matthias Braun via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> - I'd recommend to use
>    set(TEST_SUITE_MYVAR "" CACHE STRING "description")
>  to indicate that a variable is intended to be set from the outside and not just a value used internally in the cmake scripts.
> - The "if(TEST_SUITE_DIAGNOSE)" seems superfluous, you could just set empty TEST_SUITE_DIAGNOSE_FLAGS if you don't want the feature.
> - We use llvm style 2-space indentation in the cmake files.
> - Why not apply the flags to LDFLAGS as well (or have an additional TEST_SUITE_DIAGNOSE_LDFLAGS variable)?
> 
> - Matthias
> 
>> On Apr 18, 2016, at 2:45 PM, Chris Matthews via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>> 
>> Author: cmatthews
>> Date: Mon Apr 18 16:45:45 2016
>> New Revision: 266678
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=266678&view=rev
>> Log:
>> Update TEST_SUITE_DIAGNOSE to work with more than one flag
>> 
>> Modified:
>>   test-suite/trunk/CMakeLists.txt
>> 
>> Modified: test-suite/trunk/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/CMakeLists.txt?rev=266678&r1=266677&r2=266678&view=diff
>> ==============================================================================
>> --- test-suite/trunk/CMakeLists.txt (original)
>> +++ test-suite/trunk/CMakeLists.txt Mon Apr 18 16:45:45 2016
>> @@ -100,10 +100,10 @@ set(TEST_SUITE_PROFILE_USE "FALSE" CACHE
>>    "Add apropriate -fprofile-instr-use to CFLAGS/CXXFLAGS for each benchmark")
>> 
>> # When running the test-suite in diagnosis mode, use these flags passed by
>> -# LNT to gather data, for examples -ftime-report, or -llvm -stats.
>> +# LNT to gather data, for examples -ftime-report, or -mllvm -stats.
>> if(TEST_SUITE_DIAGNOSE)
>> -  list(APPEND CFLAGS ${TEST_SUITE_DIAGNOSE_FLAGS})
>> -  list(APPEND CXXFLAGS ${TEST_SUITE_DIAGNOSE_FLAGS})
>> +    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TEST_SUITE_DIAGNOSE_FLAGS}")
>> +    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TEST_SUITE_DIAGNOSE_FLAGS}")
>> endif()
>> 
>> include(MakefileFunctions)
>> 
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list