diff --git a/slsDetectorServers/CMakeLists.txt b/slsDetectorServers/CMakeLists.txt index fad8e92b9..282d16920 100644 --- a/slsDetectorServers/CMakeLists.txt +++ b/slsDetectorServers/CMakeLists.txt @@ -1,3 +1,24 @@ + +add_library(slsProjectCWarnings INTERFACE) +target_compile_options(slsProjectCWarnings INTERFACE + -Wall + -Wextra + -Wno-unused-parameter #Needs to be slowly mitigated + -Wdouble-promotion + -Wformat=2 + -Wredundant-decls + # -Wconversion + -Wdouble-promotion + -Werror=return-type + ) + +# Install fake the library +install(TARGETS slsProjectCWarnings + EXPORT "${TARGETS_EXPORT_NAME}" + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +) add_subdirectory(ctbDetectorServer) add_subdirectory(eigerDetectorServer) add_subdirectory(gotthardDetectorServer) diff --git a/slsDetectorServers/ctbDetectorServer/CMakeLists.txt b/slsDetectorServers/ctbDetectorServer/CMakeLists.txt index 5a45b5557..7ffdf780c 100644 --- a/slsDetectorServers/ctbDetectorServer/CMakeLists.txt +++ b/slsDetectorServers/ctbDetectorServer/CMakeLists.txt @@ -32,7 +32,7 @@ target_compile_definitions(ctbDetectorServer_virtual ) target_link_libraries(ctbDetectorServer_virtual - PUBLIC pthread rt + PUBLIC pthread rt slsProjectCWarnings ) set_target_properties(ctbDetectorServer_virtual PROPERTIES diff --git a/slsDetectorServers/eigerDetectorServer/CMakeLists.txt b/slsDetectorServers/eigerDetectorServer/CMakeLists.txt index 22feda2cc..d27f38252 100644 --- a/slsDetectorServers/eigerDetectorServer/CMakeLists.txt +++ b/slsDetectorServers/eigerDetectorServer/CMakeLists.txt @@ -27,7 +27,7 @@ target_compile_definitions(eigerDetectorServerMaster_virtual ) target_link_libraries(eigerDetectorServerMaster_virtual - PUBLIC pthread rt + PUBLIC pthread rt slsProjectCWarnings ) set_target_properties(eigerDetectorServerMaster_virtual PROPERTIES diff --git a/slsDetectorServers/gotthard2DetectorServer/CMakeLists.txt b/slsDetectorServers/gotthard2DetectorServer/CMakeLists.txt index 20542efd7..7d2d6ed01 100644 --- a/slsDetectorServers/gotthard2DetectorServer/CMakeLists.txt +++ b/slsDetectorServers/gotthard2DetectorServer/CMakeLists.txt @@ -27,7 +27,7 @@ target_compile_definitions(gotthard2DetectorServer_virtual ) target_link_libraries(gotthard2DetectorServer_virtual - PUBLIC pthread rt + PUBLIC pthread rt slsProjectCWarnings ) set_target_properties(gotthard2DetectorServer_virtual PROPERTIES diff --git a/slsDetectorServers/gotthardDetectorServer/CMakeLists.txt b/slsDetectorServers/gotthardDetectorServer/CMakeLists.txt index 46268fec4..6055fcbc4 100644 --- a/slsDetectorServers/gotthardDetectorServer/CMakeLists.txt +++ b/slsDetectorServers/gotthardDetectorServer/CMakeLists.txt @@ -25,8 +25,8 @@ target_compile_definitions(gotthardDetectorServer_virtual ) target_link_libraries(gotthardDetectorServer_virtual - PUBLIC pthread rt -) + PUBLIC pthread rt slsProjectCWarnings +) set_target_properties(gotthardDetectorServer_virtual PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin diff --git a/slsDetectorServers/jungfrauDetectorServer/CMakeLists.txt b/slsDetectorServers/jungfrauDetectorServer/CMakeLists.txt index 2d1b5e493..9b96b51a0 100644 --- a/slsDetectorServers/jungfrauDetectorServer/CMakeLists.txt +++ b/slsDetectorServers/jungfrauDetectorServer/CMakeLists.txt @@ -28,7 +28,7 @@ target_compile_definitions(jungfrauDetectorServer_virtual ) target_link_libraries(jungfrauDetectorServer_virtual - PUBLIC pthread rt slsProjectOptions slsProjectWarnings + PUBLIC pthread rt slsProjectCWarnings ) set_target_properties(jungfrauDetectorServer_virtual PROPERTIES diff --git a/slsDetectorServers/moenchDetectorServer/CMakeLists.txt b/slsDetectorServers/moenchDetectorServer/CMakeLists.txt index f7a99301c..4d51f71bf 100644 --- a/slsDetectorServers/moenchDetectorServer/CMakeLists.txt +++ b/slsDetectorServers/moenchDetectorServer/CMakeLists.txt @@ -30,7 +30,7 @@ target_compile_definitions(moenchDetectorServer_virtual ) target_link_libraries(moenchDetectorServer_virtual - PUBLIC pthread rt + PUBLIC pthread rt slsProjectCWarnings ) set_target_properties(moenchDetectorServer_virtual PROPERTIES diff --git a/slsDetectorServers/mythen3DetectorServer/CMakeLists.txt b/slsDetectorServers/mythen3DetectorServer/CMakeLists.txt index feb438fa0..f6a4c841c 100644 --- a/slsDetectorServers/mythen3DetectorServer/CMakeLists.txt +++ b/slsDetectorServers/mythen3DetectorServer/CMakeLists.txt @@ -26,7 +26,7 @@ target_compile_definitions(mythen3DetectorServer_virtual ) target_link_libraries(mythen3DetectorServer_virtual - PUBLIC pthread rt + PUBLIC pthread rt slsProjectCWarnings ) set_target_properties(mythen3DetectorServer_virtual PROPERTIES