File tree Expand file tree Collapse file tree 5 files changed +27
-26
lines changed Expand file tree Collapse file tree 5 files changed +27
-26
lines changed Original file line number Diff line number Diff line change @@ -118,15 +118,40 @@ llama_option_depr(WARNING     LLAMA_SYCL_F16            GGML_SYCL_F16)
118118llama_option_depr(WARNING     LLAMA_CANN                GGML_CANN)
119119
120120# 
121- # build the library  
121+ # 3rd party  
122122# 
123123
124124if  (NOT  TARGET  ggml)
125125    add_subdirectory (ggml)
126126    # ... otherwise assume ggml is added by a parent CMakeLists.txt 
127127endif ()
128+ 
129+ # 
130+ # build the library 
131+ # 
132+ 
133+ llama_add_compile_flags() # llama-only flags 
134+ 
128135add_subdirectory (src)
129136
137+ # 
138+ # utils, programs, examples and tests 
139+ # 
140+ 
141+ if  (LLAMA_BUILD_COMMON)
142+     add_subdirectory (common)
143+ endif ()
144+ 
145+ if  (LLAMA_BUILD_COMMON AND  LLAMA_BUILD_TESTS AND  NOT  CMAKE_JS_VERSION)
146+     include (CTest)
147+     add_subdirectory (tests)
148+ endif ()
149+ 
150+ if  (LLAMA_BUILD_COMMON AND  LLAMA_BUILD_EXAMPLES)
151+     add_subdirectory (examples)
152+     add_subdirectory (pocs)
153+ endif ()
154+ 
130155# 
131156# install 
132157# 
@@ -200,21 +225,3 @@ configure_file(cmake/llama.pc.in
200225
201226install (FILES  "${CMAKE_CURRENT_BINARY_DIR} /llama.pc" 
202227        DESTINATION  lib/pkgconfig)
203- 
204- # 
205- # utils, programs, examples and tests 
206- # 
207- 
208- if  (LLAMA_BUILD_COMMON)
209-     add_subdirectory (common)
210- endif ()
211- 
212- if  (LLAMA_BUILD_COMMON AND  LLAMA_BUILD_TESTS AND  NOT  CMAKE_JS_VERSION)
213-     include (CTest)
214-     add_subdirectory (tests)
215- endif ()
216- 
217- if  (LLAMA_BUILD_COMMON AND  LLAMA_BUILD_EXAMPLES)
218-     add_subdirectory (examples)
219-     add_subdirectory (pocs)
220- endif ()
Original file line number Diff line number Diff line change 22
33find_package (Threads REQUIRED)
44
5- llama_add_compile_flags()
6- 
75# Build info header 
86# 
97
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ find_package(Threads REQUIRED)
88
99# flags 
1010
11- llama_add_compile_flags() 
11+ # ... 
1212
1313# examples 
1414
Original file line number Diff line number Diff line change 1- llama_add_compile_flags()
2- 
31# 
42# libraries 
53# 
Original file line number Diff line number Diff line change 1- llama_add_compile_flags()
2- 
31function (llama_test target )
42    include (CMakeParseArguments)
53    set (options )
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments