mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
CMake adjustments, leave edits that didn't change file paths
This commit is contained in:
parent
6e54bd61b1
commit
5a2b39641f
16
CMakeSettings.json
Normal file
16
CMakeSettings.json
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
// See https://go.microsoft.com/fwlink/?linkid=834763 for more information about this file.
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "x64-Debug",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"configurationType": "Debug",
|
||||||
|
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||||
|
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||||
|
"installRoot": "${projectDir}\\out\\install\\${name}",
|
||||||
|
"cmakeCommandArgs": "",
|
||||||
|
"buildCommandArgs": "",
|
||||||
|
"ctestCommandArgs": ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -1,9 +1,25 @@
|
||||||
# We define our own compilation flags here.
|
# We define our own compilation flags here.
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
set(CMAKE_CXX_FLAGS "-O0 -ggdb -Wall \
|
|
||||||
-Wextra -Wcast-align -Wcast-qual -Wdisabled-optimization -Wformat=2 \
|
set(CMAKE_CXX_FLAGS "-O3 -ggdb")
|
||||||
-Winit-self -Wmissing-include-dirs -Woverloaded-virtual \
|
|
||||||
-Wredundant-decls -Wshadow -Wsign-promo ")
|
# Set default compile flags for GCC
|
||||||
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
message(STATUS "GCC detected, adding compile flags")
|
||||||
|
set(CMAKE_CXX_FLAGS
|
||||||
|
"${CMAKE_CXX_FLAGS}
|
||||||
|
-Wall-Winit-self
|
||||||
|
-Wextra
|
||||||
|
-Wcast-align
|
||||||
|
-Wcast-qual
|
||||||
|
-Wdisabled-optimization
|
||||||
|
-Wformat=2
|
||||||
|
-Wmissing-include-dirs
|
||||||
|
-Woverloaded-virtual
|
||||||
|
-Wredundant-decls
|
||||||
|
-Wshadow
|
||||||
|
-Wsign-promo")
|
||||||
|
endif(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
|
||||||
enable_language(ASM_NASM)
|
enable_language(ASM_NASM)
|
||||||
set(RUNTIME_SOURCE
|
set(RUNTIME_SOURCE
|
||||||
|
|
|
@ -25,6 +25,8 @@ extern Ptr<u8> MessBufArea;
|
||||||
extern Ptr<u8> OutputBufArea;
|
extern Ptr<u8> OutputBufArea;
|
||||||
extern Ptr<u8> PrintBufArea;
|
extern Ptr<u8> PrintBufArea;
|
||||||
|
|
||||||
|
#define __attribute__(A) /* do nothing */
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Initialize global variables for kprint
|
* Initialize global variables for kprint
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
#ifndef JAK1_DECI2SERVER_H
|
#ifndef JAK1_DECI2SERVER_H
|
||||||
#define JAK1_DECI2SERVER_H
|
#define JAK1_DECI2SERVER_H
|
||||||
|
|
||||||
#include <netinet/in.h>
|
#include <Winsock2.h>
|
||||||
|
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <condition_variable>
|
#include <condition_variable>
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <pthread.h>
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <condition_variable>
|
#include <condition_variable>
|
||||||
|
@ -40,7 +39,7 @@ private:
|
||||||
friend void* bootstrap_thread_func(void* thd);
|
friend void* bootstrap_thread_func(void* thd);
|
||||||
|
|
||||||
std::string name = "invalid";
|
std::string name = "invalid";
|
||||||
pthread_t thread;
|
std::thread thread;
|
||||||
SystemThreadManager* manager;
|
SystemThreadManager* manager;
|
||||||
std::function<void(SystemThreadInterface &)> function;
|
std::function<void(SystemThreadInterface &)> function;
|
||||||
bool initialization_complete = false;
|
bool initialization_complete = false;
|
||||||
|
|
|
@ -12,7 +12,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void start() {
|
void start() {
|
||||||
clock_gettime(CLOCK_MONOTONIC, &_startTime);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double getMs() {
|
double getMs() {
|
||||||
|
@ -21,7 +20,6 @@ public:
|
||||||
|
|
||||||
int64_t getNs() {
|
int64_t getNs() {
|
||||||
struct timespec now;
|
struct timespec now;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
|
||||||
return (int64_t)(now.tv_nsec - _startTime.tv_nsec) + 1000000000 * (now.tv_sec - _startTime.tv_sec);
|
return (int64_t)(now.tv_nsec - _startTime.tv_nsec) + 1000000000 * (now.tv_sec - _startTime.tv_sec);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue