CLion changes its Project Directory after loading the CMake file

Answered

Hi, 
I am trying to develop with Zephyr on the CLion but when I load the CMake file it always changes my project so I see any other folders but not the folder I originally opened.

Here the before Picture

And after loading:

Also Toolchain and CMake Settings:

And the CMakeLists.txt

# SPDX-License-Identifier: Apache-2.0

cmake_minimum_required(VERSION 3.20.0)

# Set the target board
set(BOARD nucleo_f103rb)

# Set the toolchain
set(ZEPHYR_TOOLCHAIN_VARIANT zephyr)

# Add source files
FILE(GLOB app_sources src/*.c)

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(hello_world)

target_sources(app PRIVATE src/main.c)


Thanks in advance for any help.

1
3 comments

Hello!

Please open the registry (`Help | Find Action`, type "Registry...") and let us know if the clion.workspace.external.source.group.into.folders option is enabled. 

If it's enabled, please disable this option, it should help.

0

Sorry for the delay in response. Please update CLion to the latest stable release (2023.2.1). How does the Project view look in this CLion version? Please check with the clion.workspace.external.source.group.into.folders option both enabled and disabled.

0

Please sign in to leave a comment.