You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.5 KiB

  1. add_custom_target(resources)
  2. add_custom_target(test-resources)
  3. if(STORM_SUPPORT_XML_INPUT_FORMATS)
  4. ExternalProject_Add(
  5. xercesc
  6. SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/xercesc-3.1.2
  7. CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/xercesc-3.1.2/configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2 --libdir=${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2/lib CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-O3 CXXFLAGS=-O3
  8. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2
  9. BUILD_COMMAND make
  10. BUILD_IN_SOURCE 0
  11. LOG_CONFIGURE ON
  12. LOG_BUILD ON
  13. LOG_INSTALL ON
  14. )
  15. add_dependencies(resources xercesc)
  16. endif()
  17. ExternalProject_Add(
  18. glpk
  19. DOWNLOAD_COMMAND ""
  20. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/glpk-4.57
  21. SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/glpk-4.57
  22. CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/glpk-4.57/configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/glpk-4.57 --libdir=${CMAKE_CURRENT_BINARY_DIR}/glpk-4.57/lib CC=${CMAKE_C_COMPILER}
  23. BUILD_COMMAND make "CFLAGS=-O2 -w"
  24. INSTALL_COMMAND make install
  25. BUILD_IN_SOURCE 0
  26. LOG_CONFIGURE ON
  27. LOG_BUILD ON
  28. LOG_INSTALL ON
  29. )
  30. add_dependencies(resources glpk)
  31. ExternalProject_Add(
  32. googletest
  33. #For downloads (may be useful later!)
  34. #SVN_REPOSITORY http://googletest.googlecode.com/svn/trunk/
  35. #TIMEOUT 10
  36. DOWNLOAD_COMMAND ""
  37. SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/gtest-1.7.0"
  38. # Force the same output paths for debug and release builds so that
  39. # we know in which place the binaries end up when using the Xcode generator
  40. CMAKE_ARGS -Dgtest_force_shared_crt=ON -DCXX=${CMAKE_CXX_COMPILER} -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG:PATH=${CMAKE_CURRENT_BINARY_DIR}/gtest-1.7.0 -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:PATH=${CMAKE_CURRENT_BINARY_DIR}/gtest-1.7.0
  41. # Disable install step
  42. INSTALL_COMMAND ""
  43. BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/gtest-1.7.0"
  44. INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/gtest-1.7.0"
  45. # Wrap download, configure and build steps in a script to log output
  46. LOG_CONFIGURE ON
  47. LOG_BUILD ON)
  48. # Specify include dir
  49. ExternalProject_Get_Property(googletest source_dir)
  50. set(GTEST_INCLUDE_DIR ${source_dir}/include PARENT_SCOPE)
  51. # Specify MainTest's link libraries
  52. ExternalProject_Get_Property(googletest binary_dir)
  53. set(GTEST_LIBRARIES ${binary_dir}/libgtest.a ${binary_dir}/libgtest_main.a PARENT_SCOPE)
  54. add_dependencies(test-resources googletest)