1919include_guard (GLOBAL )
2020
2121# ECAL_COMPILER_WARNINGS is set by the root CMakeLists and may be user customized
22- add_library (_ecal_warnings INTERFACE )
23- target_compile_options (_ecal_warnings INTERFACE
24- "$<$<COMPILE_LANGUAGE:C,CXX>:${ECAL_COMPILER_WARNINGS } >"
22+ add_library (_ecal_compiler_args INTERFACE )
23+ target_compile_options (_ecal_compiler_args INTERFACE
24+ "$<$<COMPILE_LANGUAGE:C,CXX>:${ECAL_COMPILER_ARGS } >"
2525)
2626
27- function (ecal_add_compiler_warnings TARGET_NAME)
27+ function (ecal_add_compiler_flags TARGET_NAME)
2828 target_link_libraries ("${TARGET_NAME} " PRIVATE
29- "$<BUILD_INTERFACE:_ecal_warnings >"
29+ "$<BUILD_INTERFACE:_ecal_compiler_args >"
3030 )
3131endfunction ()
3232
@@ -38,7 +38,7 @@ function(ecal_add_app_console TARGET_NAME)
3838 VERSION ${eCAL_VERSION_STRING}
3939 SOVERSION ${eCAL_VERSION_MAJOR}
4040 OUTPUT_NAME ecal_${TARGET_NAME} )
41- ecal_add_compiler_warnings (${TARGET_NAME} )
41+ ecal_add_compiler_flags (${TARGET_NAME} )
4242endfunction ()
4343
4444# This helper function automatically adds a gtest to ecal.
@@ -65,7 +65,7 @@ function(ecal_add_gtest TARGET_NAME)
6565 VERSION ${eCAL_VERSION_STRING}
6666 SOVERSION ${eCAL_VERSION_MAJOR}
6767 OUTPUT_NAME ecal_${TARGET_NAME} )
68- ecal_add_compiler_warnings (${TARGET_NAME} )
68+ ecal_add_compiler_flags (${TARGET_NAME} )
6969endfunction ()
7070
7171function (ecal_add_app_gui TARGET_NAME)
@@ -75,7 +75,7 @@ function(ecal_add_app_gui TARGET_NAME)
7575 VERSION ${eCAL_VERSION_STRING}
7676 SOVERSION ${eCAL_VERSION_MAJOR}
7777 OUTPUT_NAME ecal_${TARGET_NAME} )
78- ecal_add_compiler_warnings (${TARGET_NAME} )
78+ ecal_add_compiler_flags (${TARGET_NAME} )
7979endfunction ()
8080
8181function (ecal_add_app_qt TARGET_NAME)
@@ -87,7 +87,7 @@ function(ecal_add_app_qt TARGET_NAME)
8787 if (WIN32 )
8888 set_target_properties (${PROJECT_NAME} PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup" )
8989 endif ()
90- ecal_add_compiler_warnings (${TARGET_NAME} )
90+ ecal_add_compiler_flags (${TARGET_NAME} )
9191endfunction ()
9292
9393function (ecal_add_mon_plugin TARGET_NAME)
@@ -112,7 +112,7 @@ function(ecal_add_mon_plugin TARGET_NAME)
112112 $<$<CONFIG:RelWithDebInfo>:QT_NO_DEBUG>
113113 $<$<CONFIG:MinSizeRel>:QT_NO_DEBUG>
114114 )
115- ecal_add_compiler_warnings (${TARGET_NAME} )
115+ ecal_add_compiler_flags (${TARGET_NAME} )
116116endfunction ()
117117
118118function (ecal_add_rec_addon TARGET_NAME)
@@ -123,7 +123,7 @@ function(ecal_add_rec_addon TARGET_NAME)
123123 OUTPUT_NAME ecal_${TARGET_NAME}
124124 RUNTIME_OUTPUT_DIRECTORY $<IF:$<BOOL :${WIN32} >,${CMAKE_RUNTIME_OUTPUT_DIRECTORY} /$<CONFIG>/ecalrec_addons,${CMAKE_LIBRARY_OUTPUT_DIRECTORY} /ecal/addons/rec>
125125 )
126- ecal_add_compiler_warnings (${TARGET_NAME} )
126+ ecal_add_compiler_flags (${TARGET_NAME} )
127127endfunction ()
128128
129129function (ecal_add_time_plugin TARGET_NAME)
@@ -132,7 +132,7 @@ function(ecal_add_time_plugin TARGET_NAME)
132132 VERSION ${eCAL_VERSION_STRING}
133133 SOVERSION ${eCAL_VERSION_MAJOR}
134134 )
135- ecal_add_compiler_warnings (${TARGET_NAME} )
135+ ecal_add_compiler_flags (${TARGET_NAME} )
136136endfunction ()
137137
138138function (ecal_add_shared_library TARGET_NAME)
@@ -141,7 +141,7 @@ function(ecal_add_shared_library TARGET_NAME)
141141 VERSION ${eCAL_VERSION_STRING}
142142 SOVERSION ${eCAL_VERSION_MAJOR}
143143 OUTPUT_NAME ecal_${TARGET_NAME} )
144- ecal_add_compiler_warnings (${TARGET_NAME} )
144+ ecal_add_compiler_flags (${TARGET_NAME} )
145145endfunction ()
146146
147147function (ecal_add_static_library TARGET_NAME)
@@ -152,7 +152,7 @@ function(ecal_add_static_library TARGET_NAME)
152152 OUTPUT_NAME ecal_${TARGET_NAME}
153153 POSITION_INDEPENDENT_CODE ON
154154 )
155- ecal_add_compiler_warnings (${TARGET_NAME} )
155+ ecal_add_compiler_flags (${TARGET_NAME} )
156156endfunction ()
157157
158158function (ecal_add_interface_library TARGET_NAME)
@@ -173,6 +173,6 @@ function(ecal_add_sample TARGET_NAME)
173173 VERSION ${eCAL_VERSION_STRING}
174174 SOVERSION ${eCAL_VERSION_MAJOR}
175175 OUTPUT_NAME ecal_sample_${TARGET_NAME} )
176- ecal_add_compiler_warnings (${TARGET_NAME} )
176+ ecal_add_compiler_flags (${TARGET_NAME} )
177177endfunction ()
178178
0 commit comments