# Determining the compiler default C++ standard

**URL:** <https://discourse.cmake.org/t/determining-the-compiler-default-c-standard/10389>\
**Category:** Usage\
**Created:** [March 18, 2024, 10:41am UTC](https://discourse.cmake.org/t/determining-the-compiler-default-c-standard/10389 "2024-03-18T10:41:45Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![adaldev](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/9dc877/32.png) [@adaldev](https://discourse.cmake.org/u/adaldev)\
**Post date:** [April 22, 2024, 1:56pm UTC](https://discourse.cmake.org/t/determining-the-compiler-default-c-standard/10389/13 "2024-04-22T13:56:40Z")

</div>

My bad. This way it seems to work.

In order to sum up the thread:

- there’s no “official” way to check the standard that will be actually chosen when using `target_compile_features`
- you can force a standard with `set_property(TARGET ${TARGET_NAME} PROPERTY CXX_STANDARD <value>)`

Thanks again, regards  
PS I’ll mark this comment as answer as it is merging all the provided information

---

_[View the full topic](https://discourse.cmake.org/t/determining-the-compiler-default-c-standard/10389)._
