@@ -4,10 +4,10 @@ cmake_minimum_required(VERSION 3.13.4 FATAL_ERROR)
44# ======================================================================================================================
55
66# project
7- project (Modbus_TCP_client_shm LANGUAGES CXX VERSION 1.1.0 )
7+ project (Modbus_TCP_client_shm LANGUAGES CXX VERSION 1.1.1 )
88
99# settings
10- set (Target "Modbus_TCP_client_shm " ) # Executable name (without file extension!)
10+ set (Target "modbus-tcp-client-shm " ) # Executable name (without file extension!)
1111set (STANDARD 17) # C++ Standard
1212set (ARCHITECTURE "native" ) # CPU architecture to optimize for (only relevant if OPTIMIZE_FOR_ARCHITECTURE is ON)
1313
@@ -41,6 +41,7 @@ endif()
4141
4242# add executable
4343add_executable (${Target} )
44+ install (TARGETS ${Target} )
4445
4546# set source and libraries directory
4647add_subdirectory ("src" )
@@ -53,9 +54,12 @@ set_target_properties(${Target} PROPERTIES
5354 CXX_EXTENSIONS ${COMPILER_EXTENSIONS}
5455 )
5556
56- # project version and name
57+ # compiler definitions
5758target_compile_definitions (${Target} PUBLIC "PROJECT_VERSION=\" ${CMAKE_PROJECT_VERSION} \" " )
5859target_compile_definitions (${Target} PUBLIC "PROJECT_NAME=\" ${CMAKE_PROJECT_NAME} \" " )
60+ target_compile_definitions (${Target} PUBLIC "COMPILER_INFO=\" ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} \" " )
61+ target_compile_definitions (${Target} PUBLIC "SYSTEM_INFO=\" ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION} ${CMAKE_HOST_SYSTEM_PROCESSOR} \" " )
62+
5963
6064# options that are valid for gcc and clang
6165function (commonopts)
@@ -177,7 +181,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
177181 clangwarn()
178182 else ()
179183 target_compile_options (${Target} PUBLIC -w)
180- endif ()
184+ endif ()
181185
182186elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
183187 # compiler specific defines
0 commit comments