123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- cmake_minimum_required(VERSION 3.25)
- project(core)
- set(CMAKE_CXX_STANDARD 20)
- set(SRC
- "utils/Logger.cpp"
- "utils/Utility.cpp"
- "utils/Error.cpp"
- "utils/New.cpp"
- "utils/Buffer.cpp"
- "utils/Clock.cpp"
- "utils/Random.cpp"
- "data/BitArray.cpp"
- "math/Math.cpp"
- "math/Vector.cpp"
- "math/Quaternion.cpp"
- "math/Matrix.cpp"
- "math/Box.cpp"
- "math/Plane.cpp"
- "math/Frustum.cpp"
- "math/View.cpp"
- "thread/Thread.cpp"
- "io/FileReader.cpp"
- )
- set(SRC_TESTS
- "test/Main.cpp"
- "test/Test.cpp"
- "tests/ArrayTests.cpp"
- "tests/ArrayStringTests.cpp"
- "tests/UtilityTests.cpp"
- "tests/ArrayListTests.cpp"
- "tests/BitArrayTests.cpp"
- "tests/MathTests.cpp"
- "tests/ListTests.cpp"
- "tests/LinkedListTests.cpp"
- "tests/UniquePointerTests.cpp"
- "tests/HashMapTests.cpp"
- "tests/ProbingHashMapTests.cpp"
- "tests/StackTests.cpp"
- "tests/RingBufferTests.cpp"
- "tests/ComponentsTests.cpp"
- "tests/VectorTests.cpp"
- "tests/QuaternionTests.cpp"
- "tests/MatrixTests.cpp"
- "tests/BoxTests.cpp"
- "tests/BufferedValueTests.cpp"
- "tests/PlaneTests.cpp"
- "tests/FrustumTests.cpp"
- "tests/ViewTests.cpp"
- "tests/MatrixStackTests.cpp"
- "tests/ColorTests.cpp"
- "tests/BufferTests.cpp"
- "tests/ClockTests.cpp"
- "tests/RandomTests.cpp"
- "tests/ThreadTests.cpp"
- "tests/FileReaderTests.cpp"
- )
- set(SRC_PERFORMANCE
- "performance/Main.cpp"
- "test/Test.cpp"
- )
- add_library(core STATIC ${SRC})
- target_include_directories(core PUBLIC ".")
- target_compile_options(core PUBLIC
- -Wdeprecated-enum-float-conversion
- -Wctad-maybe-unsupported
- -Werror
- -Wdeprecated-enum-enum-conversion
- -Winvalid-imported-macros
- -Wextra
- -Wzero-as-null-pointer-constant
- -Wframe-larger-than=8388608
- -Wundef
- -Wunused-const-variable=2
- -Wconditionally-supported
- -Wwrite-strings
- -Wlarger-than=1073741824
- -Wimplicit-fallthrough=5
- -Wduplicated-cond
- -Wdisabled-optimization
- -Wsuggest-final-methods
- -Wformat-signedness
- -Wtrivial-auto-var-init
- -Wmissing-include-dirs
- -Winfinite-recursion
- -Wdeprecated-copy-dtor
- -Wanalyzer-too-complex
- -Wduplicated-branches
- -Wstrict-null-sentinel
- -Wmissing-declarations
- -Wformat-truncation=2
- -Wmultiple-inheritance
- -Wstack-usage=8388608
- -Winit-self
- -Wsynth
- -Wvirtual-inheritance
- -Wstringop-overflow=4
- -Wcast-qual
- -Wshadow
- -Wsuggest-final-types
- -Woverloaded-virtual
- -Wconversion
- -Walloca
- -Woverlength-strings
- -Wctor-dtor-privacy
- -Wswitch-enum
- -pedantic
- -Wstrict-overflow=2
- -Wcast-align=strict
- -Wfloat-equal
- -Wformat=2
- -Wattribute-alias=2
- -Wformat-overflow=2
- -Winvalid-pch
- -Wvolatile
- -Wshift-overflow=2
- -Warith-conversion
- -Wcatch-value=3
- -Wnoexcept
- -Wuse-after-free=3
- -Wdouble-promotion
- -Wunused-macros
- -Wregister
- -Wsuggest-override
- -Wnull-dereference
- -Wtrampolines
- -Wlogical-op
- -Wnon-virtual-dtor
- -pedantic-errors
- -Wbidi-chars=any
- -Wdate-time
- -Warray-parameter
- -Waligned-new=all
- -Wold-style-cast
- -Wmultichar
- -Wstack-protector
- -Wmissing-braces
- -Warray-bounds=2
- -Walloc-zero
- -Wplacement-new=2
- -Wmismatched-tags
- -Wcomma-subscript
- -Wall
- -Wbidi-chars
- -Wredundant-tags
- -Wenum-conversion
- -Wall
- -Wredundant-decls
- -Wsign-conversion
- -fdiagnostics-color=always
- -nostdinc++
- -fno-exceptions
- -fno-rtti
- -fno-threadsafe-statics
- )
- target_compile_definitions(core PUBLIC CORE_LOG_LEVEL=4)
- target_link_libraries(core PUBLIC -nodefaultlibs c m)
- add_executable(test ${SRC_TESTS})
- target_link_libraries(test PRIVATE core)
- add_executable(performance ${SRC_PERFORMANCE})
- target_link_libraries(performance PRIVATE core)
|