# Code Injection with Language Information?

**URL:** <https://discourse.cmake.org/t/code-injection-with-language-information/13907>\
**Category:** Code\
**Created:** [April 10, 2025, 11:03am UTC](https://discourse.cmake.org/t/code-injection-with-language-information/13907 "2025-04-10T11:03:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naville](https://discourse.cmake.org/user_avatar/discourse.cmake.org/naville/32/2724_2.png) [@Naville](https://discourse.cmake.org/u/Naville)\
**Post date:** [April 10, 2025, 11:03am UTC](https://discourse.cmake.org/t/code-injection-with-language-information/13907/1 "2025-04-10T11:03:13Z")

</div>

Hi: I’m reading [https://cmake.org/cmake/help/latest/command/project.html#code-injection](https://cmake.org/cmake/help/latest/command/project.html#code-injection) But it seems to me that there isn’t a hook for:

```auto
- Toolchain is read and compilers setup
- Languages has been enabled
- No targets has been created yet 

```

My CMake now goes:  
toolchain.cmake:

```auto
set(CMAKE_PROJECT_TOP_LEVEL_INCLUDES project_fixup.cmake)

```

project\_fixup.cmake:

```auto
get_property(LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
message(STATUS "Enabled Languages: ${LANGUAGES}")

```

but during configuration time it prints:

```auto
...
-- Enabled Languages: 
...

```

which is empty.

What am I doing wrong here?
