Skip to content

Commit

Permalink
tiny changes + CI test attempt 5
Browse files Browse the repository at this point in the history
  • Loading branch information
kernelwernel committed Sep 15, 2023
1 parent 1dc754d commit 2c7a6d1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
22 changes: 14 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,10 @@ set(PROJECT_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(BUILD_DIR "${PROJECT_DIR}/build")
set(TARGET "vmaware")

if (MSVC)
set_property(TARGET ${TARGET} PROPERTY CXX_STANDARD 20)
set_property(TARGET ${TARGET} PROPERTY CXX_STANDARD_REQUIRED ON)
endif()

# debug/release CXX flag options
if (NOT MSVC)
if(CMAKE_BUILD_TYPE MATCHES "Debug")
if(CMAKE_BUILD_TYPE MATCHES "Debug")
MESSAGE(STATUS "Build set to debug mode")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DDEBUG -O0 -fsanitize=address,undefined,nullability") # -fsanitize=address,undefined,nullability
elseif(CMAKE_BUILD_TYPE MATCHES "Release")
Expand All @@ -63,14 +59,24 @@ if (NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=native")
endif()
endif()
endif()
endif()


# MSVC stuff
//if (MSVC)
set_property(TARGET ${TARGET} PROPERTY CXX_STANDARD 20)
set_property(TARGET ${TARGET} PROPERTY CXX_STANDARD_REQUIRED ON)
//endif()


# add executable
add_executable(${TARGET} "src/cli.cpp")


# release stuff
if(CMAKE_BUILD_TYPE MATCHES "Release")
install(TARGETS ${TARGET} DESTINATION bin)
if (NOT MSVC)
if(CMAKE_BUILD_TYPE MATCHES "Release")
install(TARGETS ${TARGET} DESTINATION bin)
install(FILES "src/vmaware.hpp" DESTINATION /usr/include)
endif()
endif()
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ git clone https://github.com/kernelwernel/VMAware
cd VMAware
mkdir build
cd build
sudo cmake ..
cmake ..
sudo make install
```
> NOTE: I'm most likely going to change my username in the future. If the github link doesn't exist, search for the VMAware project and you should find it.
Expand Down
6 changes: 3 additions & 3 deletions src/vmaware.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ struct VM {
using u32 = std::uint32_t;
using u64 = std::uint64_t;
using i32 = std::int32_t;
using f32 = float;
using f64 = double;

#if (CPP <= 14)
using sv = const char*;
Expand Down Expand Up @@ -576,7 +576,7 @@ struct VM {
if (!(d & (1 << 27))) { return false; }
}

u32 s, acc = 0;
u64 s, acc = 0;
i32 out[4];

for (std::size_t i = 0; i < 100; ++i) {
Expand Down Expand Up @@ -1478,7 +1478,7 @@ struct VM {
VM::no_cpuid = !check_cpuid();
VM::flags = p_flags;

f32 points = 0;
f64 points = 0;

if (thread_count()) { points += 1.5; }
if (mac_address_check()) { points += 3.5; }
Expand Down

0 comments on commit 2c7a6d1

Please sign in to comment.