CMakeLists.txt 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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_LocalActions)
  23. add_subdirectory(test-c-sgltn/InterfaceTest)
  24. add_subdirectory(test-c-sgltn/Test_Expression)
  25. add_subdirectory(test-c-sgltn/Test_Hierarchy)
  26. add_subdirectory(test-c-sgltn/Test_ParallelRegions)
  27. add_subdirectory(test-c-sgltn/Test_Transition)
  28. add_subdirectory(test-c-sgltn/Test_ShallowHistory)
  29. add_subdirectory(test-c-sgltn/Test_LocalActions)
  30. else (COMPILE_SINGLETON)
  31. message ("Compiling Multi-Instance code")
  32. add_subdirectory(src-gen-c/InterfaceTest)
  33. add_subdirectory(src-gen-c/Test_Expression)
  34. add_subdirectory(src-gen-c/Test_Hierarchy)
  35. add_subdirectory(src-gen-c/Test_ParallelRegions)
  36. add_subdirectory(src-gen-c/Test_Transition)
  37. add_subdirectory(src-gen-c/Test_ShallowHistory)
  38. add_subdirectory(src-gen-c/Test_LocalActions)
  39. add_subdirectory(test-c/InterfaceTest)
  40. add_subdirectory(test-c/Test_Expression)
  41. add_subdirectory(test-c/Test_Hierarchy)
  42. add_subdirectory(test-c/Test_ParallelRegions)
  43. add_subdirectory(test-c/Test_Transition)
  44. add_subdirectory(test-c/Test_ShallowHistory)
  45. add_subdirectory(test-c/Test_LocalActions)
  46. add_subdirectory(test-c/TimingTest_ParallelRegions)
  47. endif (COMPILE_SINGLETON)