Skip oracle and database build by mean cmake variable
authorEduardo Ramos Testillano (eramedu) <eduardo.ramos.testillano@ericsson.com>
Sun, 12 Apr 2020 17:04:35 +0000 (19:04 +0200)
committerEduardo Ramos Testillano (eramedu) <eduardo.ramos.testillano@ericsson.com>
Fri, 17 Apr 2020 19:28:08 +0000 (21:28 +0200)
You could avoid database resources compilation to ease the add of requirements:
   > cmake -DSKIP_DATABASE_BUILD=1 .

CMakeLists.txt
README.md

index 11a2a24..1e53a36 100644 (file)
@@ -100,6 +100,15 @@ MACRO(SUBDIRLIST result curdir)
   FILE(GLOB children RELATIVE ${curdir} ${curdir}/*)
   SET(dirlist "")
   FOREACH(child ${children})
+
+    # EXCLUDE DATABASE RESOURCES (-DSKIP_DATABASE_BUILD)
+    if(SKIP_DATABASE_BUILD)
+       string(REGEX MATCH "dbms|dbos" DATABASE ${child})
+       IF(DATABASE)
+         CONTINUE()
+       ENDIF()
+    ENDIF()
+
     IF(IS_DIRECTORY ${curdir}/${child})
       LIST(APPEND dirlist ${child})
     ENDIF()
index 5bf77ea..8826728 100644 (file)
--- a/README.md
+++ b/README.md
@@ -30,6 +30,10 @@ You could specify type of build, 'Debug' or 'Release', for example:
      > cmake -DCMAKE_BUILD_TYPE=Debug .
      > cmake -DCMAKE_BUILD_TYPE=Release .
 
+You could avoid database resources compilation to ease the add of requirements:
+
+     > cmake -DSKIP_DATABASE_BUILD=1 .
+
 ## Clean project
 
      > make clean