We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents cad19a9 + c96bdff commit fbb9056Copy full SHA for fbb9056
1 file changed
src/Common.cmake
@@ -1,7 +1,17 @@
1
include_guard()
2
3
+# This function sets ProjectOptions_SRC_DIR using the current lists path
4
+macro(set_project_options_src_dir)
5
+ get_directory_property(LISTFILE_STACK LISTFILE_STACK)
6
+ list(POP_BACK LISTFILE_STACK _LIST_FILE)
7
+ cmake_path(GET _LIST_FILE PARENT_PATH ProjectOptions_SRC_DIR)
8
+endmacro()
9
+
10
# Common project settings run by default for all the projects that call `project_options()`
11
macro(common_project_options)
12
+ set_project_options_src_dir()
13
+ message(DEBUG "${ProjectOptions_SRC_DIR}")
14
15
include("${ProjectOptions_SRC_DIR}/PreventInSourceBuilds.cmake")
16
assure_out_of_source_builds()
17
0 commit comments