CMake "Segmentation fault (core dumped)" by get_directory_property
Hello,
I have read the documentation, about get_directory_property
and it states:"The specified directory must have already been traversed by CMake."
But, I am not sure regarding what should be expected in my case with provided code? I guess nothing, or at least errors.
Output log:
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Segmentation fault (core dumped)
CMakeLists.txt
get_directory_property(result_dirs_props DIRECTORY .)
CMake version:
cmake version 3.10.2
CMake was installed by sudo apt-get install cmake
Project structure:
root_folder
--build_directory --running CMake from here by (cmake ..)
--CMakeLists.txt
My OS:
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
Hardware info:
CPU~6 core Intel Core i5-8500 (-MCP-) speed/max~800/3000 MHz
Kernel~5.4.0-56-generic x86_64 Up~15:42
Mem~6876.3/15349.7MB
HDD~256.1GB(84.6% used)
Procs~406 Client~Shell
Edited by Sviatoslav Dubei