mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
Update CMake configuration for easier maintenance (#642)
* Update CMake configuration for easier maintenance * Incorrect casing fix * Move package requirement * Update CTest linking * Add logs to the CMake * Add linking for common libraries Added linking for common libraries in tests subdirectory. * Move test subdirectory higher up for some reason * Whitespace a log removal Missed new line * Add dCommon to dChatFilter * Update library output dir * Correct libBcrypt * Further refactor CMake behaviour * Repair bad comments and update library defines * Revert to old include directory method * Implement platform defines * Add missing include Mac needs a specific include for defining platform. Does not compile without this. Co-authored-by: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com>
This commit is contained in:
@@ -1,17 +1,13 @@
|
||||
# create the testing file and list of tests
|
||||
create_test_sourcelist (Tests
|
||||
CommonCxxTests.cpp
|
||||
TestNiPoint3.cpp
|
||||
TestLDFFormat.cpp
|
||||
CommonCxxTests.cpp
|
||||
TestNiPoint3.cpp
|
||||
TestLDFFormat.cpp
|
||||
)
|
||||
|
||||
|
||||
# add the executable
|
||||
add_executable (CommonCxxTests ${Tests})
|
||||
target_link_libraries(CommonCxxTests dCommon raknet)
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(CommonCxxTests ws2_32)
|
||||
endif(WIN32)
|
||||
target_link_libraries(CommonCxxTests ${COMMON_LIBRARIES})
|
||||
|
||||
# remove the test driver source file
|
||||
set (TestsToRun ${Tests})
|
||||
@@ -19,7 +15,7 @@ remove (TestsToRun CommonCxxTests.cpp)
|
||||
|
||||
# Add all the ADD_TEST for each test
|
||||
foreach (test ${TestsToRun})
|
||||
get_filename_component (TName ${test} NAME_WE)
|
||||
add_test (NAME ${TName} COMMAND CommonCxxTests ${TName})
|
||||
set_property(TEST ${TName} PROPERTY ENVIRONMENT CTEST_OUTPUT_ON_FAILURE=1)
|
||||
get_filename_component (TName ${test} NAME_WE)
|
||||
add_test (NAME ${TName} COMMAND CommonCxxTests ${TName})
|
||||
set_property(TEST ${TName} PROPERTY ENVIRONMENT CTEST_OUTPUT_ON_FAILURE=1)
|
||||
endforeach ()
|
||||
|
Reference in New Issue
Block a user