Back to home page

Enduro/X

 
 

    


0001 ##
0002 ## @brief Enduro Execution platform's UBF library tests
0003 ##   Using Cgreen framework for tests.
0004 ##
0005 ## @file CMakeLists.txt
0006 ##
0007 ## -----------------------------------------------------------------------------
0008 ## Enduro/X Middleware Platform for Distributed Transaction Processing
0009 ## Copyright (C) 2009-2016, ATR Baltic, Ltd. All Rights Reserved.
0010 ## Copyright (C) 2017-2023, Mavimax, Ltd. All Rights Reserved.
0011 ## This software is released under one of the following licenses:
0012 ## AGPL (with Java and Go exceptions) or Mavimax's license for commercial use.
0013 ## See LICENSE file for full text.
0014 ## -----------------------------------------------------------------------------
0015 ## AGPL license:
0016 ##
0017 ## This program is free software; you can redistribute it and/or modify it under
0018 ## the terms of the GNU Affero General Public License, version 3 as published
0019 ## by the Free Software Foundation;
0020 ##
0021 ## This program is distributed in the hope that it will be useful, but WITHOUT ANY
0022 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
0023 ## PARTICULAR PURPOSE. See the GNU Affero General Public License, version 3
0024 ## for more details.
0025 ##
0026 ## You should have received a copy of the GNU Affero General Public License along 
0027 ## with this program; if not, write to the Free Software Foundation, Inc.,
0028 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
0029 ##
0030 ## -----------------------------------------------------------------------------
0031 ## A commercial use license is available from Mavimax, Ltd
0032 ## contact@mavimax.com
0033 ## -----------------------------------------------------------------------------
0034 ##
0035 
0036 
0037 # Make sure the compiler can find include files from UBF library
0038 include_directories (${ENDUROX_SOURCE_DIR}/libubf
0039                                          ${ENDUROX_SOURCE_DIR}/include
0040                                          ${ENDUROX_SOURCE_DIR}/libnstd
0041                                          ${ENDUROX_SOURCE_DIR}/libextest)
0042 
0043 # Make sure the linker can find the UBF library once it is built.
0044 link_directories (${ENDUROX_BINARY_DIR}/libubf) 
0045 
0046 # Add debug options
0047 # By default if RELEASE_BUILD is not defined, then we run in debug!
0048 IF ($ENV{RELEASE_BUILD})
0049         # do nothing
0050 ELSE ($ENV{RELEASE_BUILD})
0051         ADD_DEFINITIONS("-D UBF_DEBUG")
0052 ENDIF ($ENV{RELEASE_BUILD})
0053 
0054 # Executables
0055 add_executable (ubfunit1 ubfunit1.c test_badd.c test_genbuf.c test_cbchg.c 
0056                 test_cbget.c test_bdel.c test_expr.c test_bnext.c test_bproj.c
0057                 test_mem.c test_bupdate.c test_bconcat.c test_find.c test_get.c
0058                 test_print.c test_macro.c test_readwrite.c test_mkfldhdr.c
0059                 test_nstd_crypto.c test_nstd_b64.c
0060                 test_nstd_mtest.c test_nstd_mtest2.c test_nstd_mtest3.c
0061                 test_nstd_mtest4.c test_nstd_mtest5.c test_nstd_mtest6_dupcursor.c
0062                 test_bcmp.c test_nstd_macros.c test_nstd_debug.c test_nstd_growlist.c
0063                 test_nstd_standard.c test_nstd_util.c test_bnum.c test_bojoin.c test_bjoin.c
0064                 test_nstd_lh.c test_nstd_mtest6.c test_nstd_fpa.c test_nstd_atomicadd.c test_embubf.c test_printv.c
0065                 test_nstd_mtest7.c test_nstd_fsync.c test_nstd_cid.c test_nstd_sm.c test_rbtree.c)
0066 
0067 add_executable (testedbsync test_nstd_msync.c)
0068 
0069 # Link the executable to the UBF library & others...
0070 
0071 target_link_libraries (ubfunit1 extest ubf cgreen m nstd ${RT_LIB} pthread)
0072 target_link_libraries (testedbsync ubf cgreen m nstd ${RT_LIB} pthread)
0073 
0074 set_target_properties(ubfunit1 PROPERTIES LINK_FLAGS "$ENV{MYLDFLAGS}")
0075 set_target_properties(testedbsync PROPERTIES LINK_FLAGS "$ENV{MYLDFLAGS}")
0076 
0077 # vim: set ts=4 sw=4 et smartindent: