Advertisement
Guest User

Untitled

a guest
Dec 4th, 2023
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. # Get the value of the __STDC_VERSION__ preprocessor define.
  2. if((DEFINED JAS_CROSSCOMPILING AND JAS_CROSSCOMPILING) OR
  3. (NOT DEFINED JAS_CROSSCOMPILING AND CMAKE_CROSSCOMPILING))
  4. message("A cross-compiling environment has been detected.")
  5. # Note: The variable JAS_STDC_VERSION should be set to the value of the
  6. # preprocessor symbol __STDC_VERSION__ on the target platform.
  7. # Since CMake is unable to run a cross-compiled program, the value of
  8. # __STDC_VERSION__ cannot be automatically determined when
  9. # cross-compiling. If cross-compiling, the value of JAS_STDC_VERSION
  10. # will need to be set manually from the command line
  11. # (e.g., using -DJAS_STDC_VERSION=YYYYMML) or by changing the line below.
  12. if(NOT JAS_WASM)
  13. set(JAS_STDC_VERSION "0L" CACHE INTERNAL "The value of __STDC_VERSION__.")
  14. if (JAS_STDC_VERSION STREQUAL "0L")
  15. message(FATAL_ERROR
  16. "The value of __STDC_VERSION__ cannot be automatically determined "
  17. "when cross-compiling. Please set JAS_STDC_VERSION to the value "
  18. "of __STDC_VERSION__ when invoking CMake (e.g., by using the "
  19. "option -DJAS_STDC_VERSION=...) or modify the CMakeLists.txt "
  20. "appropriately.")
  21. endif()
  22. endif()
  23. else()
  24. jas_get_stdc_version(status JAS_STDC_VERSION)
  25. if(NOT status)
  26. message(FATAL_ERROR "Cannot determine the value of __STDC_VERSION__.")
  27. endif()
  28. endif()
  29. message("__STDC_VERSION__: ${JAS_STDC_VERSION}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement