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.

41 lines
1.6 KiB

  1. cmake_minimum_required (VERSION 2.8.6)
  2. # Set project name
  3. project (cudd C CXX)
  4. # Main Sources
  5. file(GLOB_RECURSE CUDD_HEADERS ${PROJECT_SOURCE_DIR}/src/*.h)
  6. file(GLOB_RECURSE CUDD_HEADERS_CXX ${PROJECT_SOURCE_DIR}/src/*.hh)
  7. file(GLOB_RECURSE CUDD_SOURCES ${PROJECT_SOURCE_DIR}/src/*.c)
  8. file(GLOB_RECURSE CUDD_SOURCES_CXX ${PROJECT_SOURCE_DIR}/src/*.cc)
  9. # Add base folder for better inclusion paths
  10. include_directories("${PROJECT_SOURCE_DIR}/src")
  11. include_directories("${PROJECT_SOURCE_DIR}/src/cudd")
  12. include_directories("${PROJECT_SOURCE_DIR}/src/dddmp")
  13. include_directories("${PROJECT_SOURCE_DIR}/src/epd")
  14. include_directories("${PROJECT_SOURCE_DIR}/src/mtr")
  15. include_directories("${PROJECT_SOURCE_DIR}/src/nanotrav")
  16. include_directories("${PROJECT_SOURCE_DIR}/src/st")
  17. include_directories("${PROJECT_SOURCE_DIR}/src/util")
  18. if(CMAKE_COMPILER_IS_GNUCC)
  19. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-function")
  20. elseif(MSVC)
  21. # required for GMM to compile, ugly error directive in their code
  22. add_definitions(/D_SCL_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS)
  23. else(CLANG)
  24. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-newline-eof -Wno-unneeded-internal-declaration -Wno-unused-variable -Wno-unused-const-variable -Wno-parentheses-equality")
  25. endif()
  26. # Since we do not target Alphas, this symbol is always set
  27. add_definitions(-DHAVE_IEEE_754)
  28. if(CMAKE_SIZEOF_VOID_P EQUAL 8)
  29. message(STATUS "CUDD: Targeting 64bit architecture")
  30. add_definitions(-DSIZEOF_VOID_P=8)
  31. add_definitions(-DSIZEOF_LONG=8)
  32. endif()
  33. # Add the library
  34. add_library(cudd ${CUDD_SOURCES} ${CUDD_HEADERS} ${CUDD_HEADERS_CXX} ${CUDD_SOURCES_CXX})