build: Change HAVE_OSX_SECURITY to a more general HAVE_OSX_FRAMEWORKS
We are starting to use more macOS frameworks and define/build
environment constant name needs to be more general.
Change-Id: I893d436a34c3370a7f12ac681d1796ef5631cc0e
diff --git a/tests/unit-tests/security/tpm/back-end.t.cpp b/tests/unit-tests/security/tpm/back-end.t.cpp
index 8dc93a4..efd4bd1 100644
--- a/tests/unit-tests/security/tpm/back-end.t.cpp
+++ b/tests/unit-tests/security/tpm/back-end.t.cpp
@@ -31,9 +31,9 @@
#include "back-end-wrapper-file.hpp"
#include "back-end-wrapper-mem.hpp"
-#ifdef NDN_CXX_HAVE_OSX_SECURITY
+#ifdef NDN_CXX_HAVE_OSX_FRAMEWORKS
#include "back-end-wrapper-osx.hpp"
-#endif // NDN_CXX_HAVE_OSX_SECURITY
+#endif // NDN_CXX_HAVE_OSX_FRAMEWORKS
#include "boost-test.hpp"
#include <boost/mpl/list.hpp>
@@ -51,9 +51,9 @@
using tpm::Tpm;
typedef boost::mpl::list<
-#ifdef NDN_CXX_HAVE_OSX_SECURITY
+#ifdef NDN_CXX_HAVE_OSX_FRAMEWORKS
BackEndWrapperOsx,
-#endif // NDN_CXX_HAVE_OSX_SECURITY
+#endif // NDN_CXX_HAVE_OSX_FRAMEWORKS
BackEndWrapperMem,
BackEndWrapperFile
> TestBackEnds;
diff --git a/tests/unit-tests/security/v1/key-chain.t.cpp b/tests/unit-tests/security/v1/key-chain.t.cpp
index ef10ca4..0ae3cc3 100644
--- a/tests/unit-tests/security/v1/key-chain.t.cpp
+++ b/tests/unit-tests/security/v1/key-chain.t.cpp
@@ -81,7 +81,7 @@
{
createClientConf({"pib=pib-sqlite3:%PATH%"});
-#if defined(NDN_CXX_HAVE_OSX_SECURITY)
+#if defined(NDN_CXX_HAVE_OSX_FRAMEWORKS)
std::string oldHOME;
if (std::getenv("OLD_HOME"))
oldHOME = std::getenv("OLD_HOME");
@@ -100,7 +100,7 @@
KeyChain keyChain;
BOOST_CHECK_EQUAL(keyChain.getPib().getPibLocator(), "pib-sqlite3:" + m_pibDir);
-#if defined(NDN_CXX_HAVE_OSX_SECURITY)
+#if defined(NDN_CXX_HAVE_OSX_FRAMEWORKS)
BOOST_CHECK_EQUAL(keyChain.getPib().getTpmLocator(), "tpm-osxkeychain:");
BOOST_CHECK_EQUAL(keyChain.getTpm().getTpmLocator(), "tpm-osxkeychain:");
#else
@@ -108,7 +108,7 @@
BOOST_CHECK_EQUAL(keyChain.getTpm().getTpmLocator(), "tpm-file:");
#endif
-#if defined(NDN_CXX_HAVE_OSX_SECURITY)
+#if defined(NDN_CXX_HAVE_OSX_FRAMEWORKS)
if (!HOME.empty())
setenv("HOME", HOME.c_str(), true);
else
diff --git a/tests/unit-tests/security/v2/key-chain.t.cpp b/tests/unit-tests/security/v2/key-chain.t.cpp
index d1a954c..a874464 100644
--- a/tests/unit-tests/security/v2/key-chain.t.cpp
+++ b/tests/unit-tests/security/v2/key-chain.t.cpp
@@ -81,7 +81,7 @@
{
createClientConf({"pib=pib-memory:"});
-#if defined(NDN_CXX_HAVE_OSX_SECURITY)
+#if defined(NDN_CXX_HAVE_OSX_FRAMEWORKS)
std::string oldHOME;
if (std::getenv("OLD_HOME"))
oldHOME = std::getenv("OLD_HOME");
@@ -100,7 +100,7 @@
KeyChain keyChain;
BOOST_CHECK_EQUAL(keyChain.getPib().getPibLocator(), "pib-memory:");
-#if defined(NDN_CXX_HAVE_OSX_SECURITY)
+#if defined(NDN_CXX_HAVE_OSX_FRAMEWORKS)
BOOST_CHECK_EQUAL(keyChain.getPib().getTpmLocator(), "tpm-osxkeychain:");
BOOST_CHECK_EQUAL(keyChain.getTpm().getTpmLocator(), "tpm-osxkeychain:");
#else
@@ -108,7 +108,7 @@
BOOST_CHECK_EQUAL(keyChain.getTpm().getTpmLocator(), "tpm-file:");
#endif
-#if defined(NDN_CXX_HAVE_OSX_SECURITY)
+#if defined(NDN_CXX_HAVE_OSX_FRAMEWORKS)
if (!HOME.empty())
setenv("HOME", HOME.c_str(), 1);
else
diff --git a/tests/wscript b/tests/wscript
index 89a06cc..af4b422 100644
--- a/tests/wscript
+++ b/tests/wscript
@@ -33,7 +33,7 @@
defines='UNIT_TEST_CONFIG_PATH=\"%s/tmp-files/\"' %(bld.bldnode),
install_path=None)
- if bld.env['HAVE_OSX_SECURITY']:
+ if bld.env['HAVE_OSX_FRAMEWORKS']:
unit_tests.source += bld.path.ant_glob('unit-tests/**/*-osx.t.cpp')
# In case we want to make it optional later