cmBuildSharedLibrariesCommand.cxx 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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()->AddCacheEntry("BUILD_SHARED_LIBS",false);
  22. m_Makefile->AddDefinition("BUILD_SHARED_LIBS", false);
  23. }
  24. else
  25. {
  26. m_Makefile->AddDefinition("BUILD_SHARED_LIBS",
  27. cmCacheManager::
  28. GetInstance()->IsOn("BUILD_SHARED_LIBS"));
  29. }
  30. return true;
  31. }