Guest User

Untitled

a guest
Sep 13th, 2022
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. cmake_minimum_required(VERSION 3.18)
  2. project(test)
  3.  
  4. add_executable(test
  5. main.cxx
  6. test.c
  7. )
  8.  
  9. target_compile_options(test PRIVATE
  10. $<$<COMPILE_LANGUAGE:CXX>:-std=c++11>
  11. $<$<COMPILE_LANGUAGE:C>:-std=gnu99>
  12. )
  13.  
  14. file(GENERATE OUTPUT summary.txt
  15. CONTENT $<TARGET_PROPERTY:test,COMPILE_OPTIONS>
  16. )
  17.  
  18.  
  19. [cmake] CMake Error in CMakeLists.txt:
  20. [cmake] Evaluation file to be written multiple times with different content. This
  21. [cmake] is generally caused by the content evaluating the configuration type,
  22. [cmake] language, or location of object files:
  23. [cmake]
  24. [cmake] C:/projects/tasks/cmake-cxx-flags/build/debug/summary.txt
Advertisement
Add Comment
Please, Sign In to add comment