|
@@ -36,24 +36,31 @@ set(TARGET_COUNTER 0)
|
|
|
|
|
|
if (${LS_STD_BUILD_STATIC})
|
|
if (${LS_STD_BUILD_STATIC})
|
|
math(EXPR TARGET_COUNTER "${TARGET_COUNTER} + 1")
|
|
math(EXPR TARGET_COUNTER "${TARGET_COUNTER} + 1")
|
|
- message("${PROJECT_NAME}: [Goal] static library")
|
|
|
|
|
|
+ set(GOAL "static library")
|
|
endif ()
|
|
endif ()
|
|
|
|
|
|
if (${LS_STD_BUILD_SHARED})
|
|
if (${LS_STD_BUILD_SHARED})
|
|
math(EXPR TARGET_COUNTER "${TARGET_COUNTER} + 1")
|
|
math(EXPR TARGET_COUNTER "${TARGET_COUNTER} + 1")
|
|
- message("${PROJECT_NAME}: [Goal] shared library")
|
|
|
|
|
|
+ set(GOAL "shared library")
|
|
endif ()
|
|
endif ()
|
|
|
|
|
|
if (${LS_STD_BUILD_MODULE})
|
|
if (${LS_STD_BUILD_MODULE})
|
|
math(EXPR TARGET_COUNTER "${TARGET_COUNTER} + 1")
|
|
math(EXPR TARGET_COUNTER "${TARGET_COUNTER} + 1")
|
|
- message("${PROJECT_NAME}: [Goal] module library")
|
|
|
|
|
|
+ set(GOAL "module library")
|
|
endif ()
|
|
endif ()
|
|
|
|
|
|
|
|
+message("${PROJECT_NAME}: [Goal] ${GOAL}")
|
|
|
|
+
|
|
if (TARGET_COUNTER GREATER 1)
|
|
if (TARGET_COUNTER GREATER 1)
|
|
message("${PROJECT_NAME}: [Error] only one goal supported at the same time!")
|
|
message("${PROJECT_NAME}: [Error] only one goal supported at the same time!")
|
|
return()
|
|
return()
|
|
endif ()
|
|
endif ()
|
|
|
|
|
|
|
|
+if (TARGET_COUNTER EQUAL 0)
|
|
|
|
+ message("${PROJECT_NAME}: [Error] no goal selected!")
|
|
|
|
+ return()
|
|
|
|
+endif ()
|
|
|
|
+
|
|
##########################################################
|
|
##########################################################
|
|
# Compiler Settings
|
|
# Compiler Settings
|
|
##########################################################
|
|
##########################################################
|
|
@@ -63,12 +70,30 @@ set(CMAKE_CXX_STANDARD 11)
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
|
|
|
|
|
-# supported compilers
|
|
|
|
|
|
+##########################################################
|
|
|
|
+# Compiler Support
|
|
|
|
+##########################################################
|
|
|
|
+
|
|
|
|
+# define supported compilers
|
|
|
|
|
|
if (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC OR ${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
|
|
if (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC OR ${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
|
|
message("${PROJECT_NAME}: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} is supported...")
|
|
message("${PROJECT_NAME}: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} is supported...")
|
|
else()
|
|
else()
|
|
- message("${PROJECT_NAME}: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} is not supported... terminated!")
|
|
|
|
|
|
+ message("${PROJECT_NAME}: [Error] ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} is not supported... terminated!")
|
|
|
|
+ return()
|
|
|
|
+endif ()
|
|
|
|
+
|
|
|
|
+# define which goals can run tests
|
|
|
|
+
|
|
|
|
+if (${LS_STD_BUILD_WITH_TESTS} AND ${LS_STD_BUILD_SHARED} OR ${LS_STD_BUILD_MODULE})
|
|
|
|
+ message("${PROJECT_NAME}: [Error] building \"${GOAL}\" with tests is not supported... terminated!")
|
|
|
|
+ return()
|
|
|
|
+endif ()
|
|
|
|
+
|
|
|
|
+# define which compilers are supported for shared or module goal
|
|
|
|
+
|
|
|
|
+if (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC AND ${LS_STD_BUILD_SHARED} OR ${LS_STD_BUILD_MODULE})
|
|
|
|
+ message("${PROJECT_NAME}: [Error] building \"${GOAL}\" with ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} is not supported... terminated!")
|
|
return()
|
|
return()
|
|
endif ()
|
|
endif ()
|
|
|
|
|
|
@@ -355,6 +380,7 @@ endif ()
|
|
|
|
|
|
if (${LS_STD_BUILD_SHARED})
|
|
if (${LS_STD_BUILD_SHARED})
|
|
add_library("${MODULE_NAME_BOXING}" SHARED ${SOURCE_FILES_BOXING})
|
|
add_library("${MODULE_NAME_BOXING}" SHARED ${SOURCE_FILES_BOXING})
|
|
|
|
+ target_link_libraries("${MODULE_NAME_BOXING}" ${MODULE_NAME_CORE})
|
|
set_target_properties("${MODULE_NAME_BOXING}" PROPERTIES DEBUG_POSTFIX "_d")
|
|
set_target_properties("${MODULE_NAME_BOXING}" PROPERTIES DEBUG_POSTFIX "_d")
|
|
endif ()
|
|
endif ()
|
|
|
|
|
|
@@ -418,6 +444,7 @@ endif ()
|
|
|
|
|
|
if (${LS_STD_BUILD_SHARED})
|
|
if (${LS_STD_BUILD_SHARED})
|
|
add_library("${MODULE_NAME_EVENT}" SHARED ${SOURCE_FILES_EVENT})
|
|
add_library("${MODULE_NAME_EVENT}" SHARED ${SOURCE_FILES_EVENT})
|
|
|
|
+ target_link_libraries("${MODULE_NAME_EVENT}" ${MODULE_NAME_CORE})
|
|
set_target_properties("${MODULE_NAME_EVENT}" PROPERTIES DEBUG_POSTFIX "_d")
|
|
set_target_properties("${MODULE_NAME_EVENT}" PROPERTIES DEBUG_POSTFIX "_d")
|
|
endif ()
|
|
endif ()
|
|
|
|
|
|
@@ -439,6 +466,7 @@ endif ()
|
|
|
|
|
|
if (${LS_STD_BUILD_SHARED})
|
|
if (${LS_STD_BUILD_SHARED})
|
|
add_library("${MODULE_NAME_IO}" SHARED ${SOURCE_FILES_IO})
|
|
add_library("${MODULE_NAME_IO}" SHARED ${SOURCE_FILES_IO})
|
|
|
|
+ target_link_libraries("${MODULE_NAME_IO}" ${MODULE_NAME_CORE})
|
|
set_target_properties("${MODULE_NAME_IO}" PROPERTIES DEBUG_POSTFIX "_d")
|
|
set_target_properties("${MODULE_NAME_IO}" PROPERTIES DEBUG_POSTFIX "_d")
|
|
endif ()
|
|
endif ()
|
|
|
|
|
|
@@ -460,6 +488,7 @@ endif ()
|
|
|
|
|
|
if (${LS_STD_BUILD_SHARED})
|
|
if (${LS_STD_BUILD_SHARED})
|
|
add_library("${MODULE_NAME_LOGIC}" SHARED ${SOURCE_FILES_LOGIC})
|
|
add_library("${MODULE_NAME_LOGIC}" SHARED ${SOURCE_FILES_LOGIC})
|
|
|
|
+ target_link_libraries("${MODULE_NAME_LOGIC}" ${MODULE_NAME_CORE})
|
|
set_target_properties("${MODULE_NAME_LOGIC}" PROPERTIES DEBUG_POSTFIX "_d")
|
|
set_target_properties("${MODULE_NAME_LOGIC}" PROPERTIES DEBUG_POSTFIX "_d")
|
|
endif ()
|
|
endif ()
|
|
|
|
|
|
@@ -481,6 +510,7 @@ endif ()
|
|
|
|
|
|
if (${LS_STD_BUILD_SHARED})
|
|
if (${LS_STD_BUILD_SHARED})
|
|
add_library("${MODULE_NAME_TIME}" SHARED ${SOURCE_FILES_TIME})
|
|
add_library("${MODULE_NAME_TIME}" SHARED ${SOURCE_FILES_TIME})
|
|
|
|
+ target_link_libraries("${MODULE_NAME_TIME}" ${MODULE_NAME_CORE})
|
|
set_target_properties("${MODULE_NAME_TIME}" PROPERTIES DEBUG_POSTFIX "_d")
|
|
set_target_properties("${MODULE_NAME_TIME}" PROPERTIES DEBUG_POSTFIX "_d")
|
|
endif ()
|
|
endif ()
|
|
|
|
|