File tree Expand file tree Collapse file tree 5 files changed +18
-13
lines changed Expand file tree Collapse file tree 5 files changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -216,11 +216,8 @@ endfunction()
216
216
# Setup Target Function
217
217
# *****************************************************************************
218
218
function (setup_target TARGET_NAME )
219
- if (MSVC )
220
- set_property (TARGET ${TARGET_NAME} APPEND_STRING PROPERTY LINK_FLAGS " /time" )
221
- if (BUILD_STATIC_LIBRARY )
222
- set_property (TARGET ${TARGET_NAME} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" )
223
- endif (BUILD_STATIC_LIBRARY )
224
- endif (MSVC )
219
+ if (MSVC AND BUILD_STATIC_LIBRARY )
220
+ set_property (TARGET ${TARGET_NAME} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" )
221
+ endif ()
225
222
target_link_libraries (${TARGET_NAME} PUBLIC project_options )
226
223
endfunction ()
Original file line number Diff line number Diff line change 1
1
set (CANARY_TARGET_NAME ${PROJECT_NAME} )
2
- if (ENABLE_TESTS )
2
+ if (BUILD_TESTS )
3
3
set (CANARY_TARGET_NAME "${CANARY_TARGET_NAME} _lib" )
4
4
# Define and setup CanaryLib main library target
5
5
add_library (${CANARY_TARGET_NAME} )
@@ -51,7 +51,7 @@ configure_linking(${CANARY_TARGET_NAME})
51
51
# === UNITY BUILD (compile time reducer) ===
52
52
if (SPEED_UP_BUILD_UNITY )
53
53
set_target_properties (${CANARY_TARGET_NAME} PROPERTIES UNITY_BUILD ON )
54
- log_option_enabled ("Build unity for speed up compilation for taget ${CANARY_TARGET_NAME} " )
54
+ log_option_enabled ("Build unity for speed up compilation for target ${CANARY_TARGET_NAME} " )
55
55
else ()
56
56
log_option_disabled ("Build unity" )
57
57
endif ()
@@ -60,7 +60,7 @@ endif()
60
60
# Target include directories - to allow #include
61
61
# *****************************************************************************
62
62
target_include_directories (${CANARY_TARGET_NAME}
63
- PUBLIC
63
+ PUBLIC
64
64
${BOOST_DI_INCLUDE_DIRS}
65
65
${CMAKE_SOURCE_DIR} /src
66
66
${GMP_INCLUDE_DIRS}
Original file line number Diff line number Diff line change @@ -4,11 +4,20 @@ cmake_minimum_required(VERSION 3.22 FATAL_ERROR)
4
4
include (BaseConfig )
5
5
include (GNUInstallDirs )
6
6
7
+ # If it is tests, we need link it static library
8
+ if (BUILD_TESTS )
9
+ # Import configurations, source definitions, and linker settings
10
+ include (CanaryLib )
11
+ endif ()
12
+
7
13
# Define main executable target, set it up and link to main library
8
14
add_executable (${PROJECT_NAME} main.cpp )
9
15
10
- # Import configurations, source definitions, and linker settings
11
- include (CanaryLib )
16
+ # If it is not tests, we can link it directly to the executable
17
+ if (NOT BUILD_TESTS )
18
+ # Import configurations, source definitions, and linker settings
19
+ include (CanaryLib )
20
+ endif ()
12
21
13
22
if (MSVC )
14
23
# Add executable icon for Windows
Original file line number Diff line number Diff line change @@ -25,8 +25,6 @@ target_link_libraries(${PROJECT_NAME}
25
25
)
26
26
target_include_directories (${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_BINARY_DIR} )
27
27
28
- message ("Diretório de construção atual: ${CMAKE_CURRENT_BINARY_DIR} " )
29
-
30
28
if (MSVC AND BUILD_STATIC_LIBRARY )
31
29
set_property (TARGET ${PROJECT_NAME} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" )
32
30
endif ()
Original file line number Diff line number Diff line change 6
6
* Contributors: https://github.com/opentibiabr/canary/graphs/contributors
7
7
* Website: https://docs.opentibiabr.com/
8
8
*/
9
+
9
10
#include " pch.hpp"
10
11
11
12
#include < boost/ut.hpp>
You can’t perform that action at this time.
0 commit comments