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.

29 lines
1.5 KiB

  1. string(REPLACE " " ";" CMAKE_CXX_FLAGS_AS_LIST ${CMAKE_CXX_FLAGS})
  2. if(CMAKE_BUILD_TYPE MATCHES DEBUG)
  3. string(REPLACE " " ";" CMAKE_CXX_FLAGS_DEBUG_AS_LIST ${CMAKE_CXX_FLAGS_DEBUG})
  4. list(APPEND CMAKE_CXX_FLAGS_AS_LIST ${CMAKE_CXX_FLAGS_DEBUG_AS_LIST})
  5. else()
  6. string(REPLACE " " ";" CMAKE_CXX_FLAGS_RELEASE_AS_LIST ${CMAKE_CXX_FLAGS_RELEASE})
  7. list(APPEND CMAKE_CXX_FLAGS_AS_LIST ${CMAKE_CXX_FLAGS_RELEASE_AS_LIST})
  8. endif()
  9. set(CPPTEMPLATE_LIB_DIR ${STORM_3RDPARTY_BINARY_DIR}/cpptemplate)
  10. ExternalProject_Add(
  11. cpptemplate
  12. DOWNLOAD_COMMAND ""
  13. SOURCE_DIR ${STORM_3RDPARTY_SOURCE_DIR}/cpptemplate
  14. PREFIX ${STORM_3RDPARTY_BINARY_DIR}/cpptemplate
  15. CONFIGURE_COMMAND ""
  16. BUILD_COMMAND ${CMAKE_CXX_COMPILER} -c ${CMAKE_CXX_FLAGS_AS_LIST} ${CMAKE_CXX_FLAGS_RELEASE_AS_LIST} -fPIC -I${Boost_INCLUDE_DIRS} ${STORM_3RDPARTY_SOURCE_DIR}/cpptemplate/cpptempl.cpp -o ${CPPTEMPLATE_LIB_DIR}/cpptemplate${STATIC_EXT}
  17. INSTALL_COMMAND ""
  18. BUILD_IN_SOURCE 0
  19. LOG_BUILD ON
  20. BUILD_BYPRODUCTS ${CPPTEMPLATE_LIB_DIR}/cpptemplate${STATIC_EXT}
  21. )
  22. set(CPPTEMPLATE_INCLUDE_DIR ${STORM_3RDPARTY_SOURCE_DIR}/cpptemplate)
  23. set(CPPTEMPLATE_STATIC_LIBRARY ${STORM_3RDPARTY_BINARY_DIR}/cpptemplate/cpptemplate${STATIC_EXT})
  24. add_dependencies(resources cpptemplate)
  25. message(STATUS "storm - Linking with cpptemplate.")
  26. add_imported_library(cpptempl STATIC ${CPPTEMPLATE_STATIC_LIBRARY} ${CPPTEMPLATE_INCLUDE_DIR})
  27. list(APPEND STORM_DEP_TARGETS cpptempl_STATIC)