1
This commit is contained in:
parent
c66eabfe60
commit
946244f801
3
.gitignore
vendored
3
.gitignore
vendored
@ -29,4 +29,5 @@ x64
|
||||
*.settings/
|
||||
server/gameserver/.gitignore
|
||||
gameserver.cbp
|
||||
behaviac_generated
|
||||
behaviac_generated
|
||||
gcm.cache
|
52
server/mymangosd/CMakeLists.txt
Normal file
52
server/mymangosd/CMakeLists.txt
Normal file
@ -0,0 +1,52 @@
|
||||
cmake_minimum_required(VERSION 3.28.2)
|
||||
project(mymangosd)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
|
||||
if (${RELEASE})
|
||||
set(CMAKE_BUILD_TYPE "Release")
|
||||
message("release mode")
|
||||
else()
|
||||
set(CMAKE_BUILD_TYPE "Debug")
|
||||
message("debug mode")
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-std=c++20 -fmodules-ts")
|
||||
|
||||
include_directories(
|
||||
AFTER
|
||||
../../third_party/a8
|
||||
../../third_party/f8
|
||||
)
|
||||
|
||||
link_directories(
|
||||
../../third_party/behaviac/lib/${LIB_DIR}
|
||||
)
|
||||
|
||||
aux_source_directory(.
|
||||
SRC_LIST
|
||||
)
|
||||
|
||||
set(EXECUTABLE_OUTPUT_PATH
|
||||
${PROJECT_BINARY_DIR}/../../bin/mymangosd/bin
|
||||
)
|
||||
|
||||
add_executable(
|
||||
mymangosd ${SRC_LIST}
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
mymangosd
|
||||
pthread
|
||||
protobuf
|
||||
)
|
||||
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
target_link_libraries(
|
||||
mymangosd
|
||||
)
|
||||
else()
|
||||
target_link_libraries(
|
||||
mymangosd
|
||||
)
|
||||
endif()
|
33
server/mymangosd/main.cc
Normal file
33
server/mymangosd/main.cc
Normal file
@ -0,0 +1,33 @@
|
||||
import <iostream>;
|
||||
import <vector>;
|
||||
import <set>;
|
||||
import <map>;
|
||||
|
||||
import gemfield;
|
||||
import cs;
|
||||
|
||||
#include <memory>
|
||||
|
||||
void test(std::vector<int>& a)
|
||||
{
|
||||
for (auto& n : a) {
|
||||
std::cout << "I am Gemfield." << n << std::endl;
|
||||
n += 100;
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
std::vector<int> a;
|
||||
a.push_back(1);
|
||||
a.push_back(2);
|
||||
a.push_back(3);
|
||||
a.push_back(4);
|
||||
a.push_back(100);
|
||||
test(a);
|
||||
whoami(a);
|
||||
std::shared_ptr<cs::CMMove> msg;
|
||||
cs::CMMove msg1;
|
||||
msg1.set_seq(100);
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user