[test-suite] r257371 - cmake: Use if (HAVE_RE_COMP) instead of if(DEFINED HAVE_RE_COMP)
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 11 11:37:30 PST 2016
Author: matze
Date: Mon Jan 11 13:37:30 2016
New Revision: 257371
URL: http://llvm.org/viewvc/llvm-project?rev=257371&view=rev
Log:
cmake: Use if (HAVE_RE_COMP) instead of if(DEFINED HAVE_RE_COMP)
Seems like check_function_exists() always defines the variable to a true
or false expression.
Also slightly cleaned up CMakeLists.txt
Modified:
test-suite/trunk/MultiSource/Benchmarks/Prolangs-C/archie-client/CMakeLists.txt
test-suite/trunk/MultiSource/Benchmarks/Prolangs-C/plot2fig/CMakeLists.txt
Modified: test-suite/trunk/MultiSource/Benchmarks/Prolangs-C/archie-client/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/Prolangs-C/archie-client/CMakeLists.txt?rev=257371&r1=257370&r2=257371&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/Prolangs-C/archie-client/CMakeLists.txt (original)
+++ test-suite/trunk/MultiSource/Benchmarks/Prolangs-C/archie-client/CMakeLists.txt Mon Jan 11 13:37:30 2016
@@ -4,14 +4,16 @@ set(DIRS)
set(PARALLEL_DIRS)
set(LEVEL ../../../..)
+
include(CheckFunctionExists)
check_function_exists(re_comp HAVE_RE_COMP)
-if(DEFINED HAVE_RE_COMP)
+
+if(HAVE_RE_COMP)
set(PROG archie)
+ if("${TARGET_OS}" STREQUAL "SunOS")
+ list(APPEND LDFLAGS -lsocket -lnsl)
+ endif()
+ llvm_multisource()
endif()
-if("${TARGET_OS}" STREQUAL "SunOS")
- list(APPEND LDFLAGS -lsocket -lnsl)
-endif()
-llvm_multisource()
llvm_add_subdirectories(${DIRS} ${PARALLEL_DIRS})
Modified: test-suite/trunk/MultiSource/Benchmarks/Prolangs-C/plot2fig/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/Prolangs-C/plot2fig/CMakeLists.txt?rev=257371&r1=257370&r2=257371&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/Prolangs-C/plot2fig/CMakeLists.txt (original)
+++ test-suite/trunk/MultiSource/Benchmarks/Prolangs-C/plot2fig/CMakeLists.txt Mon Jan 11 13:37:30 2016
@@ -6,9 +6,9 @@ set(PARALLEL_DIRS)
set(LEVEL ../../../..)
include(CheckFunctionExists)
check_function_exists(re_comp HAVE_RE_COMP)
-if(DEFINED HAVE_RE_COMP)
+if(HAVE_RE_COMP)
set(PROG plot2fig)
+ llvm_multisource()
endif()
-llvm_multisource()
llvm_add_subdirectories(${DIRS} ${PARALLEL_DIRS})
More information about the llvm-commits
mailing list