mirror of
https://github.com/AxioDL/nod.git
synced 2025-12-08 13:14:59 +00:00
Compare commits
13 Commits
hsh
...
d14b798b5f
| Author | SHA1 | Date | |
|---|---|---|---|
| d14b798b5f | |||
| 1f110f3549 | |||
| 311d20532e | |||
| 8fdc893c86 | |||
| fdc8be487d | |||
| 3a21961a4e | |||
| da399b5b67 | |||
| 11c734be47 | |||
| 364787604d | |||
| 02c188497a | |||
| d53d677038 | |||
| 5b1b6f6f80 | |||
| 393a11ffb5 |
1
.gitmodules
vendored
1
.gitmodules
vendored
@@ -1,3 +1,4 @@
|
||||
[submodule "logvisor"]
|
||||
path = logvisor
|
||||
url = ../logvisor.git
|
||||
branch = master
|
||||
|
||||
@@ -1,7 +1,57 @@
|
||||
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||
cmake_minimum_required(VERSION 3.10 FATAL_ERROR) # because of c++17
|
||||
project(nod VERSION 0.1)
|
||||
if (NOT MSVC)
|
||||
|
||||
if (MSVC)
|
||||
# Shaddup MSVC
|
||||
add_compile_definitions(UNICODE=1 _UNICODE=1 __SSE__=1
|
||||
_CRT_SECURE_NO_WARNINGS=1 D_SCL_SECURE_NO_WARNINGS=1
|
||||
_SCL_SECURE_NO_DEPRECATE=1 _CRT_NONSTDC_NO_WARNINGS=1
|
||||
_ENABLE_EXTENDED_ALIGNED_STORAGE=1 NOMINMAX=1)
|
||||
add_compile_options(/IGNORE:4221 /wd4018 /wd4800 /wd4005 /wd4311 /wd4068
|
||||
/wd4267 /wd4244 /wd4200 /wd4305 /wd4067 /wd4146 /wd4309 /wd4805 ${VS_OPTIONS})
|
||||
|
||||
add_compile_options(
|
||||
# Disable exceptions
|
||||
$<$<COMPILE_LANGUAGE:CXX>:/EHsc->
|
||||
|
||||
# Disable RTTI
|
||||
$<$<COMPILE_LANGUAGE:CXX>:/GR->
|
||||
|
||||
# Enforce various standards compliant behavior.
|
||||
$<$<COMPILE_LANGUAGE:CXX>:/permissive->
|
||||
|
||||
# Enable standard volatile semantics.
|
||||
$<$<COMPILE_LANGUAGE:CXX>:/volatile:iso>
|
||||
|
||||
# Reports the proper value for the __cplusplus preprocessor macro.
|
||||
$<$<COMPILE_LANGUAGE:CXX>:/Zc:__cplusplus>
|
||||
|
||||
# Use latest C++ standard.
|
||||
$<$<COMPILE_LANGUAGE:CXX>:/std:c++latest>
|
||||
)
|
||||
add_compile_definitions(FMT_EXCEPTIONS=0 _HAS_EXCEPTIONS=0)
|
||||
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||
# Flags for MSVC (not clang-cl)
|
||||
add_compile_options(
|
||||
# Allow constexpr variables to have explicit external linkage.
|
||||
$<$<COMPILE_LANGUAGE:CXX>:/Zc:externConstexpr>
|
||||
|
||||
# Assume that new throws exceptions, allowing better code generation.
|
||||
$<$<COMPILE_LANGUAGE:CXX>:/Zc:throwingNew>
|
||||
|
||||
# Link-time Code Generation for Release builds
|
||||
$<$<OR:$<CONFIG:Release>,$<CONFIG:RelWithDebInfo>>:/GL>
|
||||
)
|
||||
|
||||
# Link-time Code Generation for Release builds
|
||||
set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "/LTCG")
|
||||
set(CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO "/LTCG")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/RELEASE /LTCG /OPT:REF /OPT:ICF /INCREMENTAL:NO")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "/DEBUG /RELEASE /LTCG /OPT:REF /OPT:ICF /INCREMENTAL:NO /DEBUGTYPE:cv,fixup")
|
||||
endif()
|
||||
else()
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
endif()
|
||||
@@ -9,12 +59,6 @@ endif()
|
||||
|
||||
include (CMakePackageConfigHelpers)
|
||||
|
||||
if (MSVC)
|
||||
# Shaddup MSVC
|
||||
add_definitions(-DUNICODE=1 -D_UNICODE=1 -D__SSE__=1 -D_CRT_SECURE_NO_WARNINGS=1 -DD_SCL_SECURE_NO_WARNINGS=1
|
||||
/IGNORE:4221 /wd4018 /wd4800 /wd4005 /wd4311 /wd4267 /wd4244 /wd4200 /wd4305 /wd4067 /wd4146 ${VS_DEFINES})
|
||||
endif()
|
||||
|
||||
if (NOT TARGET logvisor)
|
||||
add_subdirectory(logvisor)
|
||||
endif()
|
||||
@@ -22,6 +66,7 @@ endif()
|
||||
add_subdirectory(lib)
|
||||
add_subdirectory(driver)
|
||||
|
||||
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||
set(version_config_file "${PROJECT_BINARY_DIR}/nodConfigVersion.cmake")
|
||||
set(config_file "${PROJECT_BINARY_DIR}/nodConfig.cmake")
|
||||
set(config_install_dir "lib/cmake/nod")
|
||||
@@ -51,3 +96,4 @@ install(
|
||||
FILES "${config_file}" "${version_config_file}"
|
||||
DESTINATION ${config_install_dir}
|
||||
)
|
||||
endif()
|
||||
@@ -36,7 +36,7 @@ else()
|
||||
target_sources(nod PRIVATE FileIOFILE.cpp)
|
||||
endif()
|
||||
|
||||
if(NOT MSVC AND NOT NX)
|
||||
if(NOT MSVC AND ${CMAKE_SYSTEM_PROCESSOR} STREQUAL x86_64)
|
||||
set_source_files_properties(aes.cpp PROPERTIES COMPILE_FLAGS -maes)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#if _WIN32
|
||||
#include <intrin.h>
|
||||
#else
|
||||
#elif __x86_64__
|
||||
#include <cpuid.h>
|
||||
#endif
|
||||
|
||||
|
||||
2
logvisor
2
logvisor
Submodule logvisor updated: d62b4ce26e...7901fc496d
Reference in New Issue
Block a user