]> The Tcpdump Group git mirrors - libpcap/commitdiff
Clean up the way we handle remote capture with CMake.
authorGuy Harris <[email protected]>
Wed, 4 Oct 2017 01:15:56 +0000 (18:15 -0700)
committerGuy Harris <[email protected]>
Wed, 4 Oct 2017 01:15:56 +0000 (18:15 -0700)
Instead of explicitly testing the REMOTE environment variable, have an
ENABLE_REMOTE environment variable that's either empty or
"-DENABLE_REMOTE=ON".

(Yes, it's currently supposed to be HAVE_REMOTE, but that's not the best
name for a user-visible flag, as evidenced by the fact that *I* didn't
remember its name, and I'm the person who put it into CMakeLists.txt.)

.travis.yml

index 923390071fdb7c68b7e053ce0882531e1291ed40..e326f0cdd8d679ef5afc536c9a45366624d26c6e 100644 (file)
@@ -22,9 +22,9 @@ env:
     - coverity_scan_script_test_mode=false
   matrix:
     - REMOTE=disable CMAKE=no
-    - REMOTE=disable CMAKE=yes
+    - ENABLE_REMOTE="" CMAKE=yes
     - REMOTE=enable CMAKE=no
-    - REMOTE=enable CMAKE=yes
+    - ENABLE_REMOTE="-DENABLE_REMOTE=ON" CMAKE=yes
 
 matrix:
   fast_finish: true
@@ -32,7 +32,7 @@ matrix:
     - os: linux
       env: REMOTE=enable CMAKE=no
     - os: linux
-      env: REMOTE=enable CMAKE=yes
+      env: ENABLE_REMOTE="-DENABLE_REMOTE=ON" CMAKE=yes
 
 addons:
   coverity_scan:
@@ -78,8 +78,7 @@ script:
   - if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$CMAKE" = no ]; then ./configure --prefix=/tmp "--${REMOTE}-remote"; fi
   - if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$CMAKE" = yes ]; then mkdir build; fi
   - if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$CMAKE" = yes ]; then cd build; fi
-  - if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$CMAKE" = yes -a "$REMOTE" = enable ]; then cmake -DCMAKE_INSTALL_PREFIX=/tmp -DENABLE_REMOTE=ON ..; fi
-  - if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$CMAKE" = yes -a "$REMOTE" != enable ]; then cmake -DCMAKE_INSTALL_PREFIX=/tmp ..; fi
+  - if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$CMAKE" = yes]; then cmake -DCMAKE_INSTALL_PREFIX=/tmp $ENABLE_REMOTE ..; fi
   - if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then echo -n travis_fold:end:script.configure; fi
   - if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$CMAKE" = no ]; then make -s all findalldevstest; fi
   - if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$CMAKE" = yes ]; then make -s all; fi