From: E. Scott Daniels Date: Fri, 14 Jun 2019 16:30:21 +0000 (-0400) Subject: fix(build): Correct var retention bug in cmake X-Git-Tag: 1.0.36~6 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=257323c1e192d49509fffe8df9af53b92ed508c8;p=ric-plt%2Flib%2Frmr.git fix(build): Correct var retention bug in cmake The PACK_EXTERNAL flag was not being removed from the cache after configuring the Makefile. This was causing the pack external flag to remain set for all subsequent executions of cmake even if the flag was not given (and the default of 0 expected). Signed-off-by: E. Scott Daniels Change-Id: I308e5bf64248d9107760ce0669be282437e5d06b --- diff --git a/CMakeLists.txt b/CMakeLists.txt index ff39103..c9ca0ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -193,8 +193,6 @@ else() set( need_ext 0 ) endif() -unset( SKIP_EXTERNALS CACHE ) # prevent these from being applied next build unless specifically set on comd line -unset( PACK_EXTERNALS CACHE ) # this gets us round a chicken/egg problem. include files don't exist until make is run @@ -297,7 +295,7 @@ unset( DEV_PKG CACHE ) # prevent from being a hiddent setting if user redoes # (sure would be nice if FILEs allowed for globbing; sadlyy it does not.) # if( PACK_EXTERNALS ) - message( "including nano and nng libraries in the deb" ) + message( "+++ including nano and nng libraries in the deb" ) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libnanomsg${nano_so_suffix} ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libnanomsg${nano_so_suffix_m} @@ -310,6 +308,9 @@ if( PACK_EXTERNALS ) ) endif() +unset( SKIP_EXTERNALS CACHE ) # prevent these from being applied next build unless specifically set on comd line +unset( PACK_EXTERNALS CACHE ) + IF( EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake" ) include( InstallRequiredSystemLibraries )