Latest stuff, rewriting lexer
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
## AUTOGENERATED COPYRIGHT HEADER START
|
||||
# Copyright (C) 2017-2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
||||
# AUTOGENERATED COPYRIGHT HEADER END
|
||||
cmake_minimum_required(VERSION 3.26...3.29.2 FATAL_ERROR)
|
||||
|
||||
################################################################################
|
||||
@@ -171,6 +174,61 @@ set(PROJECT_AUTHORS "See AUTHORS file")
|
||||
set(PROJECT_COPYRIGHT "All Rights Reserved. See LICENSE file for more information")
|
||||
set(PROJECT_TRADEMARKS "")
|
||||
|
||||
function(init_project TARGET)
|
||||
set_target_properties(${TARGET} PROPERTIES
|
||||
# Always generate position independent code.
|
||||
POSITION_INDEPENDENT_CODE ON
|
||||
|
||||
# Set C++ Standard and Extensions
|
||||
C_STANDARD 17
|
||||
C_STANDARD_REQUIRED ON
|
||||
CXX_STANDARD 20
|
||||
CXX_STANDARD_REQUIRED ON
|
||||
CXX_EXTENSIONS OFF
|
||||
|
||||
# Remove prefix from generated files.
|
||||
PREFIX ""
|
||||
IMPORT_PREFIX ""
|
||||
|
||||
# Never treat warnings as errors.
|
||||
COMPILE_WARNING_AS_ERROR OFF
|
||||
)
|
||||
target_compile_definitions(${TARGET} PRIVATE
|
||||
__STDC_WANT_LIB_EXT1__=1
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
target_compile_definitions(${TARGET} PRIVATE
|
||||
# windows.h
|
||||
#- Disable MIN/MAX macro as this breaks a lot of code.
|
||||
NOMINMAX
|
||||
#- Disable IN/OUT macro as this breaks a lot of code.
|
||||
NOINOUT
|
||||
)
|
||||
endif()
|
||||
|
||||
if(MSVC) # Microsoft Visual C/C++
|
||||
target_compile_options(${TARGET} PRIVATE
|
||||
# Disable useless/terrible behavior from MSVC
|
||||
_CRT_SECURE_NO_WARNINGS
|
||||
_ENABLE_EXTENDED_ALIGNED_STORAGE
|
||||
|
||||
# Dynamically link Microsoft C/C++ Redistributable.
|
||||
$<$<CONFIG:>:/MD>
|
||||
$<$<CONFIG:Debug>:/MDd>
|
||||
$<$<CONFIG:Release>:/MD>
|
||||
$<$<CONFIG:RelWithDebInfo>:/MD>
|
||||
$<$<CONFIG:MinSizeRel>:/MD>
|
||||
|
||||
# Always compile using multiple processors. Why is this defaulting off anyway?!
|
||||
/MP
|
||||
|
||||
# We want full exception support all the time, not conditionally.
|
||||
/EHa
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
################################################################################
|
||||
# Sub-projects
|
||||
################################################################################
|
||||
|
||||
Reference in New Issue
Block a user