Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: janhq/cortex.cpp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4fa48b88ccef52762147fc7cc6d72f7021907b56
Choose a base ref
..
head repository: janhq/cortex.cpp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e2fd6d325aeeabe5fcfb93aa41f3ac521b497876
Choose a head ref
Showing with 16 additions and 5 deletions.
  1. +11 −5 engine/CMakeLists.txt
  2. +5 −0 engine/cortex_openapi.h.in
16 changes: 11 additions & 5 deletions engine/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -85,13 +85,19 @@ string(REPLACE "\\" "\\\\" JSON_CONTENT "${JSON_CONTENT}")
string(REPLACE "\"" "\\\"" JSON_CONTENT "${JSON_CONTENT}")
string(REPLACE "\n" "\\n" JSON_CONTENT "${JSON_CONTENT}")

file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cortex_openapi.h"
"#pragma once\n\n"
"namespace CortexOpenApi {\n"
" constexpr const char JSON_CONTENT[] = \"${JSON_CONTENT}\";\n"
"}\n"
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cortex_openapi.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/cortex_openapi.h"
@ONLY
)

# file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cortex_openapi.h"
# "#pragma once\n\n"
# "namespace CortexOpenApi {\n"
# " constexpr const char JSON_CONTENT[] = \"${JSON_CONTENT}\";\n"
# "}\n"
# )

add_executable(${TARGET_NAME} main.cc
${CMAKE_CURRENT_SOURCE_DIR}/utils/cpuid/cpu_info.cc
${CMAKE_CURRENT_SOURCE_DIR}/utils/file_logger.cc
5 changes: 5 additions & 0 deletions engine/cortex_openapi.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#pragma once

namespace CortexOpenApi {
constexpr const char JSON_CONTENT[] = "@JSON_CONTENT@";
}