CMakeLists.txt 936 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
  4. project(test C)
  5. #set(CMAKE_FOLDER ON)
  6. add_executable(groups
  7. test1.c
  8. test1.h
  9. test2a.c
  10. test4.c
  11. test5.c
  12. test6.c
  13. test7.c
  14. standard.h
  15. testOBJ.c
  16. testOBJ.h
  17. sub/testOBJ.c
  18. sub/testOBJ.h
  19. textfile.txt
  20. textfile2.txt
  21. test3.c
  22. Atest3.c
  23. # object.o
  24. resource.pdf
  25. cmake.rule
  26. s5.h
  27. s2.h
  28. s4.h
  29. standard.h
  30. )
  31. if(TEST_PROP)
  32. set_target_properties(groups PROPERTIES GHS_NO_SOURCE_GROUP_FILE ON)
  33. endif()
  34. if(CMAKE_C_COMPILER_ID MATCHES "GHS")
  35. target_link_options(groups PRIVATE "-non_shared")
  36. endif()
  37. source_group( gC FILES sub/testOBJ.h testOBJ.c testOBJ.h sub/testOBJ.c )
  38. source_group( gA FILES test1.c test1.h)
  39. source_group( gB test[65].c )
  40. source_group( gC\\gD FILES test7.c )
  41. source_group( docs FILES textfile.txt )