CMAKE_CURRENT_SOURCE_DIR — CMake 3.23.0-rc3 Documentation
cmake.org › cmake › helpThe path to the source directory currently being processed. This is the full path to the source directory that is currently being processed by cmake. When run in -P script mode, CMake sets the variables CMAKE_BINARY_DIR, CMAKE_SOURCE_DIR , CMAKE_CURRENT_BINARY_DIR and CMAKE_CURRENT_SOURCE_DIR to the current working directory.
get_filename_component — CMake 3.23.0-rc4 Documentation
cmake.org › cmake › helpIf no base directory is provided, the default base directory will be CMAKE_CURRENT_SOURCE_DIR. Paths are returned with forward slashes and have no trailing slashes. If the optional CACHE argument is specified, the result variable is added to the cache. get_filename_component (<var> <FileName> PROGRAM [PROGRAM_ARGS <arg_var>] [CACHE])
cmake Tutorial => Getting started with cmake
https://riptutorial.com/cmake> cmake -E make_directory build > cmake -E chdir build cmake .. > cmake --build build Switching between build types, e.g. debug and release. CMake knows several build types, which usually influence default compiler and linker parameters (such as debugging information being created) or alternative code paths.
get_target_property — CMake 3.23.0-rc2 Documentation
cmake.org › cmake › helpProperties are usually used to control how a target is built, but some query the target instead. This command can get properties for any target so far created. The targets do not need to be in the current CMakeLists.txt file. See also the more general get_property () command. See Properties on Targets for the list of properties known to CMake.
[SOLVED] CMake: how to retrieve the current directory ...
bbs.archlinux.org › viewtopicJan 13, 2009 · Project2. CMakeLists.txt. Project1 contains two files with some pieces of CMake configurations. CMakeLists.txt includes file1.cmake: include (file1.cmake) Similarly, file1.cmake includes file2.cmake. Everything works fine. Now, also Project2 have to be configured using file1.cmake and file2.cmake. Its CMakeLists.txt looks like: