cmBuildSharedLibrariesCommand.cxx 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2000 National Library of Medicine
  8. All rights reserved.
  9. See COPYRIGHT.txt for copyright details.
  10. =========================================================================*/
  11. #include "cmBuildSharedLibrariesCommand.h"
  12. // cmBuildSharedLibrariesCommand
  13. bool cmBuildSharedLibrariesCommand::Invoke(std::vector<std::string>& args)
  14. {
  15. // Now check and see if the value has been stored in the cache
  16. // already, if so use that value and don't look for the program
  17. const char* cacheValue
  18. = cmCacheManager::GetInstance()->GetCacheValue("BUILD_SHARED_LIBS");
  19. if(!cacheValue)
  20. {
  21. cmCacheManager::GetInstance()->
  22. AddCacheEntry("BUILD_SHARED_LIBS",
  23. false,
  24. "If ON, the resulting project or makefiles will "
  25. "produce shared libraries.");
  26. m_Makefile->AddDefinition("BUILD_SHARED_LIBS", false);
  27. }
  28. else
  29. {
  30. m_Makefile->AddDefinition("BUILD_SHARED_LIBS",
  31. cmCacheManager::
  32. GetInstance()->IsOn("BUILD_SHARED_LIBS"));
  33. }
  34. return true;
  35. }