CMakeLists.txt 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. cmake_minimum_required(VERSION 2.8)
  2. enable_testing()
  3. if (CMAKE_COMPILER_IS_GNUCC)
  4. #add_definitions( -Wall -O0 -g)
  5. SET(CMAKE_C_FLAGS "-O3 -Wall") # -fprofile-arcs -ftest-coverage")
  6. #SET(CMAKE_SHARED_LINKER_FLAGS="-fprofile-arcs -ftest-coverage")
  7. #SET(CMAKE_EXE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage")
  8. endif (CMAKE_COMPILER_IS_GNUCC)
  9. string(REGEX MATCH "clang" CMAKE_COMPILER_IS_CLANG "${CMAKE_C_COMPILER}")
  10. if (CMAKE_COMPILER_IS_CLANG)
  11. message("This is CLANG")
  12. SET(CMAKE_C_FLAGS "-g -O0 -Wall")
  13. endif (CMAKE_COMPILER_IS_CLANG)
  14. if (COMPILE_SINGLETON)
  15. message ("Compiling Singleton code")
  16. add_subdirectory(src-gen-c-sgltn/InterfaceTest)
  17. add_subdirectory(src-gen-c-sgltn/Test_Expression)
  18. add_subdirectory(src-gen-c-sgltn/Test_Hierarchy)
  19. add_subdirectory(src-gen-c-sgltn/Test_ParallelRegions)
  20. add_subdirectory(src-gen-c-sgltn/Test_Transition)
  21. add_subdirectory(src-gen-c-sgltn/Test_ShallowHistory)
  22. add_subdirectory(src-gen-c-sgltn/Test_DeepHistory)
  23. add_subdirectory(src-gen-c-sgltn/Test_LocalActions)
  24. add_subdirectory(test-c-sgltn/InterfaceTest)
  25. add_subdirectory(test-c-sgltn/Test_Expression)
  26. add_subdirectory(test-c-sgltn/Test_Hierarchy)
  27. add_subdirectory(test-c-sgltn/Test_ParallelRegions)
  28. add_subdirectory(test-c-sgltn/Test_Transition)
  29. add_subdirectory(test-c-sgltn/Test_ShallowHistory)
  30. add_subdirectory(test-c-sgltn/Test_DeepHistory)
  31. add_subdirectory(test-c-sgltn/Test_LocalActions)
  32. else (COMPILE_SINGLETON)
  33. message ("Compiling Multi-Instance code")
  34. add_subdirectory(src-gen-c/InterfaceTest)
  35. add_subdirectory(src-gen-c/Test_Expression)
  36. add_subdirectory(src-gen-c/Test_Hierarchy)
  37. add_subdirectory(src-gen-c/Test_ParallelRegions)
  38. add_subdirectory(src-gen-c/Test_Transition)
  39. add_subdirectory(src-gen-c/Test_ShallowHistory)
  40. add_subdirectory(src-gen-c/Test_DeepHistory)
  41. add_subdirectory(src-gen-c/Test_LocalActions)
  42. add_subdirectory(test-c/InterfaceTest)
  43. add_subdirectory(test-c/Test_Expression)
  44. add_subdirectory(test-c/Test_Hierarchy)
  45. add_subdirectory(test-c/Test_ParallelRegions)
  46. add_subdirectory(test-c/Test_Transition)
  47. add_subdirectory(test-c/Test_ShallowHistory)
  48. add_subdirectory(test-c/Test_DeepHistory)
  49. add_subdirectory(test-c/Test_LocalActions)
  50. if (CMAKE_COMPILER_IS_GNUCC)
  51. add_subdirectory(test-c/TimingTest_ParallelRegions)
  52. endif (CMAKE_COMPILER_IS_GNUCC)
  53. # add_subdirectory(test-cppwrapper/InterfaceTest)
  54. endif (COMPILE_SINGLETON)