# 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:** 12

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [April 22, 2024, 12:57pm UTC](https://discourse.cmake.org/t/determining-the-compiler-default-c-standard/10389/12 "2024-04-22T12:57:46Z")

</div>

> [@adaldev](#):
>
> `set(CXX_STANDARD C++14)`

Unless the project code does something with that, it is not meaningful to CMake. To request C++14 via the property/variable use either:

```cmake
set_property(TARGET ${TARGET_NAME} PROPERTY CXX_STANDARD 14)

```

after creating the target, or

```auto
set(CMAKE_CXX_STANDARD 14)

```

before creating the target.

---

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