This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 9a1ef119f3 Move defaulting install prefix before layout setup (#12085)
9a1ef119f3 is described below

commit 9a1ef119f3b7a017583c9aa5d088b2437101b92a
Author: Chris McFarlen <[email protected]>
AuthorDate: Tue Mar 11 11:51:42 2025 -0500

    Move defaulting install prefix before layout setup (#12085)
    
    Co-authored-by: Chris McFarlen <[email protected]>
---
 CMakeLists.txt | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b54af14a06..b26d0e209d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,6 +45,14 @@ set(CMAKE_CXX_EXTENSIONS OFF)
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
 list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE -DATS_BUILD)
 
+# Setup default install directory
+if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+  set(CMAKE_INSTALL_PREFIX
+      /usr/local/trafficserver
+      CACHE PATH "Default install path" FORCE
+  )
+endif()
+
 include(layout)
 include(ClangTidy)
 
@@ -161,14 +169,6 @@ else()
 endif()
 set(TS_PKGSYSUSER ${WITH_USER})
 
-# Setup default install directory
-if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
-  set(CMAKE_INSTALL_PREFIX
-      /usr/local/trafficserver
-      CACHE PATH "Default install path" FORCE
-  )
-endif()
-
 if(CMAKE_SYSTEM_NAME STREQUAL Linux)
   set(DEFAULT_POSIX_CAP ON)
 endif()

Reply via email to