diff --git a/cmake/Modules/shared_git_project.cmake b/cmake/Modules/shared_git_project.cmake index 6924aaa..af71eca 100644 --- a/cmake/Modules/shared_git_project.cmake +++ b/cmake/Modules/shared_git_project.cmake @@ -58,9 +58,8 @@ function (add_shared_git_project SUBMODULE_PATH) #Check if submodule is a subdirectory of the current source dir file(RELATIVE_PATH reported_submodule_rel_path "${CMAKE_CURRENT_SOURCE_DIR}" "${reported_submodule_dir}") string(LENGTH "${reported_submodule_rel_path}" rel_path_len) - message(STATUS "\"${reported_submodule_rel_path}\" - ${rel_path_len}") if (${rel_path_len} GREATER 2) - string(SUBSTRING reported_submodule_rel_path 0 3 first_bit) + string(SUBSTRING "${reported_submodule_rel_path}" 0 3 first_bit) if ("../" STREQUAL "${first_bit}") set(is_out_of_dirtree ON) else() @@ -77,10 +76,10 @@ function (add_shared_git_project SUBMODULE_PATH) set(shared_project_binary "${CMAKE_CURRENT_BINARY_DIR}/shared_projects/${proj_name_orig}") if (is_out_of_dirtree) - #message("Would call add_subdirectory(\"${reported_submodule_dir}\" \"${shared_project_binary}\")") + #message(FATAL_ERROR "Would call add_subdirectory(\"${reported_submodule_dir}\" \"${shared_project_binary}\")") add_subdirectory("${reported_submodule_dir}" "${shared_project_binary}") else() - #message("Would call add_subdirectory(\"${reported_submodule_rel_path}\")") + #message(FATAL_ERROR "Would call add_subdirectory(\"${reported_submodule_rel_path}\")") add_subdirectory("${reported_submodule_rel_path}") endif() endfunction()