diff --git a/scripts/cmake/Functions.cmake b/scripts/cmake/Functions.cmake
index bc47dff825590c522350cf13dcab4559fa6a9968..1f8213cdd0c48759984a147213e9da2c96f08350 100644
--- a/scripts/cmake/Functions.cmake
+++ b/scripts/cmake/Functions.cmake
@@ -12,9 +12,6 @@ macro(GET_SOURCE_FILES source_files)
     file(GLOB GET_SOURCE_FILES_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
          CONFIGURE_DEPENDS ${DIR}/*.h
     )
-    file(GLOB GET_SOURCE_FILES_TEMPLATES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
-         CONFIGURE_DEPENDS ${DIR}/*.tpp
-    )
     file(GLOB GET_SOURCE_FILES_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
          CONFIGURE_DEPENDS ${DIR}/*.cpp
     )
@@ -81,7 +78,7 @@ function(add_autogen_include target)
     endif()
 endfunction()
 
-# Replacement for add_library() for ogs targets
+# Replacement for add_library() for ogs libraries
 function(ogs_add_library targetName)
     set(options STATIC SHARED)
     cmake_parse_arguments(ogs_add_library "${options}" "" "" ${ARGN})
@@ -132,6 +129,35 @@ function(ogs_add_library targetName)
     GroupSourcesByFolder(${targetName})
 endfunction()
 
+# Replacement for ogs_add_executable() for ogs executables
+function(ogs_add_executable targetName)
+    cmake_parse_arguments(ogs_add_executable "" "" "" ${ARGN})
+
+    foreach(file ${ogs_add_executable_UNPARSED_ARGUMENTS})
+        get_filename_component(file_path ${file} REALPATH)
+        list(APPEND files ${file_path})
+    endforeach()
+
+    add_executable(${targetName} ${files})
+
+    target_compile_options(
+        ${targetName}
+        PRIVATE # OR does not work with cotire
+                # $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,
+                # $<CXX_COMPILER_ID:GNU>>:-Wall -Wextra>
+                $<$<CXX_COMPILER_ID:Clang>:-Wall
+                -Wextra
+                -Wunreachable-code>
+                $<$<CXX_COMPILER_ID:AppleClang>:-Wall
+                -Wextra
+                -Wunreachable-code>
+                $<$<CXX_COMPILER_ID:GNU>:-Wall
+                -Wextra
+                -Wunreachable-code>
+                $<$<CXX_COMPILER_ID:MSVC>:/W3>
+    )
+endfunction()
+
 # Parses current directory into a list
 function(current_dir_as_list baseDir outList)
     file(RELATIVE_PATH REL_DIR ${PROJECT_SOURCE_DIR}/${baseDir}